chore(ui): remove unused fetchFluxTasks action creator
parent
e9e3aeccdf
commit
38da202ff3
|
@ -12,7 +12,6 @@ import {
|
|||
import {
|
||||
updateFluxTaskStatus as updateFluxTaskStatusAPI,
|
||||
deleteFluxTask as deleteFluxTaskAPI,
|
||||
getFluxTasks,
|
||||
} from 'src/kapacitor/apis/fluxTasks'
|
||||
|
||||
import {errorThrown} from 'shared/actions/errors'
|
||||
|
@ -114,19 +113,6 @@ export const fetchRules = kapacitor => async dispatch => {
|
|||
}
|
||||
}
|
||||
|
||||
export const fetchFluxTasks = kapacitor => async dispatch => {
|
||||
try {
|
||||
const tasks = await getFluxTasks(kapacitor)
|
||||
dispatch({type: 'LOAD_FLUX_TASKS', payload: {tasks}})
|
||||
} catch (error) {
|
||||
dispatch({type: 'LOAD_FLUX_TASKS', payload: {tasks: null}})
|
||||
// dispatch an error unless flux tasks are disabled/not supported
|
||||
if (error.status !== 404) {
|
||||
dispatch(errorThrown(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const chooseTrigger = (ruleID, trigger) => ({
|
||||
type: 'CHOOSE_TRIGGER',
|
||||
payload: {
|
||||
|
|
Loading…
Reference in New Issue