Remove obsolete action and reducer for editing template variable
parent
7763d780ca
commit
85327b1b46
|
@ -122,14 +122,6 @@ export const templateVariableSelected = (dashboardID, templateID, values) => ({
|
|||
},
|
||||
})
|
||||
|
||||
export const editTemplateVariableSuccess = (dashboardID, data) => ({
|
||||
type: 'EDIT_TEMPLATE_VARIABLE_SUCCESS',
|
||||
payload: {
|
||||
dashboardID,
|
||||
data,
|
||||
},
|
||||
})
|
||||
|
||||
// Async Action Creators
|
||||
|
||||
export const getDashboardsAsync = () => async dispatch => {
|
||||
|
|
|
@ -211,20 +211,6 @@ export default function ui(state = initialState, action) {
|
|||
})
|
||||
return {...state, dashboards: newDashboards}
|
||||
}
|
||||
|
||||
case 'EDIT_TEMPLATE_VARIABLE_SUCCESS': {
|
||||
const {dashboardID, data} = action.payload
|
||||
const dashboards = state.dashboards.map(
|
||||
d =>
|
||||
(d.id === dashboardID
|
||||
? {
|
||||
...d,
|
||||
templates: data,
|
||||
}
|
||||
: d)
|
||||
)
|
||||
return {...state, dashboards}
|
||||
}
|
||||
}
|
||||
|
||||
return state
|
||||
|
|
Loading…
Reference in New Issue