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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
23024a70
Commit
23024a70
authored
Sep 15, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds clipboard button component
parent
13c86bb4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
17 deletions
+105
-17
app/assets/javascripts/registry/components/collapsible_container.vue
...javascripts/registry/components/collapsible_container.vue
+103
-14
app/assets/javascripts/registry/components/registry_table.vue
...assets/javascripts/registry/components/registry_table.vue
+0
-0
app/assets/javascripts/vue_shared/components/clipboard_button.vue
...ts/javascripts/vue_shared/components/clipboard_button.vue
+2
-3
No files found.
app/assets/javascripts/registry/components/collapsible_container.vue
View file @
23024a70
<
script
>
import
clipboardButton
from
'
../../vue_shared/components/clipboard_button.vue
'
;
export
default
{
name
:
'
collapsibeContainerRegisty
'
,
props
:
{
canDelet
e
:
{
type
:
Boolean
,
titl
e
:
{
type
:
String
,
required
:
true
,
},
title
:
{
clipboardContent
:
{
type
:
String
,
required
:
true
,
},
repoData
:
{
type
:
Object
,
required
:
true
,
},
},
components
:
{
clipboardButton
,
},
data
()
{
return
{
...
...
@@ -20,13 +26,17 @@
};
},
methods
:
{
itemSize
(
item
)
{
const
pluralize
=
gl
.
text
.
pluralize
(
'
layer
'
,
item
.
layers
);
return
`
${
item
.
size
}
·
${
item
.
layers
}${
pluralize
}
`
;
}
}
}
</
script
>
<
template
>
<div
class=
"container-image"
>
<div
class=
"container-image-head"
>
<i
class=
"fa"
:class=
"
{
...
...
@@ -37,6 +47,85 @@
</i>
{{
title
}}
<clipboard-button
:text=
""
:title=
""
/>
</div>
<div
class=
"container-image-tags"
:class=
"
{ hide: !isOpen }">
<table
class=
"table tags"
v-if=
"true"
>
<thead>
<tr>
<th>
{{
__
(
"
Tag
"
)
}}
</th>
<th>
{{
__
(
"
Tag ID
"
)
}}
</th>
<th>
{{
__
(
"
Size
"
)
}}
</th>
<th>
{{
__
(
"
Created
"
)
}}
</th>
<th
v-if=
"true"
></th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(item, i) in repo.list"
:key=
"i"
>
<td>
{{
item
.
name
}}
<clipboard-button
:title=
"item.location"
:text=
"item.location"
/>
</td>
<td>
<span
v-tooltip
:title=
"item.revision"
>
{{
item
.
shortRevision
}}
</span>
</td>
<td>
<template
v-if=
"item.size"
>
{{
itemSize
(
item
)
}}
</
template
>
<div
v-else
class=
"light"
>
\-
</div>
</td>
<td>
<
template
v-if=
"item.createdAt"
>
format
{{
item
.
createdAt
}}
</
template
>
<div
v-else
class=
"light"
>
\-
</div>
</td>
<td>
<button
type=
"button"
class=
"btn btn-remove"
title=
"Remove tag"
v-tooltip
@
click=
"deleteTag(item)"
>
<i
class=
"fa fa-trash cred"
aria-hidden=
"true"
>
</i>
</button>
</td>
</tr>
</tbody>
</table>
<div
v-else
class=
"nothing-here-block"
>
{{__("No tags in Container Registry for this container image.")}}
</div>
</div>
</div>
</template>
app/assets/javascripts/registry/components/registry_table.vue
deleted
100644 → 0
View file @
13c86bb4
app/assets/javascripts/vue_shared/components/clipboard_button.vue
View file @
23024a70
import Clipboard from 'vendor/clipboard';
<
script
>
import
Clipboard
from
'
vendor/clipboard
'
;
export
default
{
name
:
'
clipboardButton
'
,
props
:
{
...
...
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