Loading src/components/header/Header.vue +0 −3 Original line number Diff line number Diff line Loading @@ -115,9 +115,6 @@ export default { }, // --- pendingPostRequestsCount() { return this.$store.getters.pendingPostRequestsCount }, hasUncommitedChanges() { return this.$store.getters.hasUncommitedChanges }, Loading src/store/actions.js +4 −18 Original line number Diff line number Diff line Loading @@ -7,23 +7,8 @@ const _sendPostRequest = (state, commit, webCmd, isCommit = false) => { return } commit('SET_SERVER_PENDING_CHANGES', !isCommit) commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests + 1 ) return webCmd() .then(() => { commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests - 1 ) }) .catch(err => { return webCmd().catch(err => { console.log('POST failed: ' + err) commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests - 1 ) }) } Loading Loading @@ -449,6 +434,7 @@ export default { commitChangesToDisk({ state, commit }) { const webCmd = () => DatasetService.commitChangesToDisk() _sendPostRequest(state, commit, webCmd) commit('SET_SERVER_PENDING_CHANGES', false) }, setActivePoint({ commit, getters, state }, { stickID, cameraID, imageName }) { // Check stickID and cameraID validity. Loading src/store/getters.js +0 −3 Original line number Diff line number Diff line Loading @@ -227,9 +227,6 @@ export default { return result }, pendingPostRequestsCount: state => { return state.server.numPendingPostRequests }, hasUncommitedChanges: state => { return state.server.hasPendingChanges }, Loading src/store/index.js +0 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,6 @@ export default new Vuex.Store({ }, redrawTrigger: false, // Value is not important, the change of state will trigger chart redrawing. server: { numPendingPostRequests: 0, hasPendingChanges: false }, filters: { Loading src/store/mutations.js +0 −3 Original line number Diff line number Diff line Loading @@ -128,9 +128,6 @@ export default { }, SET_SERVER_PENDING_CHANGES(state, value) { state.server.hasPendingChanges = value }, SET_NUMBER_PENDING_POST_REQUESTS(state, value) { state.server.numPendingPostRequests = value } // addStick(state, { cameraID, imageName, stickID, stickData, webCmd }) { // // _sendPostRequest(state, webCmd) Loading Loading
src/components/header/Header.vue +0 −3 Original line number Diff line number Diff line Loading @@ -115,9 +115,6 @@ export default { }, // --- pendingPostRequestsCount() { return this.$store.getters.pendingPostRequestsCount }, hasUncommitedChanges() { return this.$store.getters.hasUncommitedChanges }, Loading
src/store/actions.js +4 −18 Original line number Diff line number Diff line Loading @@ -7,23 +7,8 @@ const _sendPostRequest = (state, commit, webCmd, isCommit = false) => { return } commit('SET_SERVER_PENDING_CHANGES', !isCommit) commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests + 1 ) return webCmd() .then(() => { commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests - 1 ) }) .catch(err => { return webCmd().catch(err => { console.log('POST failed: ' + err) commit( 'SET_NUMBER_PENDING_POST_REQUESTS', state.server.numPendingPostRequests - 1 ) }) } Loading Loading @@ -449,6 +434,7 @@ export default { commitChangesToDisk({ state, commit }) { const webCmd = () => DatasetService.commitChangesToDisk() _sendPostRequest(state, commit, webCmd) commit('SET_SERVER_PENDING_CHANGES', false) }, setActivePoint({ commit, getters, state }, { stickID, cameraID, imageName }) { // Check stickID and cameraID validity. Loading
src/store/getters.js +0 −3 Original line number Diff line number Diff line Loading @@ -227,9 +227,6 @@ export default { return result }, pendingPostRequestsCount: state => { return state.server.numPendingPostRequests }, hasUncommitedChanges: state => { return state.server.hasPendingChanges }, Loading
src/store/index.js +0 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,6 @@ export default new Vuex.Store({ }, redrawTrigger: false, // Value is not important, the change of state will trigger chart redrawing. server: { numPendingPostRequests: 0, hasPendingChanges: false }, filters: { Loading
src/store/mutations.js +0 −3 Original line number Diff line number Diff line Loading @@ -128,9 +128,6 @@ export default { }, SET_SERVER_PENDING_CHANGES(state, value) { state.server.hasPendingChanges = value }, SET_NUMBER_PENDING_POST_REQUESTS(state, value) { state.server.numPendingPostRequests = value } // addStick(state, { cameraID, imageName, stickID, stickData, webCmd }) { // // _sendPostRequest(state, webCmd) Loading