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 6871af3b328a92205460fc3a5616b2b15146f4cf Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Wed Apr 29 13:49:51 2015 +0200 full detection launched after scan + orderby directive fixed for tables --- app/mum.py | 1 + static/js/controllers/dashboardCtrl.js | 9 ++++++--- static/js/controllers/groupCtrl.js | 2 ++ views/dashboard.html | 12 ++++++------ views/groups.html | 10 ++++++---- views/hostpage.html | 2 +- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/app/mum.py b/app/mum.py index 1f9653d..8e2899e 100755 --- a/app/mum.py +++ b/app/mum.py @@ -30,6 +30,7 @@ class ThreadDetect(threading.Thread): except WebSocketError: pass for ip in json.loads(scanned_ip): + ml.run_all_detection_modules(ip) monitoring_intructions = ml.get_db().get_monitoring_instructions(ip) for instr in monitoring_intructions: ml.add_to_waiting_list(instr) diff --git a/static/js/controllers/dashboardCtrl.js b/static/js/controllers/dashboardCtrl.js index 33b1711..9e0760d 100644 --- a/static/js/controllers/dashboardCtrl.js +++ b/static/js/controllers/dashboardCtrl.js @@ -30,15 +30,17 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH $scope.items = DataHosts.Items; }); - $scope.filteredItems = []; + /*$scope.filteredItems = []; $scope.groupedItems = []; $scope.itemsPerPage = 25; $scope.pagedItems = []; - $scope.currentPage = 0; + $scope.currentPage = 0;*/ $scope.addr_filter = ''; $scope.name_filter = ''; + $scope.order_val = 'status' + if($routeParams.param == null){ $scope.status_filter = ["success", "warning", "danger", "idling", ""]; } @@ -61,6 +63,7 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH return($scope.status_filter.lastIndexOf(item.status) >= 0); } + /* // Concerning the table manipulation var searchMatch = function (haystack, needle) { return !needle || haystack.toLowerCase().indexOf(needle.toLowerCase()) !== -1; @@ -133,7 +136,7 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH $scope.search(); // $scope.groupsByAddr = {} - + */ /*$scope.getGroupsByAddr = function(addr) { res = "" for(var i = 0; i<$scope.items.length; i++){ diff --git a/static/js/controllers/groupCtrl.js b/static/js/controllers/groupCtrl.js index fb2e031..e436a23 100644 --- a/static/js/controllers/groupCtrl.js +++ b/static/js/controllers/groupCtrl.js @@ -36,6 +36,8 @@ mumApp.controller('groupCtrl', function($scope, $rootScope, $filter, $route, $ro $scope.grp = "all"; + $scope.order_val = "group"; + /*$scope.getGroupsByAddr = function(addr) { res = ""; for(var i = 0; i<$scope.items.length; i++){ diff --git a/views/dashboard.html b/views/dashboard.html index e3bfb08..c8d7444 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -33,11 +33,11 @@ <thead> <tr> - <th class="id" custom-sort order="'addr'" sort="sort">Address </th> - <th class="name" custom-sort order="'name'" sort="sort">Name </th> - <th class="description" custom-sort order="'status'" sort="sort">Status </th> - <th class="field3" custom-sort order="'group'" sort="sort">Group </th> - <th class="field4" custom-sort order="'last_check'" sort="sort">Last check </th> + <th><a ng-click="order_val='addr'">Address</a></th> + <th><a ng-click="order_val='name'">Name</a></th> + <th><a ng-click="order_val='status'">Status</a></th> + <th><a ng-click="order_val='group'">Group</a></th> + <th><a ng-click="order_val='last_check'">Last check</a></th> </tr> </thead> @@ -68,7 +68,7 @@ <pre>currentPage: {{sort|json}}</pre>--> <tbody> <tr ng-repeat="item in items | - orderBy:sort.sortingOrder:sort.reverse | + orderBy:order_val | filter:{addr:addr_filter, name:name_filter, group:group_filter} | filter:filtering_status" class={{item.status}}> <!-- group.name:group_filter --> diff --git a/views/groups.html b/views/groups.html index 76e5ef5..7db6edb 100644 --- a/views/groups.html +++ b/views/groups.html @@ -20,14 +20,16 @@ <table class="table table-striped table-hover"> <thead> <tr> - <th>Address</th> - <th>Name</th> - <th>Groups</th> + <th><a ng-click="order_val='addr'">Address</a></th> + <th><a ng-click="order_val='name'">Name</a></th> + <th><a ng-click="order_val='group'">Groups</a></th> <th><input type="checkbox" ng-model="selectedAll" ng-click="checkAll(!selectedAll)"></th> </tr> </thead> <tbody> - <tr ng-repeat="item in items | filter:{addr:addr_filter, name:name_filter, group:grp}"> <!-- group:{name:grp} --> + <tr ng-repeat="item in items | + filter:{addr:addr_filter, name:name_filter, group:grp} | + orderBy:order_val"> <!-- group:{name:grp} --> <td>{{item.addr}}</td> <td>{{item.name}}</td> <td>{{item.group}}</td> diff --git a/views/hostpage.html b/views/hostpage.html index ed8ad90..6bfcd42 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -107,7 +107,7 @@ </th> </tr> <tr ng-repeat-end - ng-repeat="(key, val) in mod" + ng-repeat="(key, val) in mod | orderBy : val" ng-show="modname != 'nmap'"> <td>{{val}}</td> <td><input type="checkbox" ng-model="subparts_checked[modname][val]"></td> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.