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
d343105e
Commit
d343105e
authored
Dec 13, 2021
by
Kev
Committed by
David O'Regan
Dec 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use inline copy button for CI variables
parent
60cd1b1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
18 deletions
+30
-18
app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
...scripts/ci_variable_list/components/ci_variable_table.vue
+30
-18
No files found.
app/assets/javascripts/ci_variable_list/components/ci_variable_table.vue
View file @
d343105e
<
script
>
import
{
GlTable
,
GlButton
,
GlModalDirective
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlTable
,
GlButton
,
GlModalDirective
,
GlIcon
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
...
...
@@ -59,6 +59,7 @@ export default {
},
directives
:
{
GlModalDirective
,
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
glFeatureFlagsMixin
()],
computed
:
{
...
...
@@ -102,27 +103,38 @@ export default {
<col
v-for=
"field in scope.fields"
:key=
"field.key"
:style=
"field.customStyle"
/>
</
template
>
<
template
#cell(key)=
"{ item }"
>
<div
class=
"d-flex truncated-container"
>
<span
:id=
"`ci-variable-key-$
{item.id}`" class="d-inline-block mw-100 text-truncate">
{{
item
.
key
}}
</span>
<ci-variable-popover
:target=
"`ci-variable-key-$
{item.id}`"
:value="item.key"
:tooltip-text="__('Copy key')"
<div
class=
"gl-display-flex truncated-container gl-align-items-center"
>
<span
:id=
"`ci-variable-key-$
{item.id}`"
class="gl-display-inline-block gl-max-w-full gl-text-truncate"
>
{{
item
.
key
}}
</span
>
<gl-button
v-gl-tooltip
category=
"tertiary"
icon=
"copy-to-clipboard"
:title=
"__('Copy key')"
:data-clipboard-text=
"item.key"
:aria-label=
"__('Copy to clipboard')"
/>
</div>
</
template
>
<
template
#cell(value)=
"{ item }"
>
<div
class=
"gl-display-flex gl-align-items-center truncated-container"
>
<span
v-if=
"valuesHidden"
>
*********************
</span>
<div
v-else
class=
"d-flex truncated-container"
>
<span
:id=
"`ci-variable-value-$
{item.id}`" class="d-inline-block mw-100 text-truncate">
{{
item
.
value
}}
</span>
<ci-variable-popover
:target=
"`ci-variable-value-$
{item.id}`"
:value="item.value"
:tooltip-text="__('Copy value')"
<span
v-else
:id=
"`ci-variable-value-$
{item.id}`"
class="gl-display-inline-block gl-max-w-full gl-text-truncate"
>
{{
item
.
value
}}
</span
>
<gl-button
v-gl-tooltip
category=
"tertiary"
icon=
"copy-to-clipboard"
:title=
"__('Copy value')"
:data-clipboard-text=
"item.value"
:aria-label=
"__('Copy to clipboard')"
/>
</div>
</
template
>
...
...
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