summaryrefslogtreecommitdiffstats
path: root/public/client.js
blob: 4b946f5776ba87639291056d24eb29263b9a4ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var statusapp = angular.module('status-app', []);

statusapp.controller('status-controller', ['$scope', '$http', function status_controller($scope, $http) {
    $scope.systems = [];

    var update = function() {
        $http({
            method: "GET",
            url: "/status"
        }).then(function successCallback(response) {
            $scope.systems = response.data;
        }, function errorCallback(response) {

        });
    };
    
    setInterval(update, 5000);
    update();
}]);