Commit 95b45c9a authored by allison.browne's avatar allison.browne

Cluster Embed changes based on code review

parent 5e92ffc3
......@@ -3,8 +3,6 @@
module Banzai
module Filter
class InlineClusterMetricsFilter < ::Banzai::Filter::InlineEmbedsFilter
include ::Gitlab::Utils::StrongMemoize
def create_element(params)
doc.document.create_element(
'div',
......@@ -39,7 +37,7 @@ module Banzai
params[:cluster_id],
# Only Project clusters are supported for now
# admin and group cluster types may be supported in the future
cluster_type: 'project',
cluster_type: :project,
embedded: true,
format: :json,
**query_params(params['url'])
......
......@@ -7,7 +7,7 @@ describe Banzai::Filter::InlineClusterMetricsFilter do
let!(:cluster) { create(:cluster) }
let!(:project) { create(:project) }
let(:params) { [project.path, project.namespace.path, cluster.id] }
let(:params) { [project.namespace.path, project.path, cluster.id] }
let(:query_params) { { group: 'Food metrics', title: 'Pizza Consumption', y_label: 'Slice Count' } }
let(:trigger_url) { urls.metrics_namespace_project_cluster_url(*params, **query_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