diff options
author | Adriel Santiago <asantiago@gitlab.com> | 2019-04-19 02:09:15 +0300 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-04-19 02:09:15 +0300 |
commit | d753db3f14fa3c0949f172283a8db487d68f35a8 (patch) | |
tree | 27fde8d1312d120e5f86d7d85776535e2d84f5b6 /app | |
parent | e9bf3672dff56cf845114856a17ea72328215bcf (diff) |
Resolve cluster metrics regression
Fixes a regression causing cluster metrics not to display
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/monitoring/stores/monitoring_store.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/monitoring/stores/monitoring_store.js b/app/assets/javascripts/monitoring/stores/monitoring_store.js index 9761fe168be..013fb0d4540 100644 --- a/app/assets/javascripts/monitoring/stores/monitoring_store.js +++ b/app/assets/javascripts/monitoring/stores/monitoring_store.js @@ -45,14 +45,13 @@ function removeTimeSeriesNoData(queries) { // ] function groupQueriesByChartInfo(metrics) { const metricsByChart = metrics.reduce((accumulator, metric) => { - const { id, queries, ...chart } = metric; + const { queries, ...chart } = metric; + const metricId = chart.id ? chart.id.toString() : null; const chartKey = `${chart.title}|${chart.y_label}`; accumulator[chartKey] = accumulator[chartKey] || { ...chart, queries: [] }; - queries.forEach(queryAttrs => - accumulator[chartKey].queries.push({ metricId: id.toString(), ...queryAttrs }), - ); + queries.forEach(queryAttrs => accumulator[chartKey].queries.push({ metricId, ...queryAttrs })); return accumulator; }, {}); |