debian-mirror-gitlab/app/services/projects/prometheus/alerts/alert_params.rb
2020-04-22 19:07:51 +05:30

17 lines
338 B
Ruby

# frozen_string_literal: true
module Projects
module Prometheus
module Alerts
module AlertParams
def alert_params
return params if params[:operator].blank?
params.merge(
operator: PrometheusAlert.operator_to_enum(params[:operator])
)
end
end
end
end
end