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
b8cd0f6a
Commit
b8cd0f6a
authored
Apr 01, 2019
by
Toon Claes
Committed by
Stan Hu
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Geo helpers registry-neutral
Any type of registry can go through these helper functions.
parent
80fe87a4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
ee/app/helpers/ee/geo_helper.rb
ee/app/helpers/ee/geo_helper.rb
+11
-11
ee/app/views/admin/geo/projects/_registry_failed.html.haml
ee/app/views/admin/geo/projects/_registry_failed.html.haml
+1
-1
ee/app/views/admin/geo/projects/_registry_never.html.haml
ee/app/views/admin/geo/projects/_registry_never.html.haml
+1
-1
ee/app/views/admin/geo/projects/_registry_pending.html.haml
ee/app/views/admin/geo/projects/_registry_pending.html.haml
+1
-1
ee/app/views/admin/geo/projects/_registry_synced.html.haml
ee/app/views/admin/geo/projects/_registry_synced.html.haml
+1
-1
No files found.
ee/app/helpers/ee/geo_helper.rb
View file @
b8cd0f6a
...
...
@@ -92,36 +92,36 @@ module EE
data:
data
end
def
project_registry_status
(
project_
registry
)
status_type
=
case
project_
registry
.
synchronization_state
def
geo_registry_status
(
registry
)
status_type
=
case
registry
.
synchronization_state
when
:failed
then
'status-type-failure'
when
:synced
then
'status-type-success'
end
content_tag
(
:div
,
class:
"
project
-status-content
#{
status_type
}
"
)
do
icon
=
project_registry_status_icon
(
project_
registry
)
text
=
project_registry_status_text
(
project_
registry
)
content_tag
(
:div
,
class:
"
geo
-status-content
#{
status_type
}
"
)
do
icon
=
geo_registry_status_icon
(
registry
)
text
=
geo_registry_status_text
(
registry
)
[
icon
,
text
].
join
(
' '
).
html_safe
end
end
def
project_registry_status_icon
(
project_
registry
)
icon
(
STATUS_ICON_NAMES_BY_STATE
.
fetch
(
project_registry
.
synchronization_state
,
'exclamation-triangle'
)
)
def
geo_registry_status_icon
(
registry
)
icon
STATUS_ICON_NAMES_BY_STATE
.
fetch
(
registry
.
synchronization_state
,
'exclamation-triangle'
)
end
def
project_registry_status_text
(
project_
registry
)
case
project_
registry
.
synchronization_state
def
geo_registry_status_text
(
registry
)
case
registry
.
synchronization_state
when
:never
s_
(
'Geo|Not synced yet'
)
when
:failed
s_
(
'Geo|Failed'
)
when
:pending
if
project_
registry
.
pending_synchronization?
if
registry
.
pending_synchronization?
s_
(
'Geo|Pending synchronization'
)
elsif
project_
registry
.
pending_verification?
elsif
registry
.
pending_verification?
s_
(
'Geo|Pending verification'
)
else
# should never reach this state, unless we introduce new behavior
...
...
ee/app/views/admin/geo/projects/_registry_failed.html.haml
View file @
b8cd0f6a
...
...
@@ -4,7 +4,7 @@
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Status'
)
=
project
_registry_status
(
project_registry
)
=
geo
_registry_status
(
project_registry
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Next sync scheduled at'
)
...
...
ee/app/views/admin/geo/projects/_registry_never.html.haml
View file @
b8cd0f6a
...
...
@@ -4,7 +4,7 @@
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Status'
)
=
project
_registry_status
(
project_registry
)
=
geo
_registry_status
(
project_registry
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Next sync scheduled at'
)
...
...
ee/app/views/admin/geo/projects/_registry_pending.html.haml
View file @
b8cd0f6a
...
...
@@ -4,7 +4,7 @@
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Status'
)
=
project
_registry_status
(
project_registry
)
=
geo
_registry_status
(
project_registry
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Next sync scheduled at'
)
...
...
ee/app/views/admin/geo/projects/_registry_synced.html.haml
View file @
b8cd0f6a
...
...
@@ -4,7 +4,7 @@
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Status'
)
=
project
_registry_status
(
project_registry
)
=
geo
_registry_status
(
project_registry
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last successful sync'
)
...
...
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