Commit 1952fafb authored by Pawel Chojnacki's avatar Pawel Chojnacki

destroy metrics endpoint

parent 9441ba2f
module Projects
module Prometheus
class MetricsController < Projects::ApplicationController
before_action :authorize_read_project!
before_action :authorize_admin_project!
before_action :require_prometheus_metrics!
def active_common
......@@ -75,6 +75,13 @@ module Projects
@metric = project.prometheus_metrics.find(params[:id])
end
def destroy
@metric = project.prometheus_metrics.find(params[:id])
@metric.destroy
redirect_to project_prometheus_metrics(@project), status: 302
end
private
def query_validation_params
......
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