mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
small progress on adding collaborators
This commit is contained in:
parent
aa47eeffb2
commit
e5fd35db34
@ -1,5 +1,5 @@
|
||||
define([
|
||||
'./p_grafanaCtrl',
|
||||
'./pro/grafanaCtrl',
|
||||
'./dashboardCtrl',
|
||||
'./dashboardNavCtrl',
|
||||
'./row',
|
||||
|
73
src/app/partials/pro/account.html
Normal file
73
src/app/partials/pro/account.html
Normal file
@ -0,0 +1,73 @@
|
||||
<div class="navbar navbar-static-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<span class="brand">
|
||||
<a ng-click="toggleProSideMenu()">
|
||||
<img class="logo-icon" src="img/fav32.png" bs-tooltip="'Grafana'" data-placement="bottom"></img>
|
||||
</a>
|
||||
<span class="page-title">Account Settings</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-edit-view">
|
||||
|
||||
<div class="dashboard-editor-header">
|
||||
<div class="dashboard-editor-title">
|
||||
<i class="icon icon-user"></i>
|
||||
Personal information
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-editor-body">
|
||||
<div class="editor-row">
|
||||
<div class="editor-option">
|
||||
<label class="small">Name</label>
|
||||
<input type="text" class="input-xxlarge" ng-model='currentAnnotation.name' placeholder="name"></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
<div class="editor-option">
|
||||
<label class="small">Email</label>
|
||||
<input type="text" class="input-xxlarge" ng-model='currentAnnotation.name' placeholder="name"></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
<div class="editor-option">
|
||||
<label class="small">Account Name</label>
|
||||
<input type="text" class="input-xxlarge" ng-model='currentAnnotation.name' placeholder="name"></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="dashboard-editor-footer">
|
||||
<button class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-edit-view" style="border-top: solid 1px black;">
|
||||
|
||||
<div class="dashboard-editor-header">
|
||||
<div class="dashboard-editor-title">
|
||||
<i class="icon icon-eye-open"></i>
|
||||
Collaborators
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-editor-body">
|
||||
<div class="editor-row">
|
||||
<div class="editor-option">
|
||||
<form name="addCollaboratorForm" class="form-inline">
|
||||
<label class="small">Add a collaborator</label>
|
||||
<input type="text" class="input-xxlarge" ng-model='collaborator.email' placeholder="collaborator@email.com"></input>
|
||||
<button class="btn btn-success" ng-click="addCollaborator()">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<li><a href="/login?logout">Logout</a>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="pro-sidemenu-link" href="/dashboard/db/home">
|
||||
<a class="pro-sidemenu-link" href="/">
|
||||
<i class="icon-th-large"></i>
|
||||
Dashboards
|
||||
</a>
|
||||
@ -28,7 +28,7 @@
|
||||
<i class="icon-tasks"></i>
|
||||
Global options
|
||||
</a>
|
||||
<a class="pro-sidemenu-link" href="/admin">
|
||||
<a class="pro-sidemenu-link" href="/account">
|
||||
<i class="icon-user"></i>
|
||||
User accounts
|
||||
</a>
|
||||
|
@ -14,8 +14,34 @@ function (angular) {
|
||||
});
|
||||
});
|
||||
|
||||
module.config(function($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/account', {
|
||||
templateUrl: 'app/partials/pro/account.html',
|
||||
controller : 'AccountCtrl',
|
||||
});
|
||||
});
|
||||
|
||||
module.controller('AdminCtrl', function() {
|
||||
|
||||
});
|
||||
|
||||
module.controller('AccountCtrl', function($scope, $http) {
|
||||
|
||||
$scope.collaborator = {};
|
||||
|
||||
$scope.addCollaborator = function() {
|
||||
if (!$scope.addCollaboratorForm.$valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post('/api/account/collaborators/add', $scope.collaborator).then(function(results) {
|
||||
|
||||
}, function(err) {
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
define([
|
||||
'angular',
|
||||
'../controllers/p_loginCtrl',
|
||||
'../controllers/pro/loginCtrl',
|
||||
],
|
||||
function (angular) {
|
||||
"use strict";
|
||||
@ -19,13 +19,10 @@ function (angular) {
|
||||
});
|
||||
});
|
||||
|
||||
module.controller('RegisterCtrl', function($scope, $http, $location, $routeParams) {
|
||||
module.controller('RegisterCtrl', function($scope, $http, $location) {
|
||||
$scope.loginModel = {};
|
||||
$scope.grafana.sidemenu = false;
|
||||
|
||||
$scope.init = function() {
|
||||
};
|
||||
|
||||
$scope.register = function() {
|
||||
delete $scope.registerError;
|
||||
|
||||
@ -42,8 +39,6 @@ function (angular) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.init();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user