branch develop updated (ce0339e -> ca647b1)
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 ce0339e global_conf: affichage des modules par block et changement de conf possible new ca647b1 corrigé un bug lors de la suppresion d'un hôte 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 ca647b19fc21515dd3916f40119b15d1c82e511a Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Apr 2 10:57:04 2015 +0200 corrigé un bug lors de la suppresion d'un hôte Summary of changes: app/process_monitoring.py | 2 -- static/js/controllers/hostPageCtrl.js | 7 +++++-- static/js/controllers/notificationsCtrl.js | 14 +++++++------- static/js/controllers/profileCtrl.js | 6 +++--- static/js/controllers/usersCtrl.js | 8 ++++---- views/settings.html | 4 +--- 6 files changed, 20 insertions(+), 21 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 ca647b19fc21515dd3916f40119b15d1c82e511a Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Apr 2 10:57:04 2015 +0200 corrigé un bug lors de la suppresion d'un hôte --- app/process_monitoring.py | 2 -- static/js/controllers/hostPageCtrl.js | 7 +++++-- static/js/controllers/notificationsCtrl.js | 14 +++++++------- static/js/controllers/profileCtrl.js | 6 +++--- static/js/controllers/usersCtrl.js | 8 ++++---- views/settings.html | 4 +--- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/app/process_monitoring.py b/app/process_monitoring.py index 42faa61..4ac4049 100644 --- a/app/process_monitoring.py +++ b/app/process_monitoring.py @@ -83,8 +83,6 @@ def remove_to_waiting_list(addr_host, modname): global waiting_list i = 0 while i < len(waiting_list): - print 'size: ' + str(len(waiting_list)) - print 'i: ' + str(i) if waiting_list[i]['addr'] == addr_host: if modname is None: # it was asked to remove all entries of this host diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index 7f1a9eb..23f562e 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -1,4 +1,4 @@ -mumApp.controller('hostPageCtrl', function($scope, $rootScope, $route, $routeParams, $modal) { +mumApp.controller('hostPageCtrl', function($scope, $rootScope, $route, $routeParams, $location, $modal) { $scope.loaded = false; // indicates if this is the first loading of the page @@ -50,7 +50,10 @@ mumApp.controller('hostPageCtrl', function($scope, $rootScope, $route, $routePar $route.reload(); } if(args.func == 'remove_host'){ - $route.reload(); + $scope.$apply(function(){ + $rootScope.$broadcast("sendViaWs", JSON.stringify({"GET_HOSTS": ""})); + $location.path('/'); + }); } }); diff --git a/static/js/controllers/notificationsCtrl.js b/static/js/controllers/notificationsCtrl.js index e9330b6..dc85a7e 100644 --- a/static/js/controllers/notificationsCtrl.js +++ b/static/js/controllers/notificationsCtrl.js @@ -66,7 +66,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou } } return res; - } + }; $scope.get_activated = function(struct){ // {modname:{"priority":int,"activated":bool}, ...} res = []; @@ -76,7 +76,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou } } return res; - } + }; $scope.selected_grp = ""; // string $scope.selected_host = ""; // {"status":"success","group":["all","g1"],"addr":"127.0.0.1","danger":[],"last_check":"2015-03-20 15:32:19.897431","warning":[],"name":"localhost"} @@ -89,7 +89,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou var args = {'group': $scope.selected_grp}; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_group_subscribers', 'args': args}})); } - } + }; $scope.get_host_subscribers = function(){ $scope.subtitle = $scope.selected_host['addr'] + '('+ $scope.selected_host['name'] + ')'; @@ -97,7 +97,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou var args = {'addr_host': $scope.selected_host['addr']}; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_host_subscribers', 'args': args}})); } - } + }; $scope.$on("resCall", function (event, args) { /* args= { username: {'minor': { @@ -144,7 +144,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou $scope.discard = function(){ $scope.subscriber_data = $scope.subscriber_data_unchanged; - } + }; $scope.save = function(){ var args = {}; @@ -157,7 +157,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou args['addr_host'] = $scope.selected_host.addr; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'update_subscription_to_host', 'args': args}})); } - } + }; $scope.unsubscribe = function(username){ var args = {}; @@ -170,7 +170,7 @@ mumApp.controller('notificationsCtrl', function($scope, $rootScope, $modal, $rou args['addr_host'] = $scope.selected_host.addr; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'unsubscribe_to_host', 'args': args}})); } - } + }; $scope.open_modal_add_subscriber = function (mod_name) { var modalInstance = $modal.open({ diff --git a/static/js/controllers/profileCtrl.js b/static/js/controllers/profileCtrl.js index 31cdda8..1fc49e2 100644 --- a/static/js/controllers/profileCtrl.js +++ b/static/js/controllers/profileCtrl.js @@ -34,7 +34,7 @@ mumApp.controller('profileCtrl', function($scope, $rootScope, $route, $modal){ } $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_user_settings', 'args': args}})); - } + }; $scope.save_settings = function(){ var args = {}; @@ -44,7 +44,7 @@ mumApp.controller('profileCtrl', function($scope, $rootScope, $route, $modal){ args['settings']['sms_url'] = $scope.sms_url; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'update_user_settings', 'args': args}})); - } + }; // creation of modals $scope.open_modal_subscriptions = function () { @@ -97,7 +97,7 @@ mumApp.controller('ModalSubscriptionsInstanceCtrl', function ($scope, $rootScope res = "success"; } return res; - } + }; $scope.close = function () { $modalInstance.close(); diff --git a/static/js/controllers/usersCtrl.js b/static/js/controllers/usersCtrl.js index fc48ff8..5abc4a3 100644 --- a/static/js/controllers/usersCtrl.js +++ b/static/js/controllers/usersCtrl.js @@ -48,21 +48,21 @@ mumApp.controller('usersCtrl', function($scope, $rootScope, $route) { args['username'] = $scope.new_username; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'create_user', 'args': args}})); $route.reload(); - } + }; $scope.removeUser = function(){ var args = {}; args['username'] = $scope.selected_user; $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'remove_user', 'args': args}})); $route.reload(); - } + }; $scope.get_user_subscriptions = function(){ if($scope.selected_user != ''){ $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_user_subscriptions', 'args': $scope.selected_user}})); } - } + }; $scope.get_class = function(sub_part, sub_type, target_name, notif_mod){ var res = ""; @@ -70,6 +70,6 @@ mumApp.controller('usersCtrl', function($scope, $rootScope, $route) { res = "success"; } return res; - } + }; }); \ No newline at end of file diff --git a/views/settings.html b/views/settings.html index d910116..9428423 100644 --- a/views/settings.html +++ b/views/settings.html @@ -1,8 +1,7 @@ <div class="col-md-offset-2 main"> <h1 class="page-header">Configure the default settings</h1> - {{settings}} - + <p>The default parameters here will be automatically applied for each host you will add in the future.</p> <accordion close-others="false"> <accordion-group heading="{{block}}" ng-repeat="block in all_blocks()"> <div class="row" ng-repeat="(modname, mod) in settings" @@ -20,7 +19,6 @@ <div class="modal-body"> <form> <div class="form-group"> - <p>The parameters here will be automatically applied for each host you will add in the future.</p> <label for="freq">Frequency check: each</label> <div class="row" id="freq"> <div class="col-xs-2"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm