branch develop updated (4d7d99f -> 16c9ac0)
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 4d7d99f hostpage : detection (ràf mettre en forme) new 16c9ac0 hostpage : OK pour l'affichage des données The 1 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 16c9ac02ff627e4cf35896852d5bc246e859d7d1 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 3 11:19:38 2015 +0100 hostpage : OK pour l'affichage des données Summary of changes: app/modules/storage_modules/shelve_db.py | 2 -- static/js/controllers/hostPageCtrl.js | 6 ++-- views/hostpage.html | 62 +++++++++++++++++++++----------- views/index.html | 2 +- 4 files changed, 44 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 16c9ac02ff627e4cf35896852d5bc246e859d7d1 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Tue Mar 3 11:19:38 2015 +0100 hostpage : OK pour l'affichage des données --- app/modules/storage_modules/shelve_db.py | 2 -- static/js/controllers/hostPageCtrl.js | 6 ++-- views/hostpage.html | 62 +++++++++++++++++++++----------- views/index.html | 2 +- 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/app/modules/storage_modules/shelve_db.py b/app/modules/storage_modules/shelve_db.py index 9cfac2a..361cb1b 100644 --- a/app/modules/storage_modules/shelve_db.py +++ b/app/modules/storage_modules/shelve_db.py @@ -298,11 +298,9 @@ class shelve_db: res['monitoring'] = {} for mod in self.db['hosts'][addr_host]['monitoring']: res['monitoring'][mod] = self.db['hosts'][addr_host]['monitoring'][mod] - res['monitoring'][mod]['name'] = mod res['detected'] = {} for mod in self.db['hosts'][addr_host]['detected']: res['detected'][mod] = json.loads(self.db['hosts'][addr_host]['detected'][mod]) - res['detected'][mod]['name'] = mod res['custom_infos'] = self.db['hosts'][addr_host]['conf']['custom_info'] res['interventions'] = self.db['hosts'][addr_host]['conf']['interventions'] except Exception as e: diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index d5ad3ef..ec4dce0 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -1,4 +1,4 @@ -mumApp.controller('hostPageCtrl', function($scope, $rootScope, $routeParams, DataHosts) { +mumApp.controller('hostPageCtrl', function($scope, $rootScope, $routeParams) { $scope.host_informations = null; $scope.addr_host = $routeParams.param @@ -15,7 +15,5 @@ mumApp.controller('hostPageCtrl', function($scope, $rootScope, $routeParams, Dat }); }); - $scope.toto = function(item){ - return(Object.keys($scope.items.detected)); - } + }); \ No newline at end of file diff --git a/views/hostpage.html b/views/hostpage.html index aaa6588..3469968 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -18,8 +18,8 @@ </thead> <tbody> - <tr ng-repeat="item in items.monitoring" class={{item.state}}> - <td>{{item.name}}</td> + <tr ng-repeat="(itemname, item) in items.monitoring" class={{item.state}}> + <td>{{itemname}}</td> <td>{{item.value}}</td> <td>{{item.state}}</td> <td>{{item.date}}</td> @@ -35,11 +35,29 @@ </tbody> </table> <h2>Detected Configuration</h2> - <div ng-repeat="mod in items.detected"> - <h3>{{mod.name}}</h3> + <!--<div ng-repeat-start="(modname, mod) in items.detected"> + <h3>{{modname}}</h3> + <table class="table table-bordered table-hover"> + <tbody> + <tr> + <th ng-repeat-end + ng-repeat="(key,val) in mod">{{key}}</th> + </tr> + </tbody> + </table> {{mod}} - </div> + </div>--> + <table class="table table-bordered table-hover"> + <tr ng-repeat-start="(modname, mod) in items.detected"> + <th>{{modname}}</th> + </tr> + <tr ng-repeat-end + ng-repeat="(key, val) in mod"> + <td>{{key}}</td> + <td>{{val}}</td> + </tr> + </table> <h2>Custom informations</h2> @@ -49,22 +67,24 @@ <h2>Interventions done</h2> <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#modal_interv">Add a new intervention</button> - <table class="table table-bordered table-hover"> - <thead> - <tr> - <th>Date </th> - <th>Person </th> - <th>Details </th> - </tr> - </thead> - <tbody> - <tr ng-repeat="interv in items.interventions"> - <td>{{interv.date}}</td> - <td>{{interv.person}}</td> - <td>{{interv.details}}</td> - </tr> - </tbody> - </table> + <div ng-show="items.interventions != ''"> + <table class="table table-bordered table-hover"> + <thead> + <tr> + <th>Date </th> + <th>Person </th> + <th>Details </th> + </tr> + </thead> + <tbody> + <tr ng-repeat="interv in items.interventions"> + <td>{{interv.date}}</td> + <td>{{interv.person}}</td> + <td>{{interv.details}}</td> + </tr> + </tbody> + </table> + </div> diff --git a/views/index.html b/views/index.html index 56cec09..a1a5a60 100644 --- a/views/index.html +++ b/views/index.html @@ -45,7 +45,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="dashboard.html">Mum</a> + <a class="navbar-brand" href="#dashboard.html">Mum</a> <p class="navbar-text navbar-left"><a href="#dashboard/success" style="color:green">OK : {{stateNumber()[0]}}</a></p> <p class="navbar-text navbar-left"><a href="#dashboard/warning" style="color:orange">Warning : {{stateNumber()[1]}}</a></p> <p class="navbar-text navbar-left"><a href="#dashboard/danger" style="color:red">KO : {{stateNumber()[2]}}</a></p> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm