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 6ce6fa1c3cefc854596fe25cc8d256e17306d10e Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Feb 27 12:02:54 2015 +0100 l'url détermine l'adresse du websocket dans le controlleur --- README | 3 +++ app/modules/monitoring_modules/ping.py | 2 -- static/js/controllers/mainCtrl.js | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README b/README index 1bcbfb2..8de8cb8 100644 --- a/README +++ b/README @@ -21,6 +21,9 @@ This program needs python 2.7: (as root) apt-get install python2.7 apt-get install python2.7-dev +You need also Virtualenv: +sudo pip install virtualenv + Install python dependancies (needs Pip): ./boostrap.sh diff --git a/app/modules/monitoring_modules/ping.py b/app/modules/monitoring_modules/ping.py index 7c3600a..de8f68b 100644 --- a/app/modules/monitoring_modules/ping.py +++ b/app/modules/monitoring_modules/ping.py @@ -19,9 +19,7 @@ class ping: res_check = res == "1" except pexpect.EOF: res_check = False - #self.db.add_check(self.addr_host, "ping", res_check) except pexpect.TIMEOUT: res_check = False - #self.db.add_check(self.addr_host, "ping", False) finally: self.db.add_check(self.addr_host, "ping", res_check) \ No newline at end of file diff --git a/static/js/controllers/mainCtrl.js b/static/js/controllers/mainCtrl.js index 452e6c3..79ca4a8 100644 --- a/static/js/controllers/mainCtrl.js +++ b/static/js/controllers/mainCtrl.js @@ -55,8 +55,12 @@ mumApp.config(function($routeProvider){ }); }); -mumApp.controller('mainController', ['$scope', 'toastr', '$interval', '$filter', '$routeParams', - function($scope, toastr, $interval, $filter, $routeParams) { +/*mumApp.config(function($locationProvider)){ + $locationProvider.html5Mode(false).hashPrefix("!"); +});*/ + +mumApp.controller('mainController', ['$scope', 'toastr', '$interval', '$filter', '$routeParams', '$location', + function($scope, toastr, $interval, $filter, $routeParams, $location) { // init $scope.master = {}; @@ -110,7 +114,7 @@ mumApp.controller('mainController', ['$scope', 'toastr', '$interval', '$filter', }*/ // Concerning WebSocket - var ws = new WebSocket("ws://0.0.0.0:1337/websocket"); + var ws = new WebSocket("ws://" + $location.host() + ":1337/websocket"); ws.onopen = function() { var request = '{"14" : ""}'; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.