branch develop updated (131a4f4 -> 9a5c8da)
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 131a4f4 groups: les hôtes peuvent être retirés d'un groupe + changement du res de get_host() concernant les groupes => pb du filtre des groupes résolu new 19cf2a0 dashboard : filtre de groupes rétabli new 9a5c8da plus de millisecondes dans l'affichage des temps + changmeent du formulaire pour le paramétrage de la fréquence des check The 2 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 9a5c8dae362435a8df004c64ba53db9d1ead8dfb Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 17 17:43:29 2015 +0100 plus de millisecondes dans l'affichage des temps + changmeent du formulaire pour le paramétrage de la fréquence des check commit 19cf2a0111c54a20fbf133d12550943e76a6096c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 17 14:09:35 2015 +0100 dashboard : filtre de groupes rétabli Summary of changes: static/js/controllers/dashboardCtrl.js | 36 +++++++++++++++++++--------------- static/js/controllers/groupCtrl.js | 4 ++-- static/js/controllers/hostPageCtrl.js | 11 ++++++++--- views/dashboard.html | 6 +++--- views/groups.html | 2 +- views/hostpage.html | 16 ++++++++++++--- 6 files changed, 47 insertions(+), 28 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 19cf2a0111c54a20fbf133d12550943e76a6096c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 17 14:09:35 2015 +0100 dashboard : filtre de groupes rétabli --- static/js/controllers/dashboardCtrl.js | 36 +++++++++++++++++++--------------- static/js/controllers/groupCtrl.js | 4 ++-- views/dashboard.html | 4 ++-- views/groups.html | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/static/js/controllers/dashboardCtrl.js b/static/js/controllers/dashboardCtrl.js index 4b7a783..95ced9e 100644 --- a/static/js/controllers/dashboardCtrl.js +++ b/static/js/controllers/dashboardCtrl.js @@ -8,7 +8,23 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH $scope.gap = 5; - $scope.items = DataHosts.Items; + $scope.items = DataHosts.Items; /* [ + { + "addr":"192.168.74.1", + "name":"www.example.com", + "status":val, //"success" or "warning" or "danger" or "" + "group":[ "all", ...], + "last_check":val //UNIX time + "subscribers":{ + "uid":val, + "priority":val + } + "warning": [mod_name, ...] + "danger": [mod_name, ...] + }, + ... + ] + */ $scope.$on("hostsUpdate", function (event) { $scope.items = DataHosts.Items; @@ -112,7 +128,7 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH // $scope.groupsByAddr = {} - $scope.getGroupsByAddr = function(addr) { + /*$scope.getGroupsByAddr = function(addr) { res = "" for(var i = 0; i<$scope.items.length; i++){ if($scope.items[i].addr === addr){ @@ -122,27 +138,15 @@ mumApp.controller('dashboardCtrl', function($scope, $filter, $routeParams, DataH } } return res; - }; + };*/ $scope.allGroups = function(){ var res = [] for(var i = 0; i<$scope.items.length; i++){ for(var j = 0; j<$scope.items[i].group.length; j++){ - res.push($scope.items[i].group[j].name); + res.push($scope.items[i].group[j]); } } return res; }; - - $scope.checkAll = function(){ - if($scope.selectedAll){ - $scope.selectedAll = true; - } - else{ - $scope.selectedAll = false; - } - angular.forEach($scope.items, function(item){ - item.Selected = $scope.selectedAll; - }); - }; }); \ No newline at end of file diff --git a/static/js/controllers/groupCtrl.js b/static/js/controllers/groupCtrl.js index b9bb876..5c40294 100644 --- a/static/js/controllers/groupCtrl.js +++ b/static/js/controllers/groupCtrl.js @@ -36,7 +36,7 @@ mumApp.controller('groupCtrl', function($scope, $rootScope, $filter, $route, $ro $scope.grp = "all"; - $scope.getGroupsByAddr = function(addr) { + /*$scope.getGroupsByAddr = function(addr) { res = ""; for(var i = 0; i<$scope.items.length; i++){ if($scope.items[i].addr === addr){ @@ -44,7 +44,7 @@ mumApp.controller('groupCtrl', function($scope, $rootScope, $filter, $route, $ro } } return res; - }; + };*/ $scope.allGroups = function(){ var res = [] diff --git a/views/dashboard.html b/views/dashboard.html index 1a66eb3..0c949a6 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -65,12 +65,12 @@ <tbody> <tr ng-repeat="item in items | orderBy:sort.sortingOrder:sort.reverse | - filter:{addr:addr_filter, name:name_filter, status:status_filter}" class={{item.status}}> <!-- group.name:group_filter --> + filter:{addr:addr_filter, name:name_filter, status:status_filter, group:group_filter}" class={{item.status}}> <!-- group.name:group_filter --> <td><a href="#/hostpage/{{item.addr}}">{{item.addr}}</a></td> <td>{{item.name}}</td> <td>warning : {{item.warning}}<br/> danger : {{item.danger}}</td> - <td>{{getGroupsByAddr(item.addr)}}</td> + <td>{{item.group}}</td> <td>{{item.last_check}}</td> </tr> </tbody> diff --git a/views/groups.html b/views/groups.html index 1be9016..cfd6a3d 100644 --- a/views/groups.html +++ b/views/groups.html @@ -30,7 +30,7 @@ <tr ng-repeat="item in items | filter:{addr:addr_filter, name:name_filter, group:grp}"> <!-- group:{name:grp} --> <td>{{item.addr}}</td> <td>{{item.name}}</td> - <td>{{getGroupsByAddr(item.addr)}}</td> + <td>{{item.group}}</td> <td> <input type="checkbox" ng-model="selection[item.addr]"/> </td> -- 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 9a5c8dae362435a8df004c64ba53db9d1ead8dfb Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 17 17:43:29 2015 +0100 plus de millisecondes dans l'affichage des temps + changmeent du formulaire pour le paramétrage de la fréquence des check --- static/js/controllers/hostPageCtrl.js | 11 ++++++++--- views/dashboard.html | 2 +- views/hostpage.html | 16 +++++++++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index 506d35c..3a10a96 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -156,7 +156,9 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI */ // init fields - $scope.freq = 0; + $scope.freq_days = 0; + $scope.freq_hours = 0; + $scope.freq_minutes = 0; $scope.minor_limit_percent = 0; $scope.major_limit_percent = 0; @@ -170,7 +172,10 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI $scope.$on("resCall", function (event, args) { $scope.$apply(function(){ $scope.items = args; - $scope.freq = args.freq; + $scope.freq_days = Math.floor(args.freq / 86400); + $scope.freq_hours = Math.floor((args.freq - $scope.freq_days * 86400) / 3600); + $scope.freq_minutes = Math.floor((args.freq - ($scope.freq_days * 86400) - ($scope.freq_hours * 3600)) / 60) + if(args.unit == 'bool'){ if(args.major_limit){ $scope.limit_bool = 'major'; @@ -192,7 +197,7 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI var args = {}; args.addr_host = $scope.conf_args.addr_host; args.mod_name = $scope.conf_args.mod_name; - args.freq = $scope.freq; + args.freq = 86400 * parseInt($scope.freq_days) + 3600 * parseInt($scope.freq_hours) + 60 * parseInt($scope.freq_minutes); if($scope.items.unit == 'bool'){ args.minor_limit = ($scope.limit_bool == 'minor'); args.major_limit = ($scope.limit_bool == 'major'); diff --git a/views/dashboard.html b/views/dashboard.html index 0c949a6..da8b789 100644 --- a/views/dashboard.html +++ b/views/dashboard.html @@ -71,7 +71,7 @@ <td>warning : {{item.warning}}<br/> danger : {{item.danger}}</td> <td>{{item.group}}</td> - <td>{{item.last_check}}</td> + <td>{{item.last_check.split('.')[0]}}</td> </tr> </tbody> </table> diff --git a/views/hostpage.html b/views/hostpage.html index 15848fc..9b97661 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -21,7 +21,7 @@ <td>{{itemname}}</td> <td>{{item.value}}</td> <td>{{item.state}}</td> - <td>{{item.date}}</td> + <td>{{item.date.split('.')[0]}}</td> <td><button type="button" class="btn btn-primary btn-xs" ng-click="open_modal_conf(itemname)">Configure</button></td> <td><button type="button" class="btn btn-info btn-xs" ng-click="check(itemname)">Check now</button></td> </tr> @@ -82,8 +82,18 @@ <form> <div class="form-group"> <h3>{{conf_args.mod_name}}</h3> - <label for="freq">Frequency check (d:hh:mm)</label> - <input type="text" class="form-control" id="freq" ng-model="freq"> + <label for="freq">Frequency check: each</label> + <div class="row" id="freq"> + <div class="col-xs-2"> + <input type="number" min="0" class="form-control" ng-model="freq_days"> days + </div> + <div class="col-xs-2"> + <input type="number" min="0" max="23" class="form-control" ng-model="freq_hours"> hours + </div> + <div class="col-xs-2"> + <input type="number" min="0" max="59" class="form-control" ng-model="freq_minutes"> minutes + </div> + </div> <div ng-show="items.unit == '%'"> <label for="minor_%">Minor notification at {{minor_limit_percent}}% of charge</label> <input type="range" min="0" max="99" id="minor_%" ng-model="minor_limit_percent"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm