summaryrefslogtreecommitdiffstats
path: root/public/client.js
diff options
context:
space:
mode:
authorJan Tuomi <jan-sebastian.tuomi@aalto.fi>2016-08-14 14:14:24 +0300
committerJan Tuomi <jan-sebastian.tuomi@aalto.fi>2016-08-14 14:14:24 +0300
commitfef9fcd43836ab12d4d2c178bc76ae79838abf11 (patch)
treeffc0a99098ed1655bdc171e19aee41beb576dd5e /public/client.js
parentd3d9b6861dc5c6871ad138ab9f428bcdb1d61398 (diff)
Use angular for the front-end
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);
+}]);