Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
95b45c9a
Commit
95b45c9a
authored
Feb 21, 2020
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cluster Embed changes based on code review
parent
5e92ffc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
ee/lib/banzai/filter/inline_cluster_metrics_filter.rb
ee/lib/banzai/filter/inline_cluster_metrics_filter.rb
+1
-3
ee/spec/lib/banzai/filter/inline_cluster_metrics_filter_spec.rb
...c/lib/banzai/filter/inline_cluster_metrics_filter_spec.rb
+1
-1
No files found.
ee/lib/banzai/filter/inline_cluster_metrics_filter.rb
View file @
95b45c9a
...
...
@@ -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'
])
...
...
ee/spec/lib/banzai/filter/inline_cluster_metrics_filter_spec.rb
View file @
95b45c9a
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment