Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
a6b08560
Commit
a6b08560
authored
Jan 26, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Worked on account update view
parent
ab7e2f89
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
10 deletions
+74
-10
src/app/controllers/sidemenuCtrl.js
+2
-0
src/app/features/account/accountCtrl.js
+29
-0
src/app/features/account/partials/account.html
+22
-4
src/app/features/account/partials/users.html
+1
-1
src/app/features/all.js
+1
-0
src/app/features/profile/partials/profile.html
+9
-4
src/app/partials/sidemenu.html
+1
-1
src/app/routes/backend/all.js
+1
-0
src/css/less/p_pro.less
+8
-0
No files found.
src/app/controllers/sidemenuCtrl.js
View file @
a6b08560
...
...
@@ -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"
},
]
}
...
...
src/app/features/account/accountCtrl.js
0 → 100644
View file @
a6b08560
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
();
});
});
src/app/features/account/partials/account.html
View file @
a6b08560
...
...
@@ -5,14 +5,32 @@
<div
class=
"dashboard-editor-header"
>
<div
class=
"dashboard-editor-title"
>
<i
class=
"fa fa-shield"
></i>
Account info
Account information
</div>
</div>
<div
class=
"dashboard-editor-body"
>
<h3>
TODO
</h3>
<div
class=
"row editor-row"
>
<div
class=
"section"
>
<form
name=
"accountForm"
>
<div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 120px"
>
<strong>
Account name
</strong>
</li>
<li>
<input
type=
"text"
required
ng-model=
"account.name"
class=
"input-xlarge tight-form-input last"
>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
</div>
<br>
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"update()"
>
Update
</button>
</form>
</div>
</div>
</div>
</div>
...
...
src/app/features/account/partials/users.html
View file @
a6b08560
...
...
@@ -5,7 +5,7 @@
<div
class=
"dashboard-editor-header"
>
<div
class=
"dashboard-editor-title"
>
<i
class=
"fa fa-users"
></i>
Account u
sers
U
sers
</div>
</div>
...
...
src/app/features/all.js
View file @
a6b08560
...
...
@@ -12,6 +12,7 @@ define([
'./account/datasourcesCtrl'
,
'./account/apiKeysCtrl'
,
'./account/importCtrl'
,
'./account/accountCtrl'
,
'./admin/adminUsersCtrl'
,
'./grafanaDatasource/datasource'
,
],
function
()
{});
src/app/features/profile/partials/profile.html
View file @
a6b08560
...
...
@@ -7,14 +7,14 @@
<div
class=
"dashboard-editor-header"
>
<div
class=
"dashboard-editor-title"
>
<i
class=
"fa fa-user"
></i>
Your info
Personal information
</div>
</div>
<div
class=
"dashboard-editor-body"
>
<div
class=
"row"
>
<form
name=
"userForm"
>
<div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
...
...
@@ -48,12 +48,14 @@
</ul>
<div
class=
"clearfix"
></div>
</div>
</div>
<br>
<button
type=
"submit"
class=
"
btn btn-success"
ng-click=
"update()"
>
Update
</button>
<button
type=
"submit"
class=
"pull-right
btn btn-success"
ng-click=
"update()"
>
Update
</button>
</form>
</div>
</div>
</div>
<div
class=
"section"
>
<div
class=
"dashboard-editor-header"
>
...
...
@@ -111,5 +113,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
src/app/partials/sidemenu.html
View file @
a6b08560
...
...
@@ -17,7 +17,7 @@
<li
ng-repeat-end
ng-if=
"item.active"
>
<ul
class=
"sidemenu-links"
>
<li
ng-repeat=
"link in item.links"
>
<a
href=
"{{link.href}}"
class=
"sidemenu-link"
><i
class=
"fa fa-angle-right"
></i>
{{link.text}}
</a>
<a
href=
"{{link.href}}"
class=
"sidemenu-link"
ng-class=
"{active: link.active}"
><i
class=
"fa fa-angle-right"
></i>
{{link.text}}
</a>
</li>
</ul>
</li>
...
...
src/app/routes/backend/all.js
View file @
a6b08560
...
...
@@ -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'
,
...
...
src/css/less/p_pro.less
View file @
a6b08560
.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 {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment