Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1a8a6c7b
Commit
1a8a6c7b
authored
Mar 08, 2021
by
Emily Ring
Committed by
Vitaly Slobodin
Mar 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add name to agent token table
parent
ab3055aa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
0 deletions
+26
-0
ee/app/assets/javascripts/clusters/agents/components/token_table.vue
...ts/javascripts/clusters/agents/components/token_table.vue
+6
-0
ee/app/assets/javascripts/clusters/agents/graphql/fragments/cluster_agent_token.fragment.graphql
...ts/graphql/fragments/cluster_agent_token.fragment.graphql
+1
-0
ee/changelogs/unreleased/emilyring-add-name-to-token-details.yml
...gelogs/unreleased/emilyring-add-name-to-token-details.yml
+5
-0
ee/spec/frontend/clusters/agents/components/show_spec.js
ee/spec/frontend/clusters/agents/components/show_spec.js
+1
-0
ee/spec/frontend/clusters/agents/components/token_table_spec.js
...c/frontend/clusters/agents/components/token_table_spec.js
+13
-0
No files found.
ee/app/assets/javascripts/clusters/agents/components/token_table.vue
View file @
1a8a6c7b
...
...
@@ -19,6 +19,7 @@ export default {
dateCreated
:
s__
(
'
ClusterAgents|Date created
'
),
description
:
s__
(
'
ClusterAgents|Description
'
),
learnMore
:
s__
(
'
ClusterAgents|Learn how to create an agent access token
'
),
name
:
s__
(
'
ClusterAgents|Name
'
),
noTokens
:
s__
(
'
ClusterAgents|This agent has no tokens
'
),
unknownUser
:
s__
(
'
ClusterAgents|Unknown user
'
),
},
...
...
@@ -31,6 +32,11 @@ export default {
computed
:
{
fields
()
{
return
[
{
key
:
'
name
'
,
label
:
this
.
$options
.
i18n
.
name
,
tdAttr
:
{
'
data-testid
'
:
'
agent-token-name
'
},
},
{
key
:
'
createdAt
'
,
label
:
this
.
$options
.
i18n
.
dateCreated
,
...
...
ee/app/assets/javascripts/clusters/agents/graphql/fragments/cluster_agent_token.fragment.graphql
View file @
1a8a6c7b
...
...
@@ -2,6 +2,7 @@ fragment Token on ClusterAgentToken {
id
createdAt
description
name
createdByUser
{
name
...
...
ee/changelogs/unreleased/emilyring-add-name-to-token-details.yml
0 → 100644
View file @
1a8a6c7b
---
title
:
Add name to agent token table
merge_request
:
55503
author
:
type
:
changed
ee/spec/frontend/clusters/agents/components/show_spec.js
View file @
1a8a6c7b
...
...
@@ -27,6 +27,7 @@ describe('ClusterAgentShow', () => {
createdByUser
:
{
name
:
'
user-1
'
,
},
name
:
'
token-1
'
,
tokens
:
{
count
:
1
,
nodes
:
[],
...
...
ee/spec/frontend/clusters/agents/components/token_table_spec.js
View file @
1a8a6c7b
...
...
@@ -15,12 +15,14 @@ describe('ClusterAgentTokenTable', () => {
createdByUser
:
{
name
:
'
user-1
'
,
},
name
:
'
token-1
'
,
},
{
id
:
'
2
'
,
createdAt
:
'
2021-02-10T00:00:00Z
'
,
description
:
null
,
createdByUser
:
null
,
name
:
'
token-2
'
,
},
];
...
...
@@ -47,6 +49,17 @@ describe('ClusterAgentTokenTable', () => {
expect
(
learnMoreLink
.
text
()).
toBe
(
TokenTable
.
i18n
.
learnMore
);
});
it
.
each
`
name | lineNumber
${
'
token-1
'
}
|
${
0
}
${
'
token-2
'
}
|
${
1
}
`
(
'
displays token name "$name" for line "$lineNumber"
'
,
({
name
,
lineNumber
})
=>
{
const
tokens
=
wrapper
.
findAll
(
'
[data-testid="agent-token-name"]
'
);
const
token
=
tokens
.
at
(
lineNumber
);
expect
(
token
.
text
()).
toBe
(
name
);
});
it
.
each
`
createdText | lineNumber
${
'
2 days ago
'
}
|
${
0
}
...
...
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