diff --git a/src/app/controllers/sidemenuCtrl.js b/src/app/controllers/sidemenuCtrl.js index 355783653cf..10b73e2458a 100644 --- a/src/app/controllers/sidemenuCtrl.js +++ b/src/app/controllers/sidemenuCtrl.js @@ -33,6 +33,7 @@ function (angular, _, $, config) { text: "Account", href: $scope.getUrl("/account"), icon: "fa fa-shield", links: [ + { text: 'Info', href: $scope.getUrl("/account"), icon: "fa fa-sitemap" }, { text: 'Data sources', href: $scope.getUrl("/account/datasources"), icon: "fa fa-sitemap" }, { text: 'Users', href: $scope.getUrl("/account/users"), icon: "fa fa-users" }, { text: 'API Keys', href: $scope.getUrl("/account/apikeys"), icon: "fa fa-key" }, @@ -42,6 +43,7 @@ function (angular, _, $, config) { text: "Profile", href: $scope.getUrl("/profile"), icon: "fa fa-user", links: [ + { text: 'Info', href: $scope.getUrl("/profile"), icon: "fa fa-sitemap" }, { text: 'Password', href:"", icon: "fa fa-lock" }, ] } diff --git a/src/app/features/account/accountCtrl.js b/src/app/features/account/accountCtrl.js new file mode 100644 index 00000000000..8d4130bda03 --- /dev/null +++ b/src/app/features/account/accountCtrl.js @@ -0,0 +1,29 @@ +define([ + 'angular', +], +function (angular) { + 'use strict'; + + var module = angular.module('grafana.controllers'); + + module.controller('AccountCtrl', function($scope, $http, backendSrv) { + + $scope.init = function() { + $scope.getAccount(); + }; + + $scope.getAccount = function() { + backendSrv.get('/api/account').then(function(account) { + $scope.account = account; + }); + }; + + $scope.update = function() { + if (!$scope.accountForm.$valid) { return; } + backendSrv.put('/api/account', $scope.account).then($scope.getAccount); + }; + + $scope.init(); + + }); +}); diff --git a/src/app/features/account/partials/account.html b/src/app/features/account/partials/account.html index f45138b9736..5465d0c7094 100644 --- a/src/app/features/account/partials/account.html +++ b/src/app/features/account/partials/account.html @@ -5,14 +5,32 @@
- Account info + Account information
- -

TODO

- +
+
+
+
+
+
    +
  • + Account name +
  • +
  • + +
  • +
+
+
+
+
+ +
+
+
diff --git a/src/app/features/account/partials/users.html b/src/app/features/account/partials/users.html index 9b54b33fea8..819e5ef76ba 100644 --- a/src/app/features/account/partials/users.html +++ b/src/app/features/account/partials/users.html @@ -5,7 +5,7 @@
- Account users + Users
diff --git a/src/app/features/all.js b/src/app/features/all.js index 54946bb0fc2..de8e1ac3a32 100644 --- a/src/app/features/all.js +++ b/src/app/features/all.js @@ -12,6 +12,7 @@ define([ './account/datasourcesCtrl', './account/apiKeysCtrl', './account/importCtrl', + './account/accountCtrl', './admin/adminUsersCtrl', './grafanaDatasource/datasource', ], function () {}); diff --git a/src/app/features/profile/partials/profile.html b/src/app/features/profile/partials/profile.html index 2f5df6146ed..800062c8453 100644 --- a/src/app/features/profile/partials/profile.html +++ b/src/app/features/profile/partials/profile.html @@ -7,51 +7,53 @@
- Your info + Personal information
+
+
+
+
+
    +
  • + Name +
  • +
  • + +
  • +
+
+
+
+
    +
  • + Email +
  • +
  • + +
  • +
+
+
+
+
    +
  • + Username +
  • +
  • + +
  • +
+
+
+
- - -
-
    -
  • - Name -
  • -
  • - -
  • -
-
-
-
-
    -
  • - Email -
  • -
  • - -
  • -
-
-
-
-
    -
  • - Username -
  • -
  • - -
  • -
-
-
- -
- -
+
+ + +
@@ -59,7 +61,7 @@
- Your accounts + Your accounts

@@ -87,7 +89,7 @@
- Add account + Add account

@@ -111,5 +113,8 @@ + + + diff --git a/src/app/partials/sidemenu.html b/src/app/partials/sidemenu.html index 980ed6b897e..0ba9c642686 100644 --- a/src/app/partials/sidemenu.html +++ b/src/app/partials/sidemenu.html @@ -17,7 +17,7 @@
  • diff --git a/src/app/routes/backend/all.js b/src/app/routes/backend/all.js index e52abb47f41..f97ca90ba04 100644 --- a/src/app/routes/backend/all.js +++ b/src/app/routes/backend/all.js @@ -32,6 +32,7 @@ define([ }) .when('/account', { templateUrl: 'app/features/account/partials/account.html', + controller : 'AccountCtrl', }) .when('/account/datasources', { templateUrl: 'app/features/account/partials/datasources.html', diff --git a/src/css/less/p_pro.less b/src/css/less/p_pro.less index b3d65e9acc5..678c2fba064 100644 --- a/src/css/less/p_pro.less +++ b/src/css/less/p_pro.less @@ -1,5 +1,8 @@ .pro-sidemenu { display: none; + a:focus { + text-decoration: none; + } } .pro-sidemenu-open { @@ -50,9 +53,14 @@ display: block; padding: 6px 0 6px 30px; font-size: 15px; + color: @gray; i { padding-right: 15px; } + &.active { + color: white; + font-weight: bold; + } } .sidemenu-user {