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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
56efb9ee
Commit
56efb9ee
authored
Jun 06, 2018
by
Mike Greiling
Committed by
Phil Hughes
Jun 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust monitoring graphs to support widgets in EE
parent
45444c8e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
12 deletions
+27
-12
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+4
-1
app/assets/javascripts/monitoring/components/graph.vue
app/assets/javascripts/monitoring/components/graph.vue
+8
-3
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+12
-1
spec/javascripts/monitoring/graph_spec.js
spec/javascripts/monitoring/graph_spec.js
+3
-7
No files found.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
56efb9ee
...
...
@@ -174,7 +174,10 @@ export default {
:tags-path=
"tagsPath"
:show-legend=
"showLegend"
:small-graph=
"forceSmallGraph"
/>
>
<!-- EE content -->
{{
null
}}
</graph>
</graph-group>
</div>
<empty-state
...
...
app/assets/javascripts/monitoring/components/graph.vue
View file @
56efb9ee
...
...
@@ -232,9 +232,14 @@ export default {
@
mouseover=
"showFlagContent = true"
@
mouseleave=
"showFlagContent = false"
>
<h5
class=
"text-center graph-title"
>
<div
class=
"prometheus-graph-header"
>
<h5
class=
"prometheus-graph-title"
>
{{
graphData
.
title
}}
</h5>
<div
class=
"prometheus-graph-widgets"
>
<slot></slot>
</div>
</div>
<div
class=
"prometheus-svg-container"
:style=
"paddingBottomRootSvg"
...
...
app/assets/stylesheets/pages/environments.scss
View file @
56efb9ee
...
...
@@ -23,7 +23,6 @@
}
.btn-group
{
>
a
{
color
:
$gl-text-color-secondary
;
}
...
...
@@ -245,6 +244,7 @@
.prometheus-graph
{
flex
:
1
0
auto
;
min-width
:
450px
;
max-width
:
100%
;
padding
:
$gl-padding
/
2
;
h5
{
...
...
@@ -256,6 +256,17 @@
}
}
.prometheus-graph-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
$gl-padding-8
;
h5
{
margin
:
0
;
}
}
.prometheus-graph-cursor
{
position
:
absolute
;
background
:
$theme-gray-600
;
...
...
spec/javascripts/monitoring/graph_spec.js
View file @
56efb9ee
...
...
@@ -18,9 +18,7 @@ const createComponent = propsData => {
}).
$mount
();
};
const
convertedMetrics
=
convertDatesMultipleSeries
(
singleRowMetricsMultipleSeries
,
);
const
convertedMetrics
=
convertDatesMultipleSeries
(
singleRowMetricsMultipleSeries
);
describe
(
'
Graph
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
@@ -36,7 +34,7 @@ describe('Graph', () => {
projectPath
,
});
expect
(
component
.
$el
.
querySelector
(
'
.
text-center
'
).
innerText
.
trim
()).
toBe
(
expect
(
component
.
$el
.
querySelector
(
'
.
prometheus-graph-title
'
).
innerText
.
trim
()).
toBe
(
component
.
graphData
.
title
,
);
});
...
...
@@ -52,9 +50,7 @@ describe('Graph', () => {
});
const
transformedHeight
=
`
${
component
.
graphHeight
-
100
}
`
;
expect
(
component
.
axisTransform
.
indexOf
(
transformedHeight
)).
not
.
toEqual
(
-
1
,
);
expect
(
component
.
axisTransform
.
indexOf
(
transformedHeight
)).
not
.
toEqual
(
-
1
);
});
it
(
'
outerViewBox gets a width and height property based on the DOM size of the element
'
,
()
=>
{
...
...
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