diff --git a/server/app/index.html b/server/app/index.html index 6e97fe66a..f6d51842f 100644 --- a/server/app/index.html +++ b/server/app/index.html @@ -43,6 +43,7 @@ + diff --git a/server/app/scripts/app.js b/server/app/scripts/app.js index 90b9f2786..5334513c2 100644 --- a/server/app/scripts/app.js +++ b/server/app/scripts/app.js @@ -41,7 +41,12 @@ app.config(['$routeProvider', '$locationProvider', '$httpProvider', function($ro .when('/login', { templateUrl: '/static/views/login.html', controller: 'LoginController', - title: 'Login', + title: 'Login' + }) + .when('/logout', { + templateUrl: '/static/views/logout.html', + controller: 'LogoutController', + title: 'Logout' }) .when('/gitlab', { templateUrl: '/static/views/login_gitlab.html', diff --git a/server/app/scripts/controllers/logout.js b/server/app/scripts/controllers/logout.js new file mode 100644 index 000000000..6004ef636 --- /dev/null +++ b/server/app/scripts/controllers/logout.js @@ -0,0 +1,7 @@ +'use strict'; + +angular.module('app').controller("LogoutController", function() { + console.log("logging out") + localStorage.removeItem("access_token"); + window.location.href = "/login"; +}); \ No newline at end of file diff --git a/server/app/views/drawer.html b/server/app/views/drawer.html index a756c22ed..a7332e705 100644 --- a/server/app/views/drawer.html +++ b/server/app/views/drawer.html @@ -7,5 +7,5 @@
  • Users
  • Settings
  • - Signout + Signout \ No newline at end of file diff --git a/server/app/views/logout.html b/server/app/views/logout.html new file mode 100644 index 000000000..e69de29bb diff --git a/server/pubsub/channel.go b/server/pubsub/channel.go index c7469e768..63001c5fe 100644 --- a/server/pubsub/channel.go +++ b/server/pubsub/channel.go @@ -66,7 +66,6 @@ func (c *Channel) start() { case sub := <-c.unsubscribe: delete(c.subscriptions, sub) close(sub.send) - log.Println("usubscribed to subscription") case sub := <-c.subscribe: c.subscriptions[sub] = true @@ -118,7 +117,6 @@ func replay(s *Subscription, history []interface{}) { } func (c *Channel) stop() { - log.Println("subscription stopped") for sub := range c.subscriptions { sub.Close() }