Commit 4d753e0f authored by Tristan Read's avatar Tristan Read Committed by James Fargher

Skeleton route and view for alert management details page

parent 349bcc1c
...@@ -6,6 +6,9 @@ class Projects::AlertManagementController < Projects::ApplicationController ...@@ -6,6 +6,9 @@ class Projects::AlertManagementController < Projects::ApplicationController
def index def index
end end
def details
end
private private
def ensure_feature_enabled def ensure_feature_enabled
......
...@@ -277,7 +277,9 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -277,7 +277,9 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end end
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 namespace :error_tracking do
resources :projects, only: :index resources :projects, only: :index
......
...@@ -1689,6 +1689,9 @@ msgid_plural "Alerts" ...@@ -1689,6 +1689,9 @@ msgid_plural "Alerts"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Alert Details"
msgstr ""
msgid "AlertManagement|Alert" msgid "AlertManagement|Alert"
msgstr "" msgstr ""
......
...@@ -6,6 +6,7 @@ describe Projects::AlertManagementController do ...@@ -6,6 +6,7 @@ describe Projects::AlertManagementController do
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:role) { :reporter } let_it_be(:role) { :reporter }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:id) { 1 }
before do before do
project.add_role(user, role) project.add_role(user, role)
...@@ -37,4 +38,30 @@ describe Projects::AlertManagementController do ...@@ -37,4 +38,30 @@ describe Projects::AlertManagementController do
end end
end 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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment