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 0e326cba20e33f7a91a5559b0cb9eafcf47f061f Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Jun 11 09:38:32 2015 +0200 dashboard: removed save button on notif modal --- app/process_monitoring.py | 2 ++ static/js/controllers/dashboardCtrl.js | 17 +++++++++++++++-- views/dashboard.html | 6 +++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/app/process_monitoring.py b/app/process_monitoring.py index 126aebc..9d50eba 100644 --- a/app/process_monitoring.py +++ b/app/process_monitoring.py @@ -46,6 +46,7 @@ class ProcessMonitoring(threading.Thread): global end global waiting_list ready_to_launch = False + rm = None while not end: if not waiting_list == []: modules_to_run = [] @@ -60,6 +61,7 @@ class ProcessMonitoring(threading.Thread): rm.start() ready_to_launch = False time.sleep(1) + rm.join(5) def add_to_waiting_list(dict_mod): diff --git a/static/js/controllers/dashboardCtrl.js b/static/js/controllers/dashboardCtrl.js index d9d3695..fe65277 100644 --- a/static/js/controllers/dashboardCtrl.js +++ b/static/js/controllers/dashboardCtrl.js @@ -92,6 +92,17 @@ mumApp.controller('dashboardCtrl', function ($scope, $routeParams, $location, $r return res; }; + $scope.type_btn_sub = function (nb_sub){ + var type = ""; + if(nb_sub == 0){ + type = "default"; + } + else{ + type = "primary"; + } + return type; + } + $scope.rem_host_to_group = function(addr_host, grp_name){ if(grp_name != 'all'){ var args = {}; @@ -233,7 +244,7 @@ mumApp.controller('ModalNotifInstanceCtrl', function ($scope, $rootScope, $modal } else if (args.func == 'update_subscription_to_group' || 'update_subscription_to_host'){ $rootScope.$broadcast("sendViaWs", JSON.stringify({"GET_HOSTS": ""})); - $modalInstance.close(); + //$modalInstance.close(); } }); @@ -255,6 +266,7 @@ mumApp.controller('ModalNotifInstanceCtrl', function ($scope, $rootScope, $modal $scope.new_notif_type = ""; $scope.new_mod_notif = ""; $scope.new_username = ""; + $scope.save(); }; $scope.remove_notif = function(username, notif_type, mod_notif_name){ @@ -263,6 +275,7 @@ mumApp.controller('ModalNotifInstanceCtrl', function ($scope, $rootScope, $modal Object.keys($scope.subscribers[username].major).length == 0){ delete $scope.subscribers[username]; } + $scope.save(); }; $scope.save = function () { @@ -278,7 +291,7 @@ mumApp.controller('ModalNotifInstanceCtrl', function ($scope, $rootScope, $modal } }; - $scope.cancel = function () { + $scope.close = function () { $modalInstance.close(); }; }); \ No newline at end of file diff --git a/views/dashboard.html b/views/dashboard.html index 81afb6e..69be444 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -101,7 +101,7 @@ </td> <td>{{host.last_check.split('.')[0]}}</td> <td> - <button type="button" class="btn btn-primary btn-xs" aria-label="Subscribers" + <button type="button" class="btn btn-{{type_btn_sub(host.nb_subscribers)}} btn-xs" aria-label="Subscribers" popover-placement="left" popover="{{host.nb_subscribers}} subscribers" popover-trigger="mouseenter" @@ -261,8 +261,8 @@ </button> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancel()">Close</button> - <button type="button" class="btn btn-primary" ng-click="save()">Save changes</button> + <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="close()">Close</button> + <!--<button type="button" class="btn btn-primary" ng-click="save()">Save changes</button>--> </div> </script> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.