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 @@ -411,6 +396,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 @@ -221,9 +221,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 @@ -116,8 +116,5 @@ export default { }, SET_SERVER_PENDING_CHANGES(state, value) { state.server.hasPendingChanges = value }, SET_NUMBER_PENDING_POST_REQUESTS(state, value) { state.server.numPendingPostRequests = value } } src/views/DatasetView.vue +0 −3 Original line number Diff line number Diff line Loading @@ -54,9 +54,6 @@ export default { activeImageName() { return this.$store.getters.activeImageName(this.activeCamera) }, pendingPostRequestsCount() { return this.$store.getters.pendingPostRequestsCount }, cameraStatusGUI() { let result = {} for (const ID of this.cameraIDs) { Loading 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 @@ -411,6 +396,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 @@ -221,9 +221,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 @@ -116,8 +116,5 @@ export default { }, SET_SERVER_PENDING_CHANGES(state, value) { state.server.hasPendingChanges = value }, SET_NUMBER_PENDING_POST_REQUESTS(state, value) { state.server.numPendingPostRequests = value } }
src/views/DatasetView.vue +0 −3 Original line number Diff line number Diff line Loading @@ -54,9 +54,6 @@ export default { activeImageName() { return this.$store.getters.activeImageName(this.activeCamera) }, pendingPostRequestsCount() { return this.$store.getters.pendingPostRequestsCount }, cameraStatusGUI() { let result = {} for (const ID of this.cameraIDs) { Loading