diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-11-15 14:39:29 +0000 |
---|---|---|
committer | Aakriti Gupta <agupta@gitlab.com> | 2019-11-20 10:42:17 +0100 |
commit | b3076997eb00021004063cf552fb07bbd117e81a (patch) | |
tree | 2605f5a10a7c3161fd74a823f203c68e5d61d1f8 /app/assets/javascripts | |
parent | cd6d264948e09fd44fdbe9c5d0324761c3d22814 (diff) | |
download | gitlab-ce-b3076997eb00021004063cf552fb07bbd117e81a.tar.gz |
Ensure that summary items remain aligned
Default number of items is 3. If this is not the case,
then increase the column width of the summary items
to cater for 2 items plus the date filter.
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js index cd67ba5fab8..1074ce0e744 100644 --- a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js +++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js @@ -58,10 +58,16 @@ export default () => { service: this.createCycleAnalyticsService(cycleAnalyticsEl.dataset.requestPath), }; }, + defaultNumberOfSummaryItems: 3, computed: { currentStage() { return this.store.currentActiveStage(); }, + summaryTableColumnClass() { + return this.state.summary.length === this.$options.defaultNumberOfSummaryItems + ? 'col-sm-3' + : 'col-sm-4'; + }, }, created() { // Conditional check placed here to prevent this method from being called on the |