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
5c915920
Commit
5c915920
authored
Jan 23, 2020
by
gj4210
👁
Browse files
UPD: Accounts & Tokens page now shows account roles
parent
daa3a12b
Pipeline
#65924
passed with stages
in 6 minutes
Changes
1
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
frontend/src/views/netdb/tokens.vue
View file @
5c915920
<
template
>
<
template
>
<div
class=
"main"
>
<div
class=
"main"
>
<h1>
Accounts
</h1>
<h1>
Accounts
&
Tokens
</h1>
<b-modal
id=
"modal-create-account"
size=
"lg"
title=
"Subaccount erstellen"
<b-modal
id=
"modal-create-account"
size=
"lg"
title=
"Subaccount erstellen"
@
hidden=
"resetAccountData"
>
@
hidden=
"resetAccountData"
>
<b-form
@
submit=
"createAccount"
>
<b-form
@
submit=
"createAccount"
>
...
@@ -250,13 +250,17 @@
...
@@ -250,13 +250,17 @@
<p
class=
"text-muted"
>
Beschreibung
</p>
<p
class=
"text-muted"
>
Beschreibung
</p>
</b-col>
</b-col>
<b-col>
<b-col>
<h6>
<h5
class=
"mb-0"
>
<b-badge
class=
"mr-1"
variant=
"danger"
>
Divide by 0
</b-badge>
<b-badge
<b-badge
class=
"mr-1"
variant=
"primary"
>
Less dangerous stuff
</b-badge>
v-for=
"role in roles_by_account[account.login_name].slice(0, max_role_badge_count)"
<b-badge
class=
"mr-1"
variant=
"success"
>
Somewhat lame stuff
</b-badge>
:key=
"'role-badge-' + role.mgr_login_name + '-' + role.role_fq_name"
<p>
+ 153 weitere
</p>
class=
"mr-1 mb-1"
>
{{role.system.toUpperCase()}}
<br>
{{role.role}}
</b-badge>
</h5>
<h6
v-if=
"roles_by_account[account.login_name].length > max_role_badge_count"
>
+ {{roles_by_account[account.login_name].length - max_role_badge_count}} Weitere
</h6>
</h6>
<p
class=
"text-muted"
>
Berechtigung
en
</p>
<p
class=
"text-muted"
>
Roll
en
</p>
</b-col>
</b-col>
<b-col
lg=
"1"
>
<b-col
lg=
"1"
>
<
template
v-if=
"account.parent_login_name !== null"
>
<
template
v-if=
"account.parent_login_name !== null"
>
...
@@ -342,6 +346,7 @@
...
@@ -342,6 +346,7 @@
'
Individuell
'
'
Individuell
'
],
],
tokens_by_account
:
null
,
tokens_by_account
:
null
,
roles_by_account
:
null
,
accounts
:
null
,
accounts
:
null
,
new_account
:
{
new_account
:
{
parent_login_name
:
null
,
parent_login_name
:
null
,
...
@@ -390,7 +395,8 @@
...
@@ -390,7 +395,8 @@
token_copied
:
false
,
token_copied
:
false
,
leaving_transition_properties
:
{
// TODO: Get table animations to work
leaving_transition_properties
:
{
// TODO: Get table animations to work
name
:
'
flip-list
'
name
:
'
flip-list
'
}
},
max_role_badge_count
:
10
}
}
},
},
computed
:
{
computed
:
{
...
@@ -414,6 +420,7 @@
...
@@ -414,6 +420,7 @@
fetchData
()
{
fetchData
()
{
AccountTokenService
.
list
(
this
.
$store
.
state
.
netdb_axios_config
,
this
.
$store
.
state
.
user
.
login_name
).
then
((
response
)
=>
{
AccountTokenService
.
list
(
this
.
$store
.
state
.
netdb_axios_config
,
this
.
$store
.
state
.
user
.
login_name
).
then
((
response
)
=>
{
this
.
tokens_by_account
=
ApiUtil
.
dict_of_lists_by_value_of_array
(
response
.
data
[
2
].
concat
(
response
.
data
[
3
]),
'
login_name
'
)
this
.
tokens_by_account
=
ApiUtil
.
dict_of_lists_by_value_of_array
(
response
.
data
[
2
].
concat
(
response
.
data
[
3
]),
'
login_name
'
)
this
.
roles_by_account
=
ApiUtil
.
dict_of_lists_by_value_of_array
(
response
.
data
[
4
].
concat
(
response
.
data
[
5
]),
'
mgr_login_name
'
)
this
.
accounts
=
response
.
data
[
0
].
concat
(
response
.
data
[
1
])
this
.
accounts
=
response
.
data
[
0
].
concat
(
response
.
data
[
1
])
})
})
},
},
...
...
Write
Preview
Supports
Markdown
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