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
10d2b76d
Commit
10d2b76d
authored
May 15, 2020
by
Tristan Read
Committed by
Clement Ho
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove alert_management_detail feature flag
parent
a62bea15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
31 deletions
+11
-31
app/controllers/projects/alert_management_controller.rb
app/controllers/projects/alert_management_controller.rb
+0
-7
changelogs/unreleased/tr-remove-alert-detail-feature-flag.yml
...gelogs/unreleased/tr-remove-alert-detail-feature-flag.yml
+5
-0
spec/controllers/projects/alert_management_controller_spec.rb
.../controllers/projects/alert_management_controller_spec.rb
+6
-24
No files found.
app/controllers/projects/alert_management_controller.rb
View file @
10d2b76d
# frozen_string_literal: true
class
Projects::AlertManagementController
<
Projects
::
ApplicationController
before_action
:ensure_detail_feature_enabled
,
only: :details
before_action
:authorize_read_alert_management_alert!
before_action
do
push_frontend_feature_flag
(
:alert_list_status_filtering_enabled
)
...
...
@@ -14,10 +13,4 @@ class Projects::AlertManagementController < Projects::ApplicationController
def
details
@alert_id
=
params
[
:id
]
end
private
def
ensure_detail_feature_enabled
render_404
unless
Feature
.
enabled?
(
:alert_management_detail
,
project
)
end
end
changelogs/unreleased/tr-remove-alert-detail-feature-flag.yml
0 → 100644
View file @
10d2b76d
---
title
:
Add Alert Detail view
merge_request
:
31877
author
:
type
:
added
spec/controllers/projects/alert_management_controller_spec.rb
View file @
10d2b76d
...
...
@@ -32,35 +32,17 @@ describe Projects::AlertManagementController do
end
describe
'GET #details'
do
context
'when alert_management_detail is enabled'
do
before
do
stub_feature_flags
(
alert_management_detail:
true
)
end
it
'shows the page'
do
get
:details
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
id
}
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
end
context
'when user is unauthorized'
do
let
(
:role
)
{
:reporter
}
it
'shows 404'
do
get
:index
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
it
'shows the page'
do
get
:details
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
id
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
end
context
'when alert_management_detail is disabled'
do
before
do
stub_feature_flags
(
alert_management_detail:
false
)
end
context
'when user is unauthorized'
do
let
(
:role
)
{
:reporter
}
it
'shows 404'
do
get
:
details
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
id
}
get
:
index
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
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