diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-04 09:06:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-04 09:06:33 +0000 |
commit | c4038d4bdff93b260cbdcd69f9a6c0b07a849457 (patch) | |
tree | 7b74ce5a60a97324dec5c61ac477ca74e3db36e9 /app/assets/javascripts/monitoring | |
parent | d07169c8ae0ebad0f23d03f01aeaf9acfa7e02d1 (diff) | |
download | gitlab-ce-c4038d4bdff93b260cbdcd69f9a6c0b07a849457.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring')
-rw-r--r-- | app/assets/javascripts/monitoring/components/dashboard.vue | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index c08b471bd51..9e376a52702 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -252,23 +252,18 @@ export default { 'setEndpoints', 'setPanelGroupMetrics', ]), - updateMetrics(key, panels) { + updatePanels(key, panels) { this.setPanelGroupMetrics({ panels, key, }); }, - removeMetric(key, metrics, graphIndex) { + removePanel(key, panels, graphIndex) { this.setPanelGroupMetrics({ - metrics: metrics.filter((v, i) => i !== graphIndex), + panels: panels.filter((v, i) => i !== graphIndex), key, }); }, - removeGraph(metrics, graphIndex) { - // At present graphs will not be removed, they should removed using the vuex store - // See https://gitlab.com/gitlab-org/gitlab/issues/27835 - metrics.splice(graphIndex, 1); - }, showInvalidDateError() { createFlash(s__('Metrics|Link contains an invalid time window.')); }, @@ -463,7 +458,7 @@ export default { group="metrics-dashboard" :component-data="{ attrs: { class: 'row mx-0 w-100' } }" :disabled="!isRearrangingPanels" - @input="updateMetrics(groupData.key, $event)" + @input="updatePanels(groupData.key, $event)" > <div v-for="(graphData, graphIndex) in groupData.panels" @@ -475,7 +470,7 @@ export default { <div v-if="isRearrangingPanels" class="draggable-remove js-draggable-remove p-2 w-100 position-absolute d-flex justify-content-end" - @click="removeGraph(groupData.panels, graphIndex)" + @click="removePanel(groupData.key, groupData.panels, graphIndex)" > <a class="mx-2 p-2 draggable-remove-link" :aria-label="__('Remove')" ><icon name="close" |