debian-mirror-gitlab/app/services/metrics/dashboard/cluster_metrics_embed_service.rb
2020-08-09 17:44:08 +05:30

37 lines
800 B
Ruby

# frozen_string_literal: true
#
module Metrics
module Dashboard
class ClusterMetricsEmbedService < Metrics::Dashboard::DynamicEmbedService
class << self
def valid_params?(params)
[
params[:cluster],
embedded?(params[:embedded]),
params[:group].present?,
params[:title].present?,
params[:y_label].present?
].all?
end
end
private
# Permissions are handled at the controller level
def allowed?
true
end
def dashboard_path
::Metrics::Dashboard::ClusterDashboardService::DASHBOARD_PATH
end
def sequence
[
STAGES::ClusterEndpointInserter,
STAGES::PanelIdsInserter
]
end
end
end
end