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
Léo-Paul Géneau
gitlab-ce
Commits
7f5ae2e8
Commit
7f5ae2e8
authored
Sep 07, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed how the backend response is handled for when instead of series
parent
851ada82
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
app/assets/javascripts/monitoring/utils/multiple_time_series.js
...sets/javascripts/monitoring/utils/multiple_time_series.js
+2
-3
spec/javascripts/monitoring/graph/legend_spec.js
spec/javascripts/monitoring/graph/legend_spec.js
+1
-1
spec/javascripts/monitoring/graph_path_spec.js
spec/javascripts/monitoring/graph_path_spec.js
+2
-2
spec/javascripts/monitoring/mock_data.js
spec/javascripts/monitoring/mock_data.js
+1
-1
No files found.
app/assets/javascripts/monitoring/utils/multiple_time_series.js
View file @
7f5ae2e8
...
@@ -68,8 +68,8 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra
...
@@ -68,8 +68,8 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra
.
y1
(
d
=>
timeSeriesScaleY
(
d
.
value
));
.
y1
(
d
=>
timeSeriesScaleY
(
d
.
value
));
const
timeSeriesMetricLabel
=
timeSeries
.
metric
[
Object
.
keys
(
timeSeries
.
metric
)[
0
]];
const
timeSeriesMetricLabel
=
timeSeries
.
metric
[
Object
.
keys
(
timeSeries
.
metric
)[
0
]];
const
seriesCustomizationData
=
queryData
.
series
!=
null
&&
const
seriesCustomizationData
=
queryData
.
when
!=
null
&&
_
.
findWhere
(
queryData
.
series
[
0
].
series
,
_
.
findWhere
(
queryData
.
when
[
0
].
series
,
{
value
:
timeSeriesMetricLabel
});
{
value
:
timeSeriesMetricLabel
});
if
(
seriesCustomizationData
!=
null
)
{
if
(
seriesCustomizationData
!=
null
)
{
metricTag
=
seriesCustomizationData
.
value
||
timeSeriesMetricLabel
;
metricTag
=
seriesCustomizationData
.
value
||
timeSeriesMetricLabel
;
...
@@ -90,4 +90,3 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra
...
@@ -90,4 +90,3 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra
};
};
});
});
}
}
spec/javascripts/monitoring/graph/legend_spec.js
View file @
7f5ae2e8
...
@@ -93,7 +93,7 @@ describe('GraphLegend', () => {
...
@@ -93,7 +93,7 @@ describe('GraphLegend', () => {
const
component
=
createComponent
(
defaultValuesComponent
);
const
component
=
createComponent
(
defaultValuesComponent
);
const
titles
=
component
.
$el
.
querySelectorAll
(
'
.legend-metric-title
'
);
const
titles
=
component
.
$el
.
querySelectorAll
(
'
.legend-metric-title
'
);
expect
(
titles
[
0
].
textContent
.
indexOf
(
'
hundred(s)
'
)).
not
.
toEqual
(
-
1
);
expect
(
titles
[
0
].
textContent
.
indexOf
(
'
1xx
'
)).
not
.
toEqual
(
-
1
);
expect
(
titles
[
1
].
textContent
.
indexOf
(
'
2xx
'
)).
not
.
toEqual
(
-
1
);
expect
(
titles
[
1
].
textContent
.
indexOf
(
'
2xx
'
)).
not
.
toEqual
(
-
1
);
expect
(
getTextFromNode
(
component
,
'
.y-label-text
'
)).
toEqual
(
component
.
yAxisLabel
);
expect
(
getTextFromNode
(
component
,
'
.y-label-text
'
)).
toEqual
(
component
.
yAxisLabel
);
});
});
...
...
spec/javascripts/monitoring/graph_path_spec.js
View file @
7f5ae2e8
...
@@ -27,9 +27,9 @@ describe('Monitoring Paths', () => {
...
@@ -27,9 +27,9 @@ describe('Monitoring Paths', () => {
const
metricArea
=
component
.
$el
.
querySelector
(
'
.metric-area
'
);
const
metricArea
=
component
.
$el
.
querySelector
(
'
.metric-area
'
);
const
metricLine
=
component
.
$el
.
querySelector
(
'
.metric-line
'
);
const
metricLine
=
component
.
$el
.
querySelector
(
'
.metric-line
'
);
expect
(
metricArea
.
getAttribute
(
'
fill
'
)).
toBe
(
'
#8
dd5aa
'
);
expect
(
metricArea
.
getAttribute
(
'
fill
'
)).
toBe
(
'
#8
fbce8
'
);
expect
(
metricArea
.
getAttribute
(
'
d
'
)).
toBe
(
firstTimeSeries
.
areaPath
);
expect
(
metricArea
.
getAttribute
(
'
d
'
)).
toBe
(
firstTimeSeries
.
areaPath
);
expect
(
metricLine
.
getAttribute
(
'
stroke
'
)).
toBe
(
'
#1
aaa55
'
);
expect
(
metricLine
.
getAttribute
(
'
stroke
'
)).
toBe
(
'
#1
f78d1
'
);
expect
(
metricLine
.
getAttribute
(
'
d
'
)).
toBe
(
firstTimeSeries
.
linePath
);
expect
(
metricLine
.
getAttribute
(
'
d
'
)).
toBe
(
firstTimeSeries
.
linePath
);
});
});
});
});
spec/javascripts/monitoring/mock_data.js
View file @
7f5ae2e8
...
@@ -6347,7 +6347,7 @@ export const singleRowMetricsMultipleSeries = [
...
@@ -6347,7 +6347,7 @@ export const singleRowMetricsMultipleSeries = [
]
]
},
},
],
],
'
series
'
:
[
'
when
'
:
[
{
{
'
value
'
:
'
hundred(s)
'
,
'
value
'
:
'
hundred(s)
'
,
'
color
'
:
'
green
'
,
'
color
'
:
'
green
'
,
...
...
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