diff options
author | Simon Knox <psimyn@gmail.com> | 2019-07-22 19:23:33 +1000 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2019-07-26 12:06:10 +1000 |
commit | 091b00baa7c210b279628de95527e944f85c85a8 (patch) | |
tree | 881815a0eb614b05dfc40268d20d3f4ede57716c | |
parent | 513daf3dd6e48fe935ce5f062f8ffd201aee1503 (diff) | |
download | gitlab-ce-alerts-dropdown-to-modal-ce.tar.gz |
Add More Actions dropdown to metrics chartsalerts-dropdown-to-modal-ce
-rw-r--r-- | app/assets/javascripts/monitoring/components/dashboard.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/monitoring/components/panel_type.vue | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 745488255ab..45543ef2cc8 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -369,7 +369,7 @@ export default { </div> <div v-if="!showEmptyState"> <graph-group - v-for="groupData in groups" + v-for="(groupData, index) in groups" :key="`${groupData.group}.${groupData.priority}`" :name="groupData.group" :show-panels="showPanels" @@ -381,6 +381,7 @@ export default { :key="`panel-type-${graphIndex}`" :graph-data="graphData" :dashboard-width="elWidth" + :index="`${index}-${graphIndex}`" /> </template> <template v-else> @@ -399,6 +400,7 @@ export default { :alerts-endpoint="alertsEndpoint" :relevant-queries="graphData.queries" :alerts-to-manage="getGraphAlerts(graphData.queries)" + :modal-id="`alert-modal-${index}-${graphIndex}`" @setAlerts="setAlerts" /> </monitor-area-chart> diff --git a/app/assets/javascripts/monitoring/components/panel_type.vue b/app/assets/javascripts/monitoring/components/panel_type.vue index d7cd2c57871..f1f02964a29 100644 --- a/app/assets/javascripts/monitoring/components/panel_type.vue +++ b/app/assets/javascripts/monitoring/components/panel_type.vue @@ -20,6 +20,11 @@ export default { type: Number, required: true, }, + index: { + type: String, + required: false, + default: '', + }, }, computed: { ...mapState('monitoringDashboard', ['deploymentData', 'projectPath']), @@ -64,6 +69,7 @@ export default { :alerts-endpoint="alertsEndpoint" :relevant-queries="graphData.queries" :alerts-to-manage="getGraphAlerts(graphData.queries)" + :modal-id="`alert-modal-${index}`" @setAlerts="setAlerts" /> </monitor-area-chart> |