summaryrefslogtreecommitdiffstats
path: root/public/client.js
diff options
context:
space:
mode:
authorJan Tuomi <jan-sebastian.tuomi@aalto.fi>2016-08-14 14:40:53 +0300
committerJan Tuomi <jan-sebastian.tuomi@aalto.fi>2016-08-14 14:40:53 +0300
commitd84a59f489b7994630a1c4c94befcc7d63f08f6c (patch)
tree7aa861fb815fa6e493329035277243c62753e5a8 /public/client.js
parentfef9fcd43836ab12d4d2c178bc76ae79838abf11 (diff)
Add styles
Diffstat (limited to 'public/client.js')
-rw-r--r--public/client.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/public/client.js b/public/client.js
index 193683d..4b946f5 100644
--- a/public/client.js
+++ b/public/client.js
@@ -3,7 +3,7 @@ var statusapp = angular.module('status-app', []);
statusapp.controller('status-controller', ['$scope', '$http', function status_controller($scope, $http) {
$scope.systems = [];
- setInterval(function() {
+ var update = function() {
$http({
method: "GET",
url: "/status"
@@ -12,5 +12,8 @@ statusapp.controller('status-controller', ['$scope', '$http', function status_co
}, function errorCallback(response) {
});
- }, 5000);
+ };
+
+ setInterval(update, 5000);
+ update();
}]);