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
a6d171f3
Commit
a6d171f3
authored
Feb 04, 2019
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo: Add settings page empty state
parent
4a93250b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
30 deletions
+50
-30
ee/app/views/admin/application_settings/_geo.html.haml
ee/app/views/admin/application_settings/_geo.html.haml
+24
-23
ee/changelogs/unreleased/8380-geo-settings-empty-state.yml
ee/changelogs/unreleased/8380-geo-settings-empty-state.yml
+5
-0
ee/spec/features/admin/admin_settings_spec.rb
ee/spec/features/admin/admin_settings_spec.rb
+21
-7
No files found.
ee/app/views/admin/application_settings/_geo.html.haml
View file @
a6d171f3
-
return
unless
Gitlab
::
Geo
.
license_allows?
%section
.settings.as-geo.no-animate
#js-geo-settings
{
class:
(
'expanded'
if
expanded
)
}
-
if
Gitlab
::
Geo
.
license_allows?
%section
.settings.as-geo.no-animate
#js-geo-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'GitLab Geo'
)
...
...
@@ -24,3 +23,5 @@
status will time out.
=
f
.
submit
'Save changes'
,
class:
"btn btn-success"
-
else
=
render
'shared/empty_states/geo'
ee/changelogs/unreleased/8380-geo-settings-empty-state.yml
0 → 100644
View file @
a6d171f3
---
title
:
"
Geo:
Add
settings
page
empty
state"
merge_request
:
9415
author
:
type
:
changed
ee/spec/features/admin/admin_settings_spec.rb
View file @
a6d171f3
...
...
@@ -9,7 +9,9 @@ describe 'Admin updates EE-only settings' do
allow
(
License
).
to
receive
(
:feature_available?
).
and_return
(
true
)
end
it
'Modify GitLab Geo settings'
do
context
'Geo settings'
do
context
'when the license has Geo feature'
do
it
'allows users to change Geo settings'
do
visit
geo_admin_application_settings_path
page
.
within
(
'.as-geo'
)
do
fill_in
'Connection timeout'
,
with:
15
...
...
@@ -19,6 +21,18 @@ describe 'Admin updates EE-only settings' do
expect
(
Gitlab
::
CurrentSettings
.
geo_status_timeout
).
to
eq
(
15
)
expect
(
page
).
to
have_content
"Application settings saved successfully"
end
end
context
'when the license does not have Geo feature'
do
it
'shows empty page'
do
allow
(
License
).
to
receive
(
:feature_available?
).
and_return
(
false
)
visit
geo_admin_application_settings_path
expect
(
page
).
to
have_content
"Discover GitLab Geo"
end
end
end
it
'Enable external authentication'
do
visit
admin_application_settings_path
...
...
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