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>.