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
e1d078f2
Commit
e1d078f2
authored
Feb 25, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final frontend changes for account -> org rename
parent
563d5e3a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
26 deletions
+24
-26
src/app/features/admin/adminSettingsCtrl.js
+0
-1
src/app/features/admin/adminUsersCtrl.js
+0
-1
src/app/features/org/datasourceEditCtrl.js
+2
-2
src/app/features/org/orgDetailsCtrl.js
+2
-2
src/app/features/profile/partials/profile.html
+10
-10
src/app/features/profile/profileCtrl.js
+9
-9
src/app/services/contextSrv.js
+1
-1
No files found.
src/app/features/admin/adminSettingsCtrl.js
View file @
e1d078f2
...
...
@@ -9,7 +9,6 @@ function (angular) {
module
.
controller
(
'AdminSettingsCtrl'
,
function
(
$scope
,
backendSrv
)
{
$scope
.
init
=
function
()
{
$scope
.
accounts
=
[];
$scope
.
getUsers
();
};
...
...
src/app/features/admin/adminUsersCtrl.js
View file @
e1d078f2
...
...
@@ -9,7 +9,6 @@ function (angular) {
module
.
controller
(
'AdminUsersCtrl'
,
function
(
$scope
,
backendSrv
)
{
$scope
.
init
=
function
()
{
$scope
.
accounts
=
[];
$scope
.
getUsers
();
};
...
...
src/app/features/org/datasourceEditCtrl.js
View file @
e1d078f2
...
...
@@ -54,7 +54,7 @@ function (angular) {
backendSrv
.
post
(
'/api/datasources'
,
$scope
.
current
).
then
(
function
()
{
$scope
.
updateFrontendSettings
();
$location
.
path
(
"
account/
datasources"
);
$location
.
path
(
"datasources"
);
});
};
...
...
@@ -65,7 +65,7 @@ function (angular) {
backendSrv
.
put
(
'/api/datasources'
,
$scope
.
current
).
then
(
function
()
{
$scope
.
updateFrontendSettings
();
$location
.
path
(
"
account/
datasources"
);
$location
.
path
(
"datasources"
);
});
};
...
...
src/app/features/org/orgDetailsCtrl.js
View file @
e1d078f2
...
...
@@ -13,8 +13,8 @@ function (angular) {
};
$scope
.
getOrgInfo
=
function
()
{
backendSrv
.
get
(
'/api/org'
).
then
(
function
(
account
)
{
$scope
.
org
=
account
;
backendSrv
.
get
(
'/api/org'
).
then
(
function
(
org
)
{
$scope
.
org
=
org
;
});
};
...
...
src/app/features/profile/partials/profile.html
View file @
e1d078f2
...
...
@@ -51,34 +51,34 @@
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"update()"
>
Update
</button>
</form>
<h2>
Your
account
s
</h2>
<h2>
Your
Organization
s
</h2>
<table
class=
"grafana-options-table"
>
<tr
ng-repeat=
"
ac in account
s"
>
<td
style=
"width: 98%"
><strong>
Name:
</strong>
{{
ac
.name}}
</td>
<td><strong>
Role:
</strong>
{{
ac
.role}}
</td>
<tr
ng-repeat=
"
org in org
s"
>
<td
style=
"width: 98%"
><strong>
Name:
</strong>
{{
org
.name}}
</td>
<td><strong>
Role:
</strong>
{{
org
.role}}
</td>
<td
class=
"nobg max-width-btns"
>
<span
class=
"btn btn-primary"
ng-show=
"
ac
.isUsing"
>
<span
class=
"btn btn-primary"
ng-show=
"
org
.isUsing"
>
Current
</span>
<a
ng-click=
"setUsing
Account(ac)"
class=
"btn btn-inverse"
ng-show=
"!ac
.isUsing"
>
<a
ng-click=
"setUsing
Org(org)"
class=
"btn btn-inverse"
ng-show=
"!org
.isUsing"
>
Select
</a>
</td>
</tr>
</table>
<h2
style=
"margin-top: 30px;"
>
Add
account
</h2>
<h2
style=
"margin-top: 30px;"
>
Add
Organization
</h2>
<form
name=
"form"
>
<div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px;"
>
<strong>
Account
name
</strong>
<strong>
Org.
name
</strong>
</li>
<li>
<input
type=
"text"
ng-model=
"new
Account.name"
required
class=
"input-xxlarge tight-form-input last"
placeholder=
"account
name"
>
<input
type=
"text"
ng-model=
"new
Org.name"
required
class=
"input-xxlarge tight-form-input last"
placeholder=
"organization
name"
>
</li>
<li>
</li>
...
...
@@ -87,7 +87,7 @@
</div>
</div>
<br>
<button
class=
"btn btn-success pull-right"
ng-click=
"create
Account
()"
>
Create
</button>
<button
class=
"btn btn-success pull-right"
ng-click=
"create
Org
()"
>
Create
</button>
</form>
</div>
...
...
src/app/features/profile/profileCtrl.js
View file @
e1d078f2
...
...
@@ -9,11 +9,11 @@ function (angular, config) {
module
.
controller
(
'ProfileCtrl'
,
function
(
$scope
,
backendSrv
)
{
$scope
.
new
Account
=
{
name
:
''
};
$scope
.
new
Org
=
{
name
:
''
};
$scope
.
init
=
function
()
{
$scope
.
getUser
();
$scope
.
getUser
Account
s
();
$scope
.
getUser
Org
s
();
};
$scope
.
getUser
=
function
()
{
...
...
@@ -22,14 +22,14 @@ function (angular, config) {
});
};
$scope
.
getUser
Account
s
=
function
()
{
backendSrv
.
get
(
'/api/user/
accounts'
).
then
(
function
(
account
s
)
{
$scope
.
accounts
=
account
s
;
$scope
.
getUser
Org
s
=
function
()
{
backendSrv
.
get
(
'/api/user/
orgs'
).
then
(
function
(
org
s
)
{
$scope
.
orgs
=
org
s
;
});
};
$scope
.
setUsing
Account
=
function
(
account
)
{
backendSrv
.
post
(
'/api/user/using/'
+
account
.
account
Id
).
then
(
function
()
{
$scope
.
setUsing
Org
=
function
(
org
)
{
backendSrv
.
post
(
'/api/user/using/'
+
org
.
org
Id
).
then
(
function
()
{
window
.
location
.
href
=
config
.
appSubUrl
+
'/profile'
;
});
};
...
...
@@ -39,8 +39,8 @@ function (angular, config) {
backendSrv
.
put
(
'/api/user/'
,
$scope
.
user
);
};
$scope
.
create
Account
=
function
()
{
backendSrv
.
post
(
'/api/
account/'
,
$scope
.
newAccount
).
then
(
$scope
.
getUserAccount
s
);
$scope
.
create
Org
=
function
()
{
backendSrv
.
post
(
'/api/
org/'
,
$scope
.
newOrg
).
then
(
$scope
.
getUserOrg
s
);
};
$scope
.
init
();
...
...
src/app/services/contextSrv.js
View file @
e1d078f2
...
...
@@ -28,7 +28,7 @@ function (angular, _, store) {
});
this
.
hasRole
=
function
(
role
)
{
return
this
.
user
.
account
Role
===
role
;
return
this
.
user
.
org
Role
===
role
;
};
this
.
setSideMenuState
=
function
(
state
)
{
...
...
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