| 8 | namespaced: true, |
| 9 | actions: { |
| 10 | init({commit}) { |
| 11 | commit('SET_LOADING', true); |
| 12 | |
| 13 | axiosInstance.get('scripts', {params: {mode: 'edit'}}).then(({data}) => { |
| 14 | const {scripts} = data; |
| 15 | let scriptConfigs = scripts.map(s => ({name: s.name, parsingFailed: s.parsing_failed})); |
| 16 | scriptConfigs.sort(function (e1, e2) { |
| 17 | return e1.name.toLowerCase().localeCompare(e2.name.toLowerCase()); |
| 18 | }); |
| 19 | |
| 20 | commit('SET_SCRIPTS', scriptConfigs); |
| 21 | commit('SET_LOADING', false); |
| 22 | }) |
| 23 | } |
| 24 | }, |
| 25 | mutations: { |
| 26 | SET_LOADING(state, loading) { |