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
76e52341
Commit
76e52341
authored
Jun 15, 2020
by
Nicolò Maria Mezzopera
Committed by
Andrew Fontaine
Jun 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update boolean to use to_s in haml files
- project page - group page - mutation - unit tests for mutation
parent
01c4d41b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
42 deletions
+12
-42
app/assets/javascripts/registry/explorer/stores/mutations.js
app/assets/javascripts/registry/explorer/stores/mutations.js
+3
-3
app/views/groups/registry/repositories/index.html.haml
app/views/groups/registry/repositories/index.html.haml
+2
-2
app/views/projects/registry/repositories/_tag.html.haml
app/views/projects/registry/repositories/_tag.html.haml
+0
-33
app/views/projects/registry/repositories/index.html.haml
app/views/projects/registry/repositories/index.html.haml
+1
-1
spec/frontend/registry/explorer/stores/mutations_spec.js
spec/frontend/registry/explorer/stores/mutations_spec.js
+6
-3
No files found.
app/assets/javascripts/registry/explorer/stores/mutations.js
View file @
76e52341
import
*
as
types
from
'
./mutation_types
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
{
parseIntPagination
,
normalizeHeaders
}
from
'
~/lib/utils/common_utils
'
;
import
{
parseIntPagination
,
normalizeHeaders
,
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
{
IMAGE_DELETE_SCHEDULED_STATUS
,
IMAGE_FAILED_DELETED_STATUS
}
from
'
../constants/index
'
;
import
{
IMAGE_DELETE_SCHEDULED_STATUS
,
IMAGE_FAILED_DELETED_STATUS
}
from
'
../constants/index
'
;
export
default
{
export
default
{
...
@@ -7,8 +7,8 @@ export default {
...
@@ -7,8 +7,8 @@ export default {
state
.
config
=
{
state
.
config
=
{
...
config
,
...
config
,
expirationPolicy
:
config
.
expirationPolicy
?
JSON
.
parse
(
config
.
expirationPolicy
)
:
undefined
,
expirationPolicy
:
config
.
expirationPolicy
?
JSON
.
parse
(
config
.
expirationPolicy
)
:
undefined
,
isGroupPage
:
config
.
isGroupPage
!==
undefined
,
isGroupPage
:
parseBoolean
(
config
.
isGroupPage
)
,
isAdmin
:
config
.
isAdmin
!==
undefined
,
isAdmin
:
parseBoolean
(
config
.
isAdmin
)
,
};
};
},
},
...
...
app/views/groups/registry/repositories/index.html.haml
View file @
76e52341
...
@@ -12,6 +12,6 @@
...
@@ -12,6 +12,6 @@
"containers_error_image"
=>
image_path
(
'illustrations/docker-error-state.svg'
),
"containers_error_image"
=>
image_path
(
'illustrations/docker-error-state.svg'
),
"registry_host_url_with_port"
=>
escape_once
(
registry_config
.
host_port
),
"registry_host_url_with_port"
=>
escape_once
(
registry_config
.
host_port
),
"garbage_collection_help_page_path"
=>
help_page_path
(
'administration/packages/container_registry'
,
anchor:
'container-registry-garbage-collection'
),
"garbage_collection_help_page_path"
=>
help_page_path
(
'administration/packages/container_registry'
,
anchor:
'container-registry-garbage-collection'
),
"is_admin"
:
current_user
&
.
admin
,
"is_admin"
:
current_user
&
.
admin
.
to_s
,
is_group_page:
true
,
is_group_page:
"true"
,
character_error:
@character_error
.
to_s
}
}
character_error:
@character_error
.
to_s
}
}
app/views/projects/registry/repositories/_tag.html.haml
deleted
100644 → 0
View file @
01c4d41b
%tr
.tag
%td
=
escape_once
(
tag
.
name
)
=
clipboard_button
(
text:
"
#{
tag
.
location
}
"
)
%td
-
if
tag
.
revision
%span
.has-tooltip
{
title:
"#{tag.revision}"
}
=
tag
.
short_revision
-
else
\-
%td
-
if
tag
.
total_size
=
number_to_human_size
(
tag
.
total_size
)
·
=
pluralize
(
tag
.
layers
.
size
,
"layer"
)
-
else
.light
\-
%td
-
if
tag
.
created_at
=
time_ago_with_tooltip
tag
.
created_at
-
else
.light
\-
-
if
can?
(
current_user
,
:update_container_image
,
@project
)
%td
.content
.controls.d-none.d-sm-block.float-right
=
link_to
project_registry_repository_tag_path
(
@project
,
tag
.
repository
,
tag
.
name
),
method: :delete
,
class:
'btn btn-remove has-tooltip'
,
title:
'Remove tag'
,
data:
{
confirm:
'Are you sure you want to delete this tag?'
}
do
=
icon
(
'trash cred'
)
app/views/projects/registry/repositories/index.html.haml
View file @
76e52341
...
@@ -15,5 +15,5 @@
...
@@ -15,5 +15,5 @@
"registry_host_url_with_port"
=>
escape_once
(
registry_config
.
host_port
),
"registry_host_url_with_port"
=>
escape_once
(
registry_config
.
host_port
),
"expiration_policy_help_page_path"
=>
help_page_path
(
'user/packages/container_registry/index'
,
anchor:
'expiration-policy'
),
"expiration_policy_help_page_path"
=>
help_page_path
(
'user/packages/container_registry/index'
,
anchor:
'expiration-policy'
),
"garbage_collection_help_page_path"
=>
help_page_path
(
'administration/packages/container_registry'
,
anchor:
'container-registry-garbage-collection'
),
"garbage_collection_help_page_path"
=>
help_page_path
(
'administration/packages/container_registry'
,
anchor:
'container-registry-garbage-collection'
),
"is_admin"
:
current_user
&
.
admin
,
"is_admin"
:
current_user
&
.
admin
.
to_s
,
character_error:
@character_error
.
to_s
}
}
character_error:
@character_error
.
to_s
}
}
spec/frontend/registry/explorer/stores/mutations_spec.js
View file @
76e52341
...
@@ -12,11 +12,14 @@ describe('Mutations Registry Explorer Store', () => {
...
@@ -12,11 +12,14 @@ describe('Mutations Registry Explorer Store', () => {
it
(
'
should set the initial state
'
,
()
=>
{
it
(
'
should set the initial state
'
,
()
=>
{
const
payload
=
{
const
payload
=
{
endpoint
:
'
foo
'
,
endpoint
:
'
foo
'
,
isGroupPage
:
true
,
isGroupPage
:
''
,
expirationPolicy
:
{
foo
:
'
bar
'
},
expirationPolicy
:
{
foo
:
'
bar
'
},
isAdmin
:
true
,
isAdmin
:
''
,
};
const
expectedState
=
{
...
mockState
,
config
:
{
...
payload
,
isGroupPage
:
false
,
isAdmin
:
false
},
};
};
const
expectedState
=
{
...
mockState
,
config
:
payload
};
mutations
[
types
.
SET_INITIAL_STATE
](
mockState
,
{
mutations
[
types
.
SET_INITIAL_STATE
](
mockState
,
{
...
payload
,
...
payload
,
expirationPolicy
:
JSON
.
stringify
(
payload
.
expirationPolicy
),
expirationPolicy
:
JSON
.
stringify
(
payload
.
expirationPolicy
),
...
...
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