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 86ac6c3eeed2f08162565d74635ac91241769608 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Mar 13 11:04:15 2015 +0100 reload de hostpage après changement + suppr warning au lancement de l'appli --- app/app.py | 3 --- app/modules/connection_modules/ssh.py | 1 - static/js/controllers/hostPageCtrl.js | 18 +++++++++--------- views/hostpage.html | 3 ++- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/app.py b/app/app.py index 2bfb16b..36c9804 100755 --- a/app/app.py +++ b/app/app.py @@ -12,9 +12,6 @@ from module_loader import ModuleLoader import process_monitoring from modules.notification_modules.websocket_container import WebSocketContainer -wsc = None -ml = None - # Pour lancer la detection nmap avec un nouveau thread class ThreadDetect(threading.Thread): def __init__(self, param, opt, ml, ws): diff --git a/app/modules/connection_modules/ssh.py b/app/modules/connection_modules/ssh.py index 9ae2530..f58dfcc 100644 --- a/app/modules/connection_modules/ssh.py +++ b/app/modules/connection_modules/ssh.py @@ -7,7 +7,6 @@ def get_class_name(): class SSH: def __init__(self, addr_host, params, key_loc, cnfe): - print params self.parameters = {"username": "string", "password": "string", "private_key": "file", "port": "int"} self.name = get_class_name() self.addr_host = addr_host diff --git a/static/js/controllers/hostPageCtrl.js b/static/js/controllers/hostPageCtrl.js index e7a55e7..506d35c 100644 --- a/static/js/controllers/hostPageCtrl.js +++ b/static/js/controllers/hostPageCtrl.js @@ -142,7 +142,7 @@ mumApp.controller('hostPageCtrl', function($scope, $rootScope, $routeParams, $mo // modals controllers -mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalInstance, $location, conf_args) { +mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalInstance, $route, conf_args) { $scope.conf_args = conf_args; // {'addr_host' : val, 'mod_name', val} $rootScope.$broadcast("sendViaWs", JSON.stringify({"CALL_FUNC_DB": {'func': 'get_conf_mod', 'args': conf_args}})); @@ -209,7 +209,7 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI $modalInstance.close(); - $location.path('#hostpage/' + $scope.conf_args['addr_host']); + $route.reload(); }; $scope.cancel = function () { @@ -217,11 +217,11 @@ mumApp.controller('ModalConfInstanceCtrl', function ($scope, $rootScope, $modalI }; }); -mumApp.controller('ModalIntervInstanceCtrl', function ($scope, $rootScope, $modalInstance, $filter, $location, interv_args) { +mumApp.controller('ModalIntervInstanceCtrl', function ($scope, $rootScope, $modalInstance, $filter, $route, interv_args) { $scope.interv_args = interv_args; // {'addr_host' : val} $scope.user = ''; - $scope.date = $filter('date')(new Date(), 'yyyy-MM-dd hh:mm'); + $scope.date = $filter('date')(new Date(), 'yyyy-MM-dd HH:mm'); $scope.details = ''; $scope.ok = function () { @@ -235,7 +235,7 @@ mumApp.controller('ModalIntervInstanceCtrl', function ($scope, $rootScope, $moda $modalInstance.close(); - $location.path('#hostpage/' + $scope.interv_args['addr_host']); + $route.reload(); }; $scope.cancel = function () { @@ -243,7 +243,7 @@ mumApp.controller('ModalIntervInstanceCtrl', function ($scope, $rootScope, $moda }; }); -mumApp.controller('ModalConnInstanceCtrl', function ($scope, $rootScope, $modalInstance, $modal, $location, conn_args) { +mumApp.controller('ModalConnInstanceCtrl', function ($scope, $rootScope, $modalInstance, $modal, $route, conn_args) { $scope.conn_args = conn_args; // {'addr_host' : val} $scope.current_config = {}; @@ -281,7 +281,7 @@ mumApp.controller('ModalConnInstanceCtrl', function ($scope, $rootScope, $modalI $modalInstance.close(); - $location.path('#hostpage/' + $scope.conn_args['addr_host']); + $route.reload(); }; $scope.cancel = function () { @@ -384,7 +384,7 @@ mumApp.controller('ModalConfConnInstanceCtrl', function ($scope, $rootScope, $mo }; }); -mumApp.controller('ModalBlockInstanceCtrl', function ($scope, $rootScope, $modalInstance, $location, block_args) { +mumApp.controller('ModalBlockInstanceCtrl', function ($scope, $rootScope, $modalInstance, $route, block_args) { $scope.block_args = block_args; /* {'addr_host': val, 'activated_mod':{ mod_name: bool @@ -462,7 +462,7 @@ mumApp.controller('ModalBlockInstanceCtrl', function ($scope, $rootScope, $modal $modalInstance.close(); - $location.path('#hostpage/' + $scope.block_args['addr_host']); + $route.reload(); }; $scope.cancel = function () { diff --git a/views/hostpage.html b/views/hostpage.html index e6a730f..31f2734 100644 --- a/views/hostpage.html +++ b/views/hostpage.html @@ -62,7 +62,8 @@ </tr> </thead> <tbody> - <tr ng-repeat="interv in items.interventions"> + <tr ng-repeat="interv in items.interventions | + orderBy:'-date'"> <td>{{interv.date}}</td> <td>{{interv.username}}</td> <td>{{interv.details}}</td> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.