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
8b076d92
Commit
8b076d92
authored
Apr 03, 2018
by
Patrick O'Carroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for avatar on adding permission and size for gicon
parent
32264c61
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
public/app/core/components/Permissions/AddPermissions.tsx
+1
-1
public/app/core/components/Permissions/DisabledPermissionsListItem.tsx
+1
-1
public/app/core/components/Permissions/PermissionsListItem.tsx
+1
-1
public/app/stores/PermissionsStore/PermissionsStore.ts
+5
-1
No files found.
public/app/core/components/Permissions/AddPermissions.tsx
View file @
8b076d92
...
@@ -39,7 +39,7 @@ class AddPermissions extends Component<IProps, any> {
...
@@ -39,7 +39,7 @@ class AddPermissions extends Component<IProps, any> {
permissions
.
newItem
.
setUser
(
null
,
null
);
permissions
.
newItem
.
setUser
(
null
,
null
);
return
;
return
;
}
}
return
permissions
.
newItem
.
setUser
(
user
.
id
,
user
.
login
);
return
permissions
.
newItem
.
setUser
(
user
.
id
,
user
.
login
,
user
.
avatarUrl
);
}
}
teamPicked
(
team
:
Team
)
{
teamPicked
(
team
:
Team
)
{
...
...
public/app/core/components/Permissions/DisabledPermissionsListItem.tsx
View file @
8b076d92
...
@@ -13,7 +13,7 @@ export default class DisabledPermissionListItem extends Component<IProps, any> {
...
@@ -13,7 +13,7 @@ export default class DisabledPermissionListItem extends Component<IProps, any> {
return
(
return
(
<
tr
className=
"gf-form-disabled"
>
<
tr
className=
"gf-form-disabled"
>
<
td
style=
{
{
width
:
'1%'
}
}
>
<
td
style=
{
{
width
:
'1%'
}
}
>
<
i
style=
{
{
width
:
'25px'
}
}
className=
"gicon gicon-shield"
/>
<
i
style=
{
{
width
:
'25px'
,
fontSize
:
'1.5rem'
}
}
className=
"gicon gicon-shield"
/>
</
td
>
</
td
>
<
td
style=
{
{
width
:
'90%'
}
}
>
<
td
style=
{
{
width
:
'90%'
}
}
>
{
item
.
name
}
{
item
.
name
}
...
...
public/app/core/components/Permissions/PermissionsListItem.tsx
View file @
8b076d92
...
@@ -28,6 +28,7 @@ function ItemDescription({ item }) {
...
@@ -28,6 +28,7 @@ function ItemDescription({ item }) {
}
}
export
default
observer
(({
item
,
removeItem
,
permissionChanged
,
itemIndex
,
folderInfo
})
=>
{
export
default
observer
(({
item
,
removeItem
,
permissionChanged
,
itemIndex
,
folderInfo
})
=>
{
console
.
log
(
item
);
const
handleRemoveItem
=
evt
=>
{
const
handleRemoveItem
=
evt
=>
{
evt
.
preventDefault
();
evt
.
preventDefault
();
removeItem
(
itemIndex
);
removeItem
(
itemIndex
);
...
@@ -38,7 +39,6 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
...
@@ -38,7 +39,6 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
};
};
const
inheritedFromRoot
=
item
.
dashboardId
===
-
1
&&
folderInfo
&&
folderInfo
.
id
===
0
;
const
inheritedFromRoot
=
item
.
dashboardId
===
-
1
&&
folderInfo
&&
folderInfo
.
id
===
0
;
console
.
log
(
item
.
name
);
return
(
return
(
<
tr
className=
{
setClassNameHelper
(
item
.
inherited
)
}
>
<
tr
className=
{
setClassNameHelper
(
item
.
inherited
)
}
>
...
...
public/app/stores/PermissionsStore/PermissionsStore.ts
View file @
8b076d92
...
@@ -30,6 +30,7 @@ export const NewPermissionsItem = types
...
@@ -30,6 +30,7 @@ export const NewPermissionsItem = types
),
),
userId
:
types
.
maybe
(
types
.
number
),
userId
:
types
.
maybe
(
types
.
number
),
userLogin
:
types
.
maybe
(
types
.
string
),
userLogin
:
types
.
maybe
(
types
.
string
),
userAvatarUrl
:
types
.
maybe
(
types
.
string
),
teamId
:
types
.
maybe
(
types
.
number
),
teamId
:
types
.
maybe
(
types
.
number
),
team
:
types
.
maybe
(
types
.
string
),
team
:
types
.
maybe
(
types
.
string
),
permission
:
types
.
optional
(
types
.
number
,
1
),
permission
:
types
.
optional
(
types
.
number
,
1
),
...
@@ -50,9 +51,10 @@ export const NewPermissionsItem = types
...
@@ -50,9 +51,10 @@ export const NewPermissionsItem = types
},
},
}))
}))
.
actions
(
self
=>
({
.
actions
(
self
=>
({
setUser
(
userId
:
number
,
userLogin
:
string
)
{
setUser
(
userId
:
number
,
userLogin
:
string
,
userAvatarUrl
:
string
)
{
self
.
userId
=
userId
;
self
.
userId
=
userId
;
self
.
userLogin
=
userLogin
;
self
.
userLogin
=
userLogin
;
self
.
userAvatarUrl
=
userAvatarUrl
;
self
.
teamId
=
null
;
self
.
teamId
=
null
;
self
.
team
=
null
;
self
.
team
=
null
;
},
},
...
@@ -121,6 +123,7 @@ export const PermissionsStore = types
...
@@ -121,6 +123,7 @@ export const PermissionsStore = types
teamId
:
undefined
,
teamId
:
undefined
,
userLogin
:
undefined
,
userLogin
:
undefined
,
userId
:
undefined
,
userId
:
undefined
,
userAvatarUrl
:
undefined
,
role
:
undefined
,
role
:
undefined
,
};
};
switch
(
self
.
newItem
.
type
)
{
switch
(
self
.
newItem
.
type
)
{
...
@@ -131,6 +134,7 @@ export const PermissionsStore = types
...
@@ -131,6 +134,7 @@ export const PermissionsStore = types
case
aclTypeValues
.
USER
.
value
:
case
aclTypeValues
.
USER
.
value
:
item
.
userLogin
=
self
.
newItem
.
userLogin
;
item
.
userLogin
=
self
.
newItem
.
userLogin
;
item
.
userId
=
self
.
newItem
.
userId
;
item
.
userId
=
self
.
newItem
.
userId
;
item
.
userAvatarUrl
=
self
.
newItem
.
userAvatarUrl
;
break
;
break
;
case
aclTypeValues
.
VIEWER
.
value
:
case
aclTypeValues
.
VIEWER
.
value
:
case
aclTypeValues
.
EDITOR
.
value
:
case
aclTypeValues
.
EDITOR
.
value
:
...
...
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