branch develop updated (39775c0 -> 140053a)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository mum. See http://git.chorem.org/mum.git from 39775c0 hostpage: module managment directly through the page (removed the old modal) new 140053a toaster if a module have been deactivated by the service The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 140053a3b86e71a0047619b00fbc5df74c52e6ec Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Jun 4 14:37:25 2015 +0200 toaster if a module have been deactivated by the service Summary of changes: app/module_loader.py | 9 ++++++--- app/modules/notification_modules/websocket_container.py | 6 +++++- static/js/controllers/headCtrl.js | 3 +++ static/js/mumApp.js | 7 +++++++ 4 files changed, 21 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 140053a3b86e71a0047619b00fbc5df74c52e6ec Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Jun 4 14:37:25 2015 +0200 toaster if a module have been deactivated by the service --- app/module_loader.py | 9 ++++++--- app/modules/notification_modules/websocket_container.py | 6 +++++- static/js/controllers/headCtrl.js | 3 +++ static/js/mumApp.js | 7 +++++++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/module_loader.py b/app/module_loader.py index 6a59bf5..3f934c4 100644 --- a/app/module_loader.py +++ b/app/module_loader.py @@ -303,8 +303,9 @@ class ModuleLoader: dict_notif = self.db.add_check(addr_host, part_name, res_check) self.run_notification_modules(dict_notif) except modules.CommandNotFoundException.CommandNotFoundException: - print "No port " + part_name + " on " + addr_host + \ - ". This part checking have been deactivated." + msg = "No port " + part_name + " on " + addr_host + ". This part checking have been deactivated." + print msg + self.wsc.notify_module_deactivation(msg) process_monitoring.remove_to_waiting_list(addr_host, part_name) dict_deactivation_request = {} dict_deactivation_request['addr_host'] = addr_host @@ -342,8 +343,10 @@ class ModuleLoader: print "Now trying on next avaliable connection..." i += 1 if not check_done: - print "No necessary connection have been properly configured for " + part_name + " on " + addr_host +\ + msg = "No necessary connection have been properly configured for " + part_name + " on " + addr_host + \ ". Therefore it has been deactivated." + print msg + self.wsc.notify_module_deactivation(msg) process_monitoring.remove_to_waiting_list(addr_host, part_name) dict_deactivation_request = {} dict_deactivation_request['addr_host'] = addr_host diff --git a/app/modules/notification_modules/websocket_container.py b/app/modules/notification_modules/websocket_container.py index 98dfb60..c4cf169 100644 --- a/app/modules/notification_modules/websocket_container.py +++ b/app/modules/notification_modules/websocket_container.py @@ -20,4 +20,8 @@ class WebSocketContainer: def notify_task_change(self): for ws in self.ws_set: - ws.send(json.dumps({"RES_TASK_LIST": self.db.get_task_list()})) \ No newline at end of file + ws.send(json.dumps({"RES_TASK_LIST": self.db.get_task_list()})) + + def notify_module_deactivation(self, msg): + for ws in self.ws_set: + ws.send(json.dumps({"DEACTIVATION_NOTIF": msg})) \ No newline at end of file diff --git a/static/js/controllers/headCtrl.js b/static/js/controllers/headCtrl.js index 02b7079..fb1701b 100644 --- a/static/js/controllers/headCtrl.js +++ b/static/js/controllers/headCtrl.js @@ -120,6 +120,9 @@ mumApp.controller('headCtrl', function ($scope, $rootScope, toastr, $interval, $ $scope.task_list = obj[key]; }); break; + case "DEACTIVATION_NOTIF": + $scope.pop_warning("A module cannot be activated by Mum", obj[key]); + break; case "ERROR": toastr.error(obj[key], "Server error"); break; diff --git a/static/js/mumApp.js b/static/js/mumApp.js index 77fba04..b3688ae 100644 --- a/static/js/mumApp.js +++ b/static/js/mumApp.js @@ -135,3 +135,10 @@ mumApp.filter('propsFilter', function() { return out; } }); + +mumApp.config(function(toastrConfig) { + angular.extend(toastrConfig, { + extendedTimeOut: 2000, + timeOut: 15000 + }); +}); \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm