diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-07-17 20:44:26 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-07-17 20:44:26 +0000 |
commit | cb1a827e85d3b05a7e80ddf5674af45f3dbb0e53 (patch) | |
tree | 5bf86aa5887278eaf93a855b5b7642c0a4cdb2e2 /app/assets | |
parent | 2f16eab03d8af372ae8461de5abf91b480ffd761 (diff) | |
parent | 236e752bfbb140b5cbe03f500b479eacdc7f98e0 (diff) | |
download | gitlab-ce-cb1a827e85d3b05a7e80ddf5674af45f3dbb0e53.tar.gz |
Merge branch '49257-metrics-drop-down-doesn-t-show-all-environment-some-not-clickable' into 'master'
Resolve "Metrics drop down doesn't show all environment, some not clickable"
Closes #49257
See merge request gitlab-org/gitlab-ce!20651
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/monitoring/stores/monitoring_store.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/monitoring/stores/monitoring_store.js b/app/assets/javascripts/monitoring/stores/monitoring_store.js index 748b8cb6e6e..176f7d9eef2 100644 --- a/app/assets/javascripts/monitoring/stores/monitoring_store.js +++ b/app/assets/javascripts/monitoring/stores/monitoring_store.js @@ -1,7 +1,10 @@ import _ from 'underscore'; function sortMetrics(metrics) { - return _.chain(metrics).sortBy('title').sortBy('weight').value(); + return _.chain(metrics) + .sortBy('title') + .sortBy('weight') + .value(); } function normalizeMetrics(metrics) { @@ -39,7 +42,9 @@ export default class MonitoringStore { } storeEnvironmentsData(environmentsData = []) { - this.environmentsData = environmentsData; + this.environmentsData = environmentsData.filter( + environment => !!environment.latest.last_deployment, + ); } getMetricsCount() { |