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
2a829d0f
Commit
2a829d0f
authored
Jul 03, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the y_label not setting correctly for each graph on the monitoring dashboard
parent
c8eef2d2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
app/assets/javascripts/monitoring/components/monitoring_column.vue
...s/javascripts/monitoring/components/monitoring_column.vue
+1
-1
changelogs/unreleased/monitoring-dashboard-fix-y-label.yml
changelogs/unreleased/monitoring-dashboard-fix-y-label.yml
+4
-0
spec/javascripts/monitoring/mock_data.js
spec/javascripts/monitoring/mock_data.js
+2
-2
spec/javascripts/monitoring/monitoring_column_spec.js
spec/javascripts/monitoring/monitoring_column_spec.js
+11
-0
No files found.
app/assets/javascripts/monitoring/components/monitoring_column.vue
View file @
2a829d0f
...
...
@@ -104,7 +104,7 @@
}
this
.
data
=
query
.
result
[
0
].
values
;
this
.
unitOfDisplay
=
query
.
unit
||
'
N/A
'
;
this
.
yAxisLabel
=
this
.
columnData
.
y_
axis
||
'
Values
'
;
this
.
yAxisLabel
=
this
.
columnData
.
y_
label
||
'
Values
'
;
this
.
legendTitle
=
query
.
legend
||
'
Average
'
;
this
.
graphWidth
=
this
.
$refs
.
baseSvg
.
clientWidth
-
this
.
margin
.
left
-
this
.
margin
.
right
;
...
...
changelogs/unreleased/monitoring-dashboard-fix-y-label.yml
0 → 100644
View file @
2a829d0f
---
title
:
Fixed the y_label not setting correctly for each graph on the monitoring dashboard
merge_request
:
author
:
spec/javascripts/monitoring/mock_data.js
View file @
2a829d0f
...
...
@@ -13,7 +13,7 @@ const metricsGroupsAPIResponse = {
'
queries
'
:
[
{
'
query_range
'
:
'
avg(container_memory_usage_bytes{%{environment_filter}}) / 2^20
'
,
'
label
'
:
'
Container m
emory
'
,
'
y_label
'
:
'
M
emory
'
,
'
unit
'
:
'
MiB
'
,
'
result
'
:
[
{
...
...
@@ -2477,7 +2477,7 @@ export const singleRowMetrics = [
{
'
title
'
:
'
CPU usage
'
,
'
weight
'
:
1
,
'
y_label
'
:
'
Values
'
,
'
y_label
'
:
'
Memory
'
,
'
queries
'
:
[
{
'
query_range
'
:
'
avg(rate(container_cpu_usage_seconds_total{%{environment_filter}}[2m])) * 100
'
,
...
...
spec/javascripts/monitoring/monitoring_column_spec.js
View file @
2a829d0f
...
...
@@ -94,4 +94,15 @@ describe('MonitoringColumn', () => {
done
();
});
});
it
(
'
has a title for the y-axis that comes from the backend
'
,
()
=>
{
const
component
=
createComponent
({
columnData
:
singleRowMetrics
[
0
],
classType
:
'
col-md-6
'
,
updateAspectRatio
:
false
,
deploymentData
,
});
expect
(
component
.
yAxisLabel
).
toEqual
(
component
.
columnData
.
y_label
);
});
});
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