Commit 09fe5c30 authored by Pawel Chojnacki's avatar Pawel Chojnacki

rename active metrics route

parent 776c71aa
......@@ -4,7 +4,7 @@ module Projects
before_action :authorize_read_project!
before_action :require_prometheus_metrics!
def active
def active_common
respond_to do |format|
format.json do
matched_metrics = prometheus_service.matched_metrics || {}
......
......@@ -28,7 +28,7 @@
= link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(@project), class: 'btn btn-success'
%ul.list-unstyled.metrics-list.hidden.js-custom-metrics-list
.panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{active_project_prometheus_metrics_path(@project, :json)}" } }
.panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{active_common_project_prometheus_metrics_path(@project, :json)}" } }
.panel-heading
%h3.panel-title
= s_('PrometheusService|Common metrics')
......
......@@ -75,7 +75,7 @@ constraints(ProjectUrlConstrainer.new) do
namespace :prometheus do
resources :metrics, constraints: { id: /[^\/]+/ }, only: [:index, :new, :create, :edit, :update, :destroy] do
post :validate_query, on: :collection
get :active, on: :collection
get :active_common, on: :collection
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