Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 15:09:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-29 15:09:20 +0300
commita0b26c6df5eb37ba347a0ffb3bb54ddaab7979a8 (patch)
treeb39a9cae3bfe890917b9e99d280813f18007461d /app/assets/javascripts/helpers
parent9ce66d4dcfe444ac27fb13b3e064de8bbf3572ef (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/helpers')
-rw-r--r--app/assets/javascripts/helpers/monitor_helper.js22
1 files changed, 7 insertions, 15 deletions
diff --git a/app/assets/javascripts/helpers/monitor_helper.js b/app/assets/javascripts/helpers/monitor_helper.js
index 94a0d38f05f..5f85ee58779 100644
--- a/app/assets/javascripts/helpers/monitor_helper.js
+++ b/app/assets/javascripts/helpers/monitor_helper.js
@@ -65,18 +65,10 @@ const getSeriesLabel = (queryLabel, metricAttributes) => {
*/
// eslint-disable-next-line import/prefer-default-export
export const makeDataSeries = (queryResults, defaultConfig) =>
- queryResults
- .map(result => {
- // NaN values may disrupt avg., max. & min. calculations in the legend, filter them out
- const data = result.values.filter(([, value]) => !Number.isNaN(value));
- if (!data.length) {
- return null;
- }
- const series = { data };
- return {
- ...defaultConfig,
- ...series,
- name: getSeriesLabel(defaultConfig.name, result.metric),
- };
- })
- .filter(series => series !== null);
+ queryResults.map(result => {
+ return {
+ ...defaultConfig,
+ data: result.values,
+ name: getSeriesLabel(defaultConfig.name, result.metric),
+ };
+ });