diff options
Diffstat (limited to 'app/controllers/projects/prometheus')
-rw-r--r-- | app/controllers/projects/prometheus/alerts_controller.rb | 10 | ||||
-rw-r--r-- | app/controllers/projects/prometheus/metrics_controller.rb | 7 |
2 files changed, 5 insertions, 12 deletions
diff --git a/app/controllers/projects/prometheus/alerts_controller.rb b/app/controllers/projects/prometheus/alerts_controller.rb index 5e1b9570fa0..c3dc17694d9 100644 --- a/app/controllers/projects/prometheus/alerts_controller.rb +++ b/app/controllers/projects/prometheus/alerts_controller.rb @@ -14,19 +14,11 @@ module Projects prepend_before_action :repository, :project_without_auth, only: [:notify] before_action :authorize_read_prometheus_alerts!, except: [:notify] - before_action :alert, only: [:show, :metrics_dashboard] + before_action :alert, only: [:metrics_dashboard] feature_category :incident_management urgency :low - def index - render json: serialize_as_json(alerts) - end - - def show - render json: serialize_as_json(alert) - end - def notify token = extract_alert_manager_token(request) result = notify_service.execute(token) diff --git a/app/controllers/projects/prometheus/metrics_controller.rb b/app/controllers/projects/prometheus/metrics_controller.rb index c5778ba15f2..db5471ea322 100644 --- a/app/controllers/projects/prometheus/metrics_controller.rb +++ b/app/controllers/projects/prometheus/metrics_controller.rb @@ -7,6 +7,7 @@ module Projects before_action :require_prometheus_metrics! feature_category :metrics + urgency :low def active_common respond_to do |format| @@ -66,7 +67,7 @@ module Projects ) if @metric.persisted? - redirect_to edit_project_integration_path(project, ::Integrations::Prometheus), + redirect_to edit_project_settings_integration_path(project, ::Integrations::Prometheus), notice: _('Metric was successfully added.') else render 'new' @@ -77,7 +78,7 @@ module Projects @metric = prometheus_metric if @metric.update(metrics_params) - redirect_to edit_project_integration_path(project, ::Integrations::Prometheus), + redirect_to edit_project_settings_integration_path(project, ::Integrations::Prometheus), notice: _('Metric was successfully updated.') else render 'edit' @@ -93,7 +94,7 @@ module Projects respond_to do |format| format.html do - redirect_to edit_project_integration_path(project, ::Integrations::Prometheus), status: :see_other + redirect_to edit_project_settings_integration_path(project, ::Integrations::Prometheus), status: :see_other end format.json do head :ok |