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
38510e7c
Commit
38510e7c
authored
Mar 13, 2020
by
Sean Arnold
Committed by
Ash McKenzie
Mar 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide Status Page Operations Settings behind a beta feature flag
parent
4fb5d866
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
ee/app/controllers/ee/projects/settings/operations_controller.rb
...controllers/ee/projects/settings/operations_controller.rb
+2
-1
ee/app/views/projects/settings/operations/_status_page.html.haml
...views/projects/settings/operations/_status_page.html.haml
+1
-1
ee/spec/controllers/projects/settings/operations_controller_spec.rb
...ntrollers/projects/settings/operations_controller_spec.rb
+13
-3
No files found.
ee/app/controllers/ee/projects/settings/operations_controller.rb
View file @
38510e7c
...
...
@@ -42,7 +42,8 @@ module EE
end
def
has_status_page_license?
project
.
feature_available?
(
:status_page
,
current_user
)
project
.
feature_available?
(
:status_page
,
current_user
)
&&
project
.
beta_feature_available?
(
:status_page
)
end
def
track_tracing_external_url
...
...
ee/app/views/projects/settings/operations/_status_page.html.haml
View file @
38510e7c
-
return
unless
@project
.
feature_available?
(
:status_page
,
current_user
)
-
return
unless
@project
.
feature_available?
(
:status_page
,
current_user
)
&&
@project
.
beta_feature_available?
(
:status_page
)
-
setting
=
status_page_settings_data
(
@project
.
status_page_setting
)
...
...
ee/spec/controllers/projects/settings/operations_controller_spec.rb
View file @
38510e7c
...
...
@@ -288,11 +288,21 @@ describe Projects::Settings::OperationsController do
project
.
add_maintainer
(
user
)
end
it
'creates a status page setting'
do
subject
(
:status_page_setting
)
do
valid_attributes
=
attributes_for
(
:status_page_setting
).
except
(
:enabled
)
update_project
(
project
,
status_page_params:
valid_attributes
)
expect
(
project
.
status_page_setting
).
not_to
eq
(
nil
)
expect
(
project
.
status_page_setting
).
to
be_a
(
StatusPageSetting
)
project
.
status_page_setting
end
it
{
is_expected
.
to
be_a
(
StatusPageSetting
)
}
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
status_page:
false
)
end
it
{
is_expected
.
to
be_nil
}
end
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