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
2c629b26
Commit
2c629b26
authored
Jul 31, 2018
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I18n using namespace 'Geo'
parent
727bf2b8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
40 deletions
+95
-40
ee/app/controllers/admin/geo_projects_controller.rb
ee/app/controllers/admin/geo_projects_controller.rb
+4
-4
ee/app/views/admin/geo_projects/_all.html.haml
ee/app/views/admin/geo_projects/_all.html.haml
+5
-5
ee/app/views/admin/geo_projects/_failed.html.haml
ee/app/views/admin/geo_projects/_failed.html.haml
+9
-11
ee/app/views/admin/geo_projects/_never.html.haml
ee/app/views/admin/geo_projects/_never.html.haml
+4
-4
ee/app/views/admin/geo_projects/_pending.html.haml
ee/app/views/admin/geo_projects/_pending.html.haml
+6
-6
ee/app/views/admin/geo_projects/index.html.haml
ee/app/views/admin/geo_projects/index.html.haml
+4
-4
locale/gitlab.pot
locale/gitlab.pot
+63
-6
No files found.
ee/app/controllers/admin/geo_projects_controller.rb
View file @
2c629b26
...
...
@@ -24,26 +24,26 @@ class Admin::GeoProjectsController < Admin::ApplicationController
def
recheck
@registry
.
flag_repository_for_recheck!
redirect_back_or_admin_geo_projects
(
notice:
"
#{
@registry
.
project
.
full_name
}
is scheduled for recheck"
)
redirect_back_or_admin_geo_projects
(
notice:
s_
(
'Geo|%{name} is scheduled for re-check'
)
%
{
name:
@registry
.
project
.
full_name
}
)
end
def
resync
@registry
.
flag_repository_for_resync!
redirect_back_or_admin_geo_projects
(
notice:
"
#{
@registry
.
project
.
full_name
}
is scheduled for resync"
)
redirect_back_or_admin_geo_projects
(
notice:
s_
(
'Geo|%{name} is scheduled for re-sync'
)
%
{
name:
@registry
.
project
.
full_name
}
)
end
def
force_redownload
@registry
.
flag_repository_for_redownload!
redirect_back_or_admin_geo_projects
(
notice:
"
#{
@registry
.
project
.
full_name
}
is scheduled for forced re-download"
)
redirect_back_or_admin_geo_projects
(
notice:
s_
(
'Geo|%{name} is scheduled for forced re-download'
)
%
{
name:
@registry
.
project
.
full_name
}
)
end
private
def
check_license
unless
Gitlab
::
Geo
.
license_allows?
redirect_to
admin_license_path
,
alert:
'You need a different license to use Geo replication'
redirect_to
admin_license_path
,
alert:
s_
(
'Geo|You need a different license to use Geo replication'
)
end
end
...
...
ee/app/views/admin/geo_projects/_all.html.haml
View file @
2c629b26
...
...
@@ -7,24 +7,24 @@
=
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
Resync
=
s_
(
'Geo|Resync'
)
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
=
s_
(
'Geo|Status'
)
.project-status-content.status-type-failure
In sync
=
s_
(
'Geo|In sync'
)
.col-sm.project-status-container
.project-status-title.text-muted
Last successful sync
=
s_
(
'Geo|Last successful sync'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_successful_sync_at
)
if
project_registry
.
last_repository_successful_sync_at
.col-sm.project-status-container
.project-status-title.text-muted
Last time verified
=
s_
(
'Geo|Last time verified'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_check_at
)
if
project_registry
.
last_repository_check_at
...
...
ee/app/views/admin/geo_projects/_failed.html.haml
View file @
2c629b26
...
...
@@ -9,9 +9,9 @@
=
project_registry
.
project
.
name
-
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
Redownload
=
s_
(
'Geo|Redownload'
)
=
link_to
(
resync_admin_geo_project_path
(
project_registry
),
method: :post
,
class:
'btn btn-outline-primary btn-sm'
)
do
Resync
=
s_
(
'Geo|Resync'
)
.collapse.show
{
id:
"project-#{project_registry.project.id}"
,
'aria-labelledby'
=>
"project-#{project_registry.project.id}-header"
}
.card-body
...
...
@@ -19,22 +19,22 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
=
s_
(
'Geo|Status'
)
.project-status-content.status-type-failure
Failed
=
s_
(
'Geo|Failed'
)
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
=
s_
(
'Geo|Next sync scheduled at'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
repository_retry_at
)
if
project_registry
.
repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
=
s_
(
'Geo|Last sync attempt'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
last_repository_synced_at
)
if
project_registry
.
last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
=
s_
(
'Geo|Retry counts'
)
.project-status-content
=
project_registry
.
repository_retry_count
...
...
@@ -57,13 +57,11 @@
%li
.p-0.d-flex
=
sprite_icon
(
'warning'
,
size:
18
,
css_class:
'error-icon'
)
%span
.error-text.prepend-left-5
Synchronization failed -
=
project_registry
.
last_repository_sync_failure
=
s_
(
'Geo|Synchronization failed - %{error}'
)
%
{
error:
project_registry
.
last_repository_sync_failure
}
-
if
project_registry
.
last_repository_verification_failure
%li
.p-0.d-flex
=
sprite_icon
(
'warning'
,
size:
18
,
css_class:
'error-icon'
)
%span
.error-text.prepend-left-5
Verification failed -
=
project_registry
.
last_repository_verification_failure
=
s_
(
'Geo|Verification failed - %{error}'
)
%
{
error:
project_registry
.
last_repository_verification_failure
}
=
paginate
@registries
,
theme:
'gitlab'
ee/app/views/admin/geo_projects/_never.html.haml
View file @
2c629b26
...
...
@@ -14,22 +14,22 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
=
s_
(
'Geo|Next sync scheduled at'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project
.
project_registry
.
repository_retry_at
)
if
project
.
project_registry
&
.
repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
=
s_
(
'Geo|Last sync attempt'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project
.
project_registry
.
last_repository_synced_at
)
if
project
.
project_registry
&
.
last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
=
s_
(
'Geo|Retry counts'
)
.project-status-content
=
project
.
project_registry
.
repository_retry_count
if
project
.
project_registry
.col-sm.project-status-container
.project-status-title.text-muted
Error message
=
s_
(
'Geo|Error message'
)
.project-status-content.font-weight-bold
=
project
.
project_registry
.
last_repository_sync_failure
if
project
.
project_registry
...
...
ee/app/views/admin/geo_projects/_pending.html.haml
View file @
2c629b26
...
...
@@ -10,7 +10,7 @@
=
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
Resync
=
s_
(
'Geo|Resync'
)
.collapse.show
{
id:
"project-#{project_registry.project.id}"
,
'aria-labelledby'
=>
"project-#{project_registry.project.id}-header"
}
.card-body
...
...
@@ -18,21 +18,21 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
=
s_
(
'Geo|Status'
)
.project-status-content.status-type-failure
Pending
=
s_
(
'Geo|Pending'
)
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
=
s_
(
'Geo|Next sync scheduled at'
)
.project-status-content
=
distance_of_time_in_words
(
Time
.
now
,
project_registry
.
repository_retry_at
)
if
project_registry
.
repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
=
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
)
-
else
Never
=
s_
(
'Geo|Never'
)
=
paginate
@registries
,
theme:
'gitlab'
ee/app/views/admin/geo_projects/index.html.haml
View file @
2c629b26
...
...
@@ -9,16 +9,16 @@
-
opts
=
params
[
:sync_status
].
present?
?
{}
:
{
page:
admin_geo_projects_path
}
=
nav_link
(
opts
)
do
=
link_to
admin_geo_projects_path
do
=
_
(
"Synced"
)
=
s_
(
'Geo|Synced'
)
=
nav_link
(
html_options:
{
class:
active_when
(
params
[
:sync_status
]
==
'pending'
)
})
do
=
link_to
admin_geo_projects_path
(
sync_status:
'pending'
)
do
=
_
(
"Pending"
)
=
s_
(
'Geo|Pending'
)
=
nav_link
(
html_options:
{
class:
active_when
(
params
[
:sync_status
]
==
'failed'
)
})
do
=
link_to
admin_geo_projects_path
(
sync_status:
'failed'
)
do
=
_
(
"Failed"
)
=
s_
(
'Geo|Failed'
)
=
nav_link
(
html_options:
{
class:
active_when
(
params
[
:sync_status
]
==
'never'
)
})
do
=
link_to
admin_geo_projects_path
(
sync_status:
'never'
)
do
=
_
(
"Never"
)
=
s_
(
'Geo|Never'
)
-
case
params
[
:sync_status
]
-
when
'never'
...
...
locale/gitlab.pot
View file @
2c629b26
...
...
@@ -3220,33 +3220,96 @@ msgstr ""
msgid "GeoNodes|You have configured Geo nodes using an insecure HTTP connection. We recommend the use of HTTPS."
msgstr ""
msgid "Geo|%{name} is scheduled for forced re-download"
msgstr ""
msgid "Geo|%{name} is scheduled for re-check"
msgstr ""
msgid "Geo|%{name} is scheduled for re-sync"
msgstr ""
msgid "Geo|All projects"
msgstr ""
msgid "Geo|Error message"
msgstr ""
msgid "Geo|Failed"
msgstr ""
msgid "Geo|File sync capacity"
msgstr ""
msgid "Geo|Groups to synchronize"
msgstr ""
msgid "Geo|In sync"
msgstr ""
msgid "Geo|Last successful sync"
msgstr ""
msgid "Geo|Last sync attempt"
msgstr ""
msgid "Geo|Last time verified"
msgstr ""
msgid "Geo|Never"
msgstr ""
msgid "Geo|Next sync scheduled at"
msgstr ""
msgid "Geo|Pending"
msgstr ""
msgid "Geo|Projects in certain groups"
msgstr ""
msgid "Geo|Projects in certain storage shards"
msgstr ""
msgid "Geo|Recheck"
msgstr ""
msgid "Geo|Redownload"
msgstr ""
msgid "Geo|Repository sync capacity"
msgstr ""
msgid "Geo|Resync"
msgstr ""
msgid "Geo|Retry counts"
msgstr ""
msgid "Geo|Select groups to replicate."
msgstr ""
msgid "Geo|Shards to synchronize"
msgstr ""
msgid "Geo|Status"
msgstr ""
msgid "Geo|Synced"
msgstr ""
msgid "Geo|Synchronization failed - %{error}"
msgstr ""
msgid "Geo|Verification capacity"
msgstr ""
msgid "Geo|Verification failed - %{error}"
msgstr ""
msgid "Geo|You need a different license to use Geo replication"
msgstr ""
msgid "Git"
msgstr ""
...
...
@@ -4342,9 +4405,6 @@ msgstr ""
msgid "Network"
msgstr ""
msgid "Never"
msgstr ""
msgid "New"
msgstr ""
...
...
@@ -6181,9 +6241,6 @@ msgstr ""
msgid "Sync information"
msgstr ""
msgid "Synced"
msgstr ""
msgid "System Hooks"
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