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
f7525758
Commit
f7525758
authored
May 06, 2020
by
Tristan Read
Committed by
Dmytro Zaporozhets
May 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Alert Detail view to new feature flag
parent
3eddd876
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
app/controllers/projects/alert_management_controller.rb
app/controllers/projects/alert_management_controller.rb
+7
-2
spec/controllers/projects/alert_management_controller_spec.rb
.../controllers/projects/alert_management_controller_spec.rb
+4
-4
No files found.
app/controllers/projects/alert_management_controller.rb
View file @
f7525758
# frozen_string_literal: true
class
Projects::AlertManagementController
<
Projects
::
ApplicationController
before_action
:ensure_feature_enabled
before_action
:ensure_list_feature_enabled
,
only: :index
before_action
:ensure_detail_feature_enabled
,
only: :details
def
index
end
...
...
@@ -11,7 +12,11 @@ class Projects::AlertManagementController < Projects::ApplicationController
private
def
ensure_feature_enabled
def
ensure_
list_
feature_enabled
render_404
unless
Feature
.
enabled?
(
:alert_management_minimal
,
project
)
end
def
ensure_detail_feature_enabled
render_404
unless
Feature
.
enabled?
(
:alert_management_detail
,
project
)
end
end
spec/controllers/projects/alert_management_controller_spec.rb
View file @
f7525758
...
...
@@ -40,9 +40,9 @@ describe Projects::AlertManagementController do
end
describe
'GET #details'
do
context
'when alert_management_
minima
l is enabled'
do
context
'when alert_management_
detai
l is enabled'
do
before
do
stub_feature_flags
(
alert_management_
minima
l:
true
)
stub_feature_flags
(
alert_management_
detai
l:
true
)
end
it
'shows the page'
do
...
...
@@ -52,9 +52,9 @@ describe Projects::AlertManagementController do
end
end
context
'when alert_management_
minima
l is disabled'
do
context
'when alert_management_
detai
l is disabled'
do
before
do
stub_feature_flags
(
alert_management_
minima
l:
false
)
stub_feature_flags
(
alert_management_
detai
l:
false
)
end
it
'shows 404'
do
...
...
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