diff --git a/client/index.html b/client/index.html index 0c02623..c2d1862 100644 --- a/client/index.html +++ b/client/index.html @@ -62,8 +62,14 @@ - + + + + + + + diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js index 3534912..0767202 100644 --- a/client/js/controllers/status.js +++ b/client/js/controllers/status.js @@ -4,9 +4,19 @@ -mainApp.controller('statusCtrl', function ($scope) +mainApp.controller('statusCtrl', function ($scope,$interval) { - $scope.username="User 1"; - $scope.connection="Online"; - $scope.lastconnection="1 Septembre"; + + // Update status every 2 seconds + $interval(function(){ + var status=identity.fetchStatus(); + $scope.connection=status[0]; + $scope.username=status[1]; + $scope.lastconnection=status[2]; + }, 2000); + + + + + }); \ No newline at end of file diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index e69de29..369ce85 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -0,0 +1,15 @@ + + +// Make Namespace +var identity = {} ; + + + +// Fetch Status +identity.fetchStatus = function(){ + + // TODO + + return new Array("1", "user1", "25/02/2016"); + +} \ No newline at end of file