diff --git a/html/admin/js/app.js b/html/admin/js/app.js index 77ec008..595f99c 100644 --- a/html/admin/js/app.js +++ b/html/admin/js/app.js @@ -70,6 +70,26 @@ app.filter('hfcduration', function() { } }); +app.controller('statusController', function ($scope, $http) { + console.log("statusController"); + $scope.status_search = ""; + + var api = '/api/com.daplie.rvpn/status' + + $scope.updateView = function() { + $http.get(api).then(function(response) { + console.log(response); + data = response.data; + if (data.error == 'ok' ){ + $scope.status = data.result; + } + }); + } + + $scope.updateView() + +}); + app.controller('serverController', function ($scope, $http) { $scope.servers = []; $scope.servers_search = ""; diff --git a/html/admin/partials/status.html b/html/admin/partials/status.html index 5ccff84..05f4569 100644 --- a/html/admin/partials/status.html +++ b/html/admin/partials/status.html @@ -1,4 +1,4 @@ -