Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
8022e002
Commit
8022e002
authored
Jan 28, 2021
by
gj4210
👽
Browse files
UPD: Sort roles by relevance/position (desc) (closes
#180
)
parent
1d61d78a
Pipeline
#130329
passed with stages
in 4 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/views/netdb/Tokens.vue
View file @
8022e002
...
...
@@ -378,6 +378,11 @@ export default {
this
.
assignable_role_name_options_by_system
=
{}
Object
.
keys
(
this
.
assignable_roles_by_system
).
forEach
(
system
=>
{
this
.
assignable_system_options
.
add
({
value
:
system
,
text
:
system
.
toUpperCase
()})
this
.
assignable_roles_by_system
[
system
].
sort
((
a
,
b
)
=>
{
if
(
a
.
position
<
b
.
position
)
return
-
1
if
(
a
.
position
>
b
.
position
)
return
1
return
0
})
this
.
assignable_role_name_options_by_system
[
system
]
=
[]
this
.
assignable_roles_by_system
[
system
].
forEach
(
role
=>
{
this
.
assignable_role_name_options_by_system
[
system
].
push
({
value
:
role
.
name
,
text
:
role
.
name
})
...
...
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