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
30c7b1e2
Commit
30c7b1e2
authored
Jan 05, 2022
by
Zack Cuddy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo Replication - Convert Nav to GlTabs
This change converts the Geo Replication Nav to GlTabs.
parent
96d653f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
ee/app/views/admin/geo/shared/_replication_nav.haml
ee/app/views/admin/geo/shared/_replication_nav.haml
+4
-13
ee/spec/features/admin/geo/admin_geo_replication_nav_spec.rb
ee/spec/features/admin/geo/admin_geo_replication_nav_spec.rb
+5
-5
No files found.
ee/app/views/admin/geo/shared/_replication_nav.haml
View file @
30c7b1e2
...
...
@@ -5,17 +5,8 @@
=
_
(
'Geo Replication'
)
%p
=
s_
(
'Geo|Review replication status, and resynchronize and reverify items with the primary site.'
)
%ul
.nav-links.nav.nav-tabs.border-top.border-bottom.border-secondary-100
=
nav_link
(
path:
'admin/geo/projects#index'
,
html_options:
{
class:
'gl-pr-2'
})
do
=
link_to
admin_geo_projects_path
,
title:
_
(
'Projects'
)
do
%span
=
_
(
'Projects'
)
=
nav_link
(
path:
'admin/geo/designs#index'
,
html_options:
{
class:
'gl-pr-2'
})
do
=
link_to
admin_geo_designs_path
,
title:
_
(
'Designs'
)
do
%span
=
_
(
'Designs'
)
=
gl_tabs_nav
({
class:
'border-top border-bottom border-secondary-100'
})
do
=
gl_tab_link_to
_
(
'Projects'
),
admin_geo_replicables_path
(
replicable_name_plural:
'projects'
),
{
title:
_
(
'Projects'
),
class:
'gl-mr-2'
}
=
gl_tab_link_to
_
(
'Designs'
),
admin_geo_replicables_path
(
replicable_name_plural:
'designs'
),
{
title:
_
(
'Designs'
),
class:
'gl-mr-2'
}
-
Gitlab
::
Geo
.
enabled_replicator_classes
.
each
do
|
replicator_class
|
=
nav_link
(
page:
[{
controller:
'admin/geo/replicables'
,
action:
'index'
,
replicable_name_plural:
replicator_class
.
replicable_name_plural
}],
html_options:
{
class:
'gl-pr-2'
})
do
=
link_to
admin_geo_replicables_path
(
replicable_name_plural:
replicator_class
.
replicable_name_plural
),
title:
replicator_class
.
replicable_title_plural
do
%span
=
replicator_class
.
replicable_title_plural
=
gl_tab_link_to
replicator_class
.
replicable_title_plural
,
admin_geo_replicables_path
(
replicable_name_plural:
replicator_class
.
replicable_name_plural
),
{
title:
replicator_class
.
replicable_title_plural
,
class:
'gl-mr-2'
}
ee/spec/features/admin/geo/admin_geo_replication_nav_spec.rb
View file @
30c7b1e2
...
...
@@ -22,20 +22,20 @@ RSpec.describe 'admin Geo Replication Nav', :js, :geo do
end
it
'has active class'
do
navigation_link
=
page
.
find
(
"a[title=
\"
#{
link_name
}
\"
]"
).
find
(
:xpath
,
'..'
)
navigation_link
=
page
.
find
(
'a'
,
text:
link_name
)
expect
(
navigation_link
[
:class
]).
to
include
(
'active'
)
end
end
describe
'visit admin/geo/replication/projects'
do
it_behaves_like
'active sidebar link'
,
'Projects'
do
let
(
:path
)
{
admin_geo_
projects_path
}
let
(
:path
)
{
admin_geo_
replicables_path
(
replicable_name_plural:
'projects'
)
}
end
end
describe
'visit admin/geo/replication/designs'
do
it_behaves_like
'active sidebar link'
,
'Designs'
do
let
(
:path
)
{
admin_geo_
designs_path
}
let
(
:path
)
{
admin_geo_
replicables_path
(
replicable_name_plural:
'designs'
)
}
end
end
...
...
@@ -46,11 +46,11 @@ RSpec.describe 'admin Geo Replication Nav', :js, :geo do
end
end
it
'displays enable replicator replication details nav links'
do
it
'displays enable
d
replicator replication details nav links'
do
visit
admin_geo_replicables_path
(
replicable_name_plural:
'projects'
)
Gitlab
::
Geo
.
enabled_replicator_classes
.
each
do
|
replicator_class
|
navbar
=
page
.
find
(
".
nav-links.nav.nav-tabs
"
)
navbar
=
page
.
find
(
".
gl-tabs-nav
"
)
expect
(
navbar
).
to
have_link
replicator_class
.
replicable_title_plural
end
...
...
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