diff --git a/web/skins/bootstrap/js/app.js b/web/skins/bootstrap/js/app.js index 93fc48781..1a2dd7ed7 100644 --- a/web/skins/bootstrap/js/app.js +++ b/web/skins/bootstrap/js/app.js @@ -10,6 +10,9 @@ ZoneMinder.factory('Header', function($http) { return { getLogState: function(callback) { $http.get('/api/monitors.json').success(callback); + }, + getDaemonStatus: function(callback) { + $http.get('/api/host/daemonCheck.json').success(callback); } }; }); diff --git a/web/skins/bootstrap/js/controllers.js b/web/skins/bootstrap/js/controllers.js index 9d42fa6a4..778b3697e 100644 --- a/web/skins/bootstrap/js/controllers.js +++ b/web/skins/bootstrap/js/controllers.js @@ -4,6 +4,12 @@ ZoneMinder.controller('HeaderController', function($scope, Header) { Header.getLogState(function(results) { console.log(results); }); + + Header.getDaemonStatus(function(results) { + if (results.result == 1) { + $scope.isRunning = true; + } + }); }); ZoneMinder.controller('EventController', function($scope, $location, Event) { diff --git a/web/skins/bootstrap/views/header.php b/web/skins/bootstrap/views/header.php index dadb7b825..f6d45a4c3 100644 --- a/web/skins/bootstrap/views/header.php +++ b/web/skins/bootstrap/views/header.php @@ -12,7 +12,7 @@
ZoneMinder -