diff --git a/web/skins/bootstrap/js/app.js b/web/skins/bootstrap/js/app.js index c6719cf21..9c8fa7e1b 100644 --- a/web/skins/bootstrap/js/app.js +++ b/web/skins/bootstrap/js/app.js @@ -33,6 +33,15 @@ ZoneMinder.factory('Console', function($http) { }; }); + +ZoneMinder.factory('Config', function($http) { + return { + setConfigModel: function() { + return $http.get('/api/configs/keyValue.json') + }, + }; +}); + ZoneMinder.directive('angularHtmlBind', function($compile) { return function(scope, elm, attrs) { scope.$watch(attrs.angularHtmlBind, function(newValue, oldValue) { diff --git a/web/skins/bootstrap/js/controllers.js b/web/skins/bootstrap/js/controllers.js index 01a5fc3bc..747548484 100644 --- a/web/skins/bootstrap/js/controllers.js +++ b/web/skins/bootstrap/js/controllers.js @@ -45,3 +45,12 @@ ZoneMinder.controller('ConsoleController', function($scope, Console) { } }); }); + + +ZoneMinder.controller('ConfigController', function($scope, $http, Config) { + + Config.setConfigModel().then(function(results) { + $scope.myModel = {configData: results.data.keyValues}; + }); + +});