({commit, state}, executionId)
| 25 | }, |
| 26 | |
| 27 | selectExecution({commit, state}, executionId) { |
| 28 | if (isEmptyString(executionId)) { |
| 29 | commit('SET_EXECUTION_DETAILS', {id: executionId, execution: null}); |
| 30 | commit('SET_DETAILS_LOADING', false); |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | let execution = findById(state.executions, executionId); |
| 35 | if (isNull(execution)) { |
| 36 | execution = { |
| 37 | id: executionId, |
| 38 | user: 'Unknown', |
| 39 | script: 'Unknown' |
| 40 | }; |
| 41 | } |
| 42 | commit('SET_EXECUTION_DETAILS', {id: executionId, execution}); |
| 43 | commit('SET_DETAILS_LOADING', true); |
| 44 | |
| 45 | axiosInstance.get('history/execution_log/long/' + executionId).then(({data: incomingLog}) => { |
| 46 | if (executionId !== state.selectedExecutionId) { |
| 47 | return; |
| 48 | } |
| 49 | |
| 50 | const executionLog = translateExecutionLog(incomingLog); |
| 51 | |
| 52 | commit('SET_EXECUTION_DETAILS', {id: executionId, execution: executionLog}); |
| 53 | commit('SET_DETAILS_LOADING', false); |
| 54 | }).catch((error) => { |
| 55 | logError(error); |
| 56 | }); |
| 57 | } |
| 58 | }, |
| 59 | mutations: { |
| 60 | SET_LOADING(state, loading) { |
nothing calls this directly
no test coverage detected