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
59ec9b1d
Commit
59ec9b1d
authored
Aug 06, 2018
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed UI and made UX improvements
parent
d302da37
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
28 deletions
+52
-28
ee/app/finders/geo/project_registry_status_finder.rb
ee/app/finders/geo/project_registry_status_finder.rb
+6
-4
ee/app/views/admin/geo_projects/_failed.html.haml
ee/app/views/admin/geo_projects/_failed.html.haml
+7
-7
ee/app/views/admin/geo_projects/_never.html.haml
ee/app/views/admin/geo_projects/_never.html.haml
+5
-5
ee/app/views/admin/geo_projects/_pending.html.haml
ee/app/views/admin/geo_projects/_pending.html.haml
+15
-8
ee/app/views/admin/geo_projects/_synced.html.haml
ee/app/views/admin/geo_projects/_synced.html.haml
+4
-4
locale/gitlab.pot
locale/gitlab.pot
+15
-0
No files found.
ee/app/finders/geo/project_registry_status_finder.rb
View file @
59ec9b1d
...
...
@@ -20,7 +20,7 @@ module Geo
no_repository_resync
.
and
(
no_repository_sync_failure
)
.
and
(
repository_verified
)
).
includes
(
project: :route
)
).
includes
(
project: :route
)
.
includes
(
project:
{
namespace: :route
})
end
# Return any project registry which project is pending to update
...
...
@@ -40,7 +40,7 @@ module Geo
.
and
(
flagged_for_resync
.
or
(
repository_pending_verification
.
and
(
repository_without_verification_failure_before
)))
).
includes
(
project: :route
)
).
includes
(
project: :route
)
.
includes
(
project:
{
namespace: :route
})
end
# Return any project registry which project has a failure
...
...
@@ -55,7 +55,7 @@ module Geo
repository_sync_failed
.
or
(
repository_verification_failed
)
.
or
(
repository_checksum_mismatch
)
).
includes
(
project: :route
)
).
includes
(
project: :route
)
.
includes
(
project:
{
namespace: :route
})
end
# Return any project registry that has never been fully synced
...
...
@@ -63,7 +63,9 @@ module Geo
# We don't include projects without a corresponding ProjectRegistry
# for performance reasons.
def
never_synced_projects
Geo
::
ProjectRegistry
.
where
(
last_repository_successful_sync_at:
nil
).
includes
(
project: :route
)
Geo
::
ProjectRegistry
.
where
(
last_repository_successful_sync_at:
nil
)
.
includes
(
project: :route
)
.
includes
(
project:
{
namespace: :route
})
end
private
...
...
ee/app/views/admin/geo_projects/_failed.html.haml
View file @
59ec9b1d
...
...
@@ -3,7 +3,7 @@
.card-header
{
id:
"project-#{project_registry.project.id}-header"
}
.d-flex
%strong
.header-text-primary.flex-fill
=
project_registry
.
project
.
full_name
=
link_to
project_registry
.
project
.
full_name
,
admin_namespace_project_path
(
project_registry
.
project
.
namespace
,
project_registry
.
project
)
-
if
project_registry
.
candidate_for_redownload?
=
link_to
(
force_redownload_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline btn-sm mr-2'
)
do
=
s_
(
'Geo|Redownload'
)
...
...
@@ -25,20 +25,20 @@
-
if
project_registry
.
repository_retry_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
repository_retry_at
)
-
else
=
s_
(
'Geo|
Nev
er'
)
=
s_
(
'Geo|
Waiting for schedul
er'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last sync attempt'
)
.project-status-content
-
if
project_registry
.
last_repository_synced_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
=
time_ago_with_tooltip
(
project_registry
.
last_repository_synced_at
,
placement:
'bottom'
)
-
else
=
s_
(
'Geo|
Nev
er'
)
=
s_
(
'Geo|
Waiting for schedul
er'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Retry count
s
'
)
=
s_
(
'Geo|Retry count'
)
.project-status-content
=
project_registry
.
repository_retry_count
=
project_registry
.
repository_retry_count
.
nil?
?
0
:
project_registry
.
repository_retry_count
.project-card-errors
.card-header.bg-transparent.border-bottom-0.border-top
...
...
@@ -53,7 +53,7 @@
.collapse
{
id:
"project-errors-#{project_registry.project.id}"
,
'aria-labelledby'
=>
"project-#{project_registry.project.id}-header"
}
.card-body
.container
.container
.project-container
%ul
.unstyled-list.errors-list
-
if
project_registry
.
last_repository_sync_failure
%li
.p-0.d-flex
...
...
ee/app/views/admin/geo_projects/_never.html.haml
View file @
59ec9b1d
-
@registries
.
each
do
|
project_registry
|
.card.project-card.prepend-top-15
.card-header
{
id:
"project-#{project.id}-header"
}
.card-header
{
id:
"project-#{project
_registry.project
.id}-header"
}
.d-flex
%strong
.header-text-primary.flex-fill
=
project_registry
.
project
.
full_name
=
link_to
project_registry
.
project
.
full_name
,
admin_namespace_project_path
(
project_registry
.
project
.
namespace
,
project_registry
.
project
)
.card-body
.container.project-container
...
...
@@ -15,15 +15,15 @@
-
if
project_registry
.
repository_retry_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
repository_retry_at
)
-
else
=
s_
(
'Geo|
Nev
er'
)
=
s_
(
'Geo|
Waiting for schedul
er'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last sync attempt'
)
.project-status-content
-
if
project_registry
.
last_repository_synced_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
=
time_ago_with_tooltip
(
project_registry
.
last_repository_synced_at
,
placement:
'bottom'
)
-
else
=
s_
(
'Geo|
Nev
er'
)
=
s_
(
'Geo|
Waiting for schedul
er'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Retry counts'
)
...
...
ee/app/views/admin/geo_projects/_pending.html.haml
View file @
59ec9b1d
...
...
@@ -3,11 +3,13 @@
.card-header
{
id:
"project-#{project_registry.project.id}-header"
}
.d-flex
%strong
.header-text-primary.flex-fill
=
project_registry
.
project
.
full_name
=
link_to
(
recheck_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline btn-sm mr-2'
)
do
=
s_
(
'Geo|Recheck'
)
=
link_to
(
resync_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline-primary btn-sm'
)
do
=
s_
(
'Geo|Resync'
)
=
link_to
project_registry
.
project
.
full_name
,
admin_namespace_project_path
(
project_registry
.
project
.
namespace
,
project_registry
.
project
)
-
unless
project_registry
.
verification_pending?
=
link_to
(
recheck_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline btn-sm mr-2'
)
do
=
s_
(
'Geo|Recheck'
)
-
unless
project_registry
.
resync_repository?
=
link_to
(
resync_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline-primary btn-sm'
)
do
=
s_
(
'Geo|Resync'
)
.card-body
.container.project-container
...
...
@@ -16,7 +18,12 @@
.project-status-title.text-muted
=
s_
(
'Geo|Status'
)
.project-status-content
=
s_
(
'Geo|Pending'
)
-
if
project_registry
.
resync_repository?
=
s_
(
'Geo|Pending synchronization'
)
-
elsif
project_registry
.
verification_pending?
=
s_
(
'Geo|Pending verification'
)
-
else
=
s_
(
'Geo|Unknown state'
)
# should never reach this state, unless we introduce new behavior
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Next sync scheduled at'
)
...
...
@@ -24,13 +31,13 @@
-
if
project_registry
.
repository_retry_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
repository_retry_at
)
-
else
=
s_
(
'Geo|
Nev
er'
)
=
s_
(
'Geo|
Waiting for schedul
er'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last sync attempt'
)
.project-status-content
-
if
project_registry
.
last_repository_synced_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
=
time_ago_with_tooltip
(
project_registry
.
last_repository_synced_at
,
placement:
'bottom'
)
-
else
=
s_
(
'Geo|Never'
)
.col-sm.d-sm-none.d-md-block
...
...
ee/app/views/admin/geo_projects/_synced.html.haml
View file @
59ec9b1d
...
...
@@ -3,7 +3,7 @@
.card-header
{
id:
"project-#{project_registry.project.id}-header"
}
.d-flex
%strong
.header-text-primary.flex-fill
=
project_registry
.
project
.
full_name
=
link_to
project_registry
.
project
.
full_name
,
admin_namespace_project_path
(
project_registry
.
project
.
namespace
,
project_registry
.
project
)
=
link_to
(
recheck_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline btn-sm mr-2'
)
do
=
s_
(
'Geo|Recheck'
)
=
link_to
(
resync_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline-primary btn-sm'
)
do
...
...
@@ -22,15 +22,15 @@
=
s_
(
'Geo|Last successful sync'
)
.project-status-content
-
if
project_registry
.
last_repository_successful_sync_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_successful_sync_at
)
=
time_ago_with_tooltip
(
project_registry
.
last_repository_successful_sync_at
,
placement:
'bottom'
)
-
else
=
s_
(
'Geo|Never'
)
=
s_
(
'Geo|Never'
)
.col-sm.project-status-container
.project-status-title.text-muted
=
s_
(
'Geo|Last time verified'
)
.project-status-content
-
if
project_registry
.
last_repository_check_at
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_check_at
)
=
time_ago_with_tooltip
(
project_registry
.
last_repository_check_at
,
placement:
'bottom'
)
-
else
=
s_
(
'Geo|Never'
)
.col-sm.d-sm-none.d-md-block
...
...
locale/gitlab.pot
View file @
59ec9b1d
...
...
@@ -3268,6 +3268,12 @@ msgstr ""
msgid "Geo|Pending"
msgstr ""
msgid "Geo|Pending synchronization"
msgstr ""
msgid "Geo|Pending verification"
msgstr ""
msgid "Geo|Projects in certain groups"
msgstr ""
...
...
@@ -3286,6 +3292,9 @@ msgstr ""
msgid "Geo|Resync"
msgstr ""
msgid "Geo|Retry count"
msgstr ""
msgid "Geo|Retry counts"
msgstr ""
...
...
@@ -3304,12 +3313,18 @@ msgstr ""
msgid "Geo|Synchronization failed - %{error}"
msgstr ""
msgid "Geo|Unknown state"
msgstr ""
msgid "Geo|Verification capacity"
msgstr ""
msgid "Geo|Verification failed - %{error}"
msgstr ""
msgid "Geo|Waiting for scheduler"
msgstr ""
msgid "Geo|You need a different license to use Geo replication"
msgstr ""
...
...
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