summaryrefslogtreecommitdiffstats
path: root/public/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/client.js')
-rw-r--r--public/client.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/public/client.js b/public/client.js
new file mode 100644
index 0000000..193683d
--- /dev/null
+++ b/public/client.js
@@ -0,0 +1,16 @@
+var statusapp = angular.module('status-app', []);
+
+statusapp.controller('status-controller', ['$scope', '$http', function status_controller($scope, $http) {
+ $scope.systems = [];
+
+ setInterval(function() {
+ $http({
+ method: "GET",
+ url: "/status"
+ }).then(function successCallback(response) {
+ $scope.systems = response.data;
+ }, function errorCallback(response) {
+
+ });
+ }, 5000);
+}]);