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
4d753e0f
Commit
4d753e0f
authored
Apr 29, 2020
by
Tristan Read
Committed by
James Fargher
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skeleton route and view for alert management details page
parent
349bcc1c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
1 deletion
+37
-1
app/controllers/projects/alert_management_controller.rb
app/controllers/projects/alert_management_controller.rb
+3
-0
app/views/projects/alert_management/details.html.haml
app/views/projects/alert_management/details.html.haml
+1
-0
config/routes/project.rb
config/routes/project.rb
+3
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/controllers/projects/alert_management_controller_spec.rb
.../controllers/projects/alert_management_controller_spec.rb
+27
-0
No files found.
app/controllers/projects/alert_management_controller.rb
View file @
4d753e0f
...
...
@@ -6,6 +6,9 @@ class Projects::AlertManagementController < Projects::ApplicationController
def
index
end
def
details
end
private
def
ensure_feature_enabled
...
...
app/views/projects/alert_management/details.html.haml
0 → 100644
View file @
4d753e0f
-
page_title
_
(
'Alert Details'
)
config/routes/project.rb
View file @
4d753e0f
...
...
@@ -277,7 +277,9 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
resources
:alert_management
,
only:
[
:index
],
controller: :alert_management
resources
:alert_management
,
only:
[
:index
]
do
get
'details'
,
on: :member
end
namespace
:error_tracking
do
resources
:projects
,
only: :index
...
...
locale/gitlab.pot
View file @
4d753e0f
...
...
@@ -1689,6 +1689,9 @@ msgid_plural "Alerts"
msgstr[0] ""
msgstr[1] ""
msgid "Alert Details"
msgstr ""
msgid "AlertManagement|Alert"
msgstr ""
...
...
spec/controllers/projects/alert_management_controller_spec.rb
View file @
4d753e0f
...
...
@@ -6,6 +6,7 @@ describe Projects::AlertManagementController do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:role
)
{
:reporter
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:id
)
{
1
}
before
do
project
.
add_role
(
user
,
role
)
...
...
@@ -37,4 +38,30 @@ describe Projects::AlertManagementController do
end
end
end
describe
'GET #details'
do
context
'when alert_management_minimal is enabled'
do
before
do
stub_feature_flags
(
alert_management_minimal:
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
end
context
'when alert_management_minimal is disabled'
do
before
do
stub_feature_flags
(
alert_management_minimal:
false
)
end
it
'shows 404'
do
get
:details
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
id
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
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