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
e77878bb
Commit
e77878bb
authored
Dec 20, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashfolders: on folder page, hide tabs if not has admin permission
parent
61ed0b03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
public/app/features/dashboard/acl/acl.ts
+4
-4
public/app/features/dashboard/folder_page_loader.ts
+5
-0
No files found.
public/app/features/dashboard/acl/acl.ts
View file @
e77878bb
...
@@ -90,7 +90,7 @@ export class AclCtrl {
...
@@ -90,7 +90,7 @@ export class AclCtrl {
}
}
return
this
.
backendSrv
.
post
(
`/api/dashboards/id/
${
this
.
dashboard
.
id
}
/acl`
,
{
return
this
.
backendSrv
.
post
(
`/api/dashboards/id/
${
this
.
dashboard
.
id
}
/acl`
,
{
items
:
updated
items
:
updated
,
});
});
}
}
...
@@ -169,9 +169,9 @@ export function dashAclModal() {
...
@@ -169,9 +169,9 @@ export function dashAclModal() {
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
scope
:
{
scope
:
{
dashboard
:
"="
,
dashboard
:
'='
,
meta
:
"="
meta
:
'='
,
}
}
,
};
};
}
}
...
...
public/app/features/dashboard/folder_page_loader.ts
View file @
e77878bb
...
@@ -50,15 +50,20 @@ export class FolderPageLoader {
...
@@ -50,15 +50,20 @@ export class FolderPageLoader {
});
});
dashTab
.
url
=
folderUrl
;
dashTab
.
url
=
folderUrl
;
if
(
result
.
meta
.
canAdmin
)
{
const
permTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
const
permTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
id
:
'manage-folder-permissions'
,
id
:
'manage-folder-permissions'
,
});
});
permTab
.
url
=
folderUrl
+
'/permissions'
;
permTab
.
url
=
folderUrl
+
'/permissions'
;
const
settingsTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
const
settingsTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
id
:
'manage-folder-settings'
,
id
:
'manage-folder-settings'
,
});
});
settingsTab
.
url
=
folderUrl
+
'/settings'
;
settingsTab
.
url
=
folderUrl
+
'/settings'
;
}
else
{
ctrl
.
navModel
.
main
.
children
=
[
dashTab
];
}
return
result
;
return
result
;
});
});
...
...
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