diff --git a/src/app/controllers/sideMenuCtrl.js b/src/app/controllers/sideMenuCtrl.js new file mode 100644 index 00000000000..89e852e7e46 --- /dev/null +++ b/src/app/controllers/sideMenuCtrl.js @@ -0,0 +1,40 @@ +define([ + 'angular', + 'config', +], +function (angular, config) { + 'use strict'; + + var module = angular.module('grafana.controllers'); + + module.controller('SideMenuCtrl', function($scope) { + + $scope.menu = [ + { + href: config.appSubUrl, + text: 'Dashboards', + icon: 'fa fa-th-large' + }, + { + href: 'panels', + text: 'Panels', + icon: 'fa fa-signal', + }, + { + href: 'alerts', + text: 'Alerts', + icon: 'fa fa-bolt', + }, + { + href: 'account', + text: 'Account', + icon: 'fa fa-user', + }, + ]; + + $scope.init = function() { + }; + + }); + +}); diff --git a/src/app/features/admin/accountsCtrl.js b/src/app/features/admin/accountsCtrl.js new file mode 100644 index 00000000000..9be27e719a5 --- /dev/null +++ b/src/app/features/admin/accountsCtrl.js @@ -0,0 +1,26 @@ +define([ + 'angular', +], +function (angular) { + 'use strict'; + + var module = angular.module('grafana.controllers'); + + module.controller('AccountsCtrl', function($scope, backendSrv) { + + $scope.init = function() { + $scope.accounts = []; + $scope.getAccounts(); + }; + + $scope.getAccounts = function() { + backendSrv.get('/api/admin/accounts').then(function(accounts) { + console.log(accounts); + $scope.accounts = accounts; + }); + }; + + $scope.init(); + + }); +}); diff --git a/src/app/features/admin/partials/accounts.html b/src/app/features/admin/partials/accounts.html new file mode 100644 index 00000000000..ffd6c701582 --- /dev/null +++ b/src/app/features/admin/partials/accounts.html @@ -0,0 +1,37 @@ +
+ +Id | +Login | +Name | +Admin | ++ | |
---|---|---|---|---|---|
{{account.id}} | +{{account.login}} | +{{account.email}} | +{{account.name}} | +{{account.isAdmin}} | ++ + + Edit + + + + + + | +