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
83d1fe9b
Commit
83d1fe9b
authored
Mar 31, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add serveral minor improvements to container registry
parent
00319e59
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
7 deletions
+12
-7
app/controllers/projects/registry/repositories_controller.rb
app/controllers/projects/registry/repositories_controller.rb
+2
-1
app/controllers/projects/registry/tags_controller.rb
app/controllers/projects/registry/tags_controller.rb
+2
-1
app/models/container_repository.rb
app/models/container_repository.rb
+2
-1
app/views/projects/registry/repositories/_image.html.haml
app/views/projects/registry/repositories/_image.html.haml
+5
-1
lib/container_registry/tag.rb
lib/container_registry/tag.rb
+1
-3
No files found.
app/controllers/projects/registry/repositories_controller.rb
View file @
83d1fe9b
...
...
@@ -9,7 +9,8 @@ module Projects
def
destroy
if
image
.
destroy
redirect_to
project_container_registry_path
(
@project
)
redirect_to
project_container_registry_path
(
@project
),
notice:
'Images repository has been removed successfully!'
else
redirect_to
project_container_registry_path
(
@project
),
alert:
'Failed to remove images repository!'
...
...
app/controllers/projects/registry/tags_controller.rb
View file @
83d1fe9b
...
...
@@ -5,7 +5,8 @@ module Projects
def
destroy
if
tag
.
delete
redirect_to
project_container_registry_path
(
@project
)
redirect_to
project_container_registry_path
(
@project
),
notice:
'Tag removed successfull!'
else
redirect_to
project_container_registry_path
(
@project
),
alert:
'Failed to remove repository tag!'
...
...
app/models/container_repository.rb
View file @
83d1fe9b
...
...
@@ -4,7 +4,8 @@ class ContainerRepository < ActiveRecord::Base
validates
:name
,
length:
{
minimum:
0
,
allow_nil:
false
}
delegate
:client
,
to: :registry
before_destroy
:delete_tags
before_destroy
:delete_tags!
def
registry
@registry
||=
begin
...
...
app/views/projects/registry/repositories/_image.html.haml
View file @
83d1fe9b
...
...
@@ -10,7 +10,11 @@
=
escape_once
(
image
.
path
)
=
clipboard_button
(
clipboard_text:
"docker pull
#{
image
.
path
}
"
)
.controls.hidden-xs.pull-right
=
link_to
namespace_project_container_registry_path
(
@project
.
namespace
,
@project
,
image
.
id
),
class:
'btn btn-remove has-tooltip'
,
title:
"Remove image"
,
data:
{
confirm:
"Are you sure?"
},
method: :delete
do
=
link_to
namespace_project_container_registry_path
(
@project
.
namespace
,
@project
,
image
),
class:
'btn btn-remove has-tooltip'
,
title:
'Remove repository'
,
data:
{
confirm:
'Are you sure?'
},
method: :delete
do
=
icon
(
"trash cred"
)
...
...
lib/container_registry/tag.rb
View file @
83d1fe9b
...
...
@@ -36,9 +36,7 @@ module ContainerRegistry
end
def
digest
return
@digest
if
defined?
(
@digest
)
@digest
=
client
.
repository_tag_digest
(
repository
.
path
,
name
)
@digest
||=
client
.
repository_tag_digest
(
repository
.
path
,
name
)
end
def
config_blob
...
...
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