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 15b94ca6def622b6df994c876924b1b88f418e7c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Wed Apr 29 12:00:43 2015 +0200 hostpage: checkbox to selected all subparts added --- static/js/controllers/hostPageCtrl.js | 9 +++++++++ views/hostpage.html | 1 + 2 files changed, 10 insertions(+) diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index d9cf99f..bb51ed3 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -50,6 +50,8 @@ mumApp.controller('hostPageCtrl', function($scope, $rootScope, $route, $routePar $scope.subparts_checked = {}; + $scope.selectedAll = false; + $scope.update_nmap_attribute = function(attribute, new_value){ var args = {}; args['attribute'] = attribute; @@ -71,6 +73,13 @@ mumApp.controller('hostPageCtrl', function($scope, $rootScope, $route, $routePar $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'set_subpart', 'args': args}})); } + $scope.checkAll = function(modname, bool){ + $scope.selectedAll = bool; + for(key in $scope.subparts_checked[modname]){ + $scope.subparts_checked[modname][key] = bool; + } + } + $scope.get_unit = function(mod_name){ res = ''; if($scope.items.loaded_moni_mod[mod_name].unit != 'bool'){ diff --git a/views/hostpage.html b/views/hostpage.html index c572372..ed8ad90 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -99,6 +99,7 @@ ng-show="modname != 'nmap'"> <th>{{modname}}</th> <th> + <input type="checkbox" ng-model="selectedAll" ng-click="checkAll(modname, !selectedAll)"> <button type="button" class="btn btn-info btn-xs" ng-click="save_subpart(modname)"> Monitore selected subparts -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.