Commit bad8dde3 authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla

Fix broken cluster health dashboard

Monitoring dashboard component does not
handle cases where all_dashboards is not
present in the payload
parent 7e1b5741
......@@ -84,7 +84,10 @@ export const fetchDashboard = ({ state, dispatch }, params) => {
return backOffRequest(() => axios.get(state.dashboardEndpoint, { params }))
.then(resp => resp.data)
.then(response => {
dispatch('receiveMetricsDashboardSuccess', { response, params });
dispatch('receiveMetricsDashboardSuccess', {
response,
params,
});
})
.catch(error => {
dispatch('receiveMetricsDashboardFailure', error);
......
......@@ -94,7 +94,7 @@ export default {
state.emptyState = 'noData';
},
[types.SET_ALL_DASHBOARDS](state, dashboards) {
state.allDashboards = dashboards;
state.allDashboards = dashboards || [];
},
[types.SET_SHOW_ERROR_BANNER](state, enabled) {
state.showErrorBanner = enabled;
......
---
title: Fix broken monitor cluster health dashboard
merge_request: 20120
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment