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
7e13d0f7
Commit
7e13d0f7
authored
Jan 16, 2018
by
Johannes Schill
Committed by
Daniel Lee
Jan 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashfolders: Always get dashboardid and backendsrv from props #10275
parent
3490c446
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
public/app/core/components/Permissions/Permissions.tsx
+4
-7
No files found.
public/app/core/components/Permissions/Permissions.tsx
View file @
7e13d0f7
...
@@ -53,7 +53,6 @@ class PermissionsInner extends Component<IProps, any> {
...
@@ -53,7 +53,6 @@ class PermissionsInner extends Component<IProps, any> {
items
:
DashboardAcl
[];
items
:
DashboardAcl
[];
dummyItems
:
DashboardAcl
[];
dummyItems
:
DashboardAcl
[];
permissionOptions
=
[{
value
:
1
,
text
:
'View'
},
{
value
:
2
,
text
:
'Edit'
},
{
value
:
4
,
text
:
'Admin'
}];
permissionOptions
=
[{
value
:
1
,
text
:
'View'
},
{
value
:
2
,
text
:
'Edit'
},
{
value
:
4
,
text
:
'Admin'
}];
backendSrv
:
any
;
aclTypes
=
[
aclTypes
=
[
{
value
:
'Group'
,
text
:
'Team'
},
{
value
:
'Group'
,
text
:
'Team'
},
{
value
:
'User'
,
text
:
'User'
},
{
value
:
'User'
,
text
:
'User'
},
...
@@ -69,15 +68,13 @@ class PermissionsInner extends Component<IProps, any> {
...
@@ -69,15 +68,13 @@ class PermissionsInner extends Component<IProps, any> {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
const
{
dashboardId
,
backendSrv
,
permissions
}
=
this
.
props
;
const
{
dashboardId
,
permissions
}
=
this
.
props
;
this
.
dashboardId
=
dashboardId
;
this
.
backendSrv
=
backendSrv
;
this
.
permissionChanged
=
this
.
permissionChanged
.
bind
(
this
);
this
.
permissionChanged
=
this
.
permissionChanged
.
bind
(
this
);
this
.
typeChanged
=
this
.
typeChanged
.
bind
(
this
);
this
.
typeChanged
=
this
.
typeChanged
.
bind
(
this
);
this
.
removeItem
=
this
.
removeItem
.
bind
(
this
);
this
.
removeItem
=
this
.
removeItem
.
bind
(
this
);
this
.
update
=
this
.
update
.
bind
(
this
);
this
.
update
=
this
.
update
.
bind
(
this
);
permissions
.
load
(
this
.
dashboardId
);
permissions
.
load
(
dashboardId
);
this
.
state
=
{
this
.
state
=
{
newType
:
'Group'
,
newType
:
'Group'
,
...
@@ -119,10 +116,10 @@ class PermissionsInner extends Component<IProps, any> {
...
@@ -119,10 +116,10 @@ class PermissionsInner extends Component<IProps, any> {
typeChanged
(
evt
)
{
typeChanged
(
evt
)
{
const
{
value
}
=
evt
.
target
;
const
{
value
}
=
evt
.
target
;
const
{
permissions
}
=
this
.
props
;
const
{
permissions
,
dashboardId
}
=
this
.
props
;
if
(
value
===
'Viewer'
||
value
===
'Editor'
)
{
if
(
value
===
'Viewer'
||
value
===
'Editor'
)
{
permissions
.
addStoreItem
({
permission
:
1
,
role
:
value
,
dashboardId
:
this
.
dashboardId
},
this
.
dashboardId
);
permissions
.
addStoreItem
({
permission
:
1
,
role
:
value
,
dashboardId
:
dashboardId
},
dashboardId
);
this
.
resetNewType
();
this
.
resetNewType
();
return
;
return
;
}
}
...
...
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