Fixed onError propagation

This commit is contained in:
Joel Collins 2020-12-04 15:08:39 +00:00
parent 213dec3e5c
commit 08f653233b
8 changed files with 13 additions and 26 deletions

View file

@ -198,7 +198,6 @@ export default {
if (!error) {
error = Error("Unknown error");
}
this.$emit("error", error);
this.$emit("finished");
})

View file

@ -248,9 +248,8 @@
:submit-data="scanPayload"
:submit-label="'Start Scan'"
:button-primary="true"
@submit="onScanSubmit"
@response="onScanResponse"
@error="onScanError"
@error="modalError"
>
</taskSubmitter>
</div>
@ -433,14 +432,8 @@ export default {
});
},
onScanSubmit: function() {},
onScanResponse: function() {
this.modalNotify("Finished scan.");
},
onScanError: function(error) {
this.modalError(error);
}
}
};

View file

@ -119,7 +119,6 @@ export default {
deleteAll: function() {
axios.all(this.allURLs.map(l => axios.delete(l))).then(() => {
console.log("Delete finished")
// Emit signal to update capture list
this.$root.$emit("globalUpdateCaptures");
});

View file

@ -18,7 +18,7 @@
:submit-label="'Create ZIP'"
:submit-data="captureIds"
@response="onResponse"
@error="onError"
@error="modalError"
>
</taskSubmitter>
</div>
@ -163,10 +163,6 @@ export default {
this.lastSessionId = response.output.id;
this.downloadUrl = `${this.zipGetterUri}/${this.lastSessionId}`;
this.downloadReady = true;
},
onError: function(error) {
this.modalError(error); // Let mixin handle error
}
}
};

View file

@ -148,6 +148,7 @@
:submit-on-event="'globalFastAutofocusEvent'"
@taskStarted="isAutofocusing = 1"
@finished="isAutofocusing = 0"
@error="modalError"
></taskSubmitter>
</div>
@ -160,6 +161,7 @@
:button-primary="false"
@taskStarted="isAutofocusing = 2"
@finished="isAutofocusing = 0"
@error="modalError"
></taskSubmitter>
</div>
@ -172,6 +174,7 @@
:button-primary="false"
@taskStarted="isAutofocusing = 3"
@finished="isAutofocusing = 0"
@error="modalError"
></taskSubmitter>
</div>
</div>

View file

@ -12,7 +12,7 @@
:submit-url="recalibrationLinks.calibrate_xy.href"
:submit-label="'Auto-Calibrate using camera'"
@response="onRecalibrateResponse"
@error="onRecalibrateError"
@error="modalError"
>
</taskSubmitter>
</div>
@ -149,10 +149,6 @@ export default {
this.modalNotify("Finished stage-to-camera calibration.");
// Update local settings
this.updateSettings();
},
onRecalibrateError: function(error) {
this.modalError(error); // Let mixin handle error
}
}
};

View file

@ -11,7 +11,7 @@
:submit-url="recalibrationLinks.recalibrate.href"
:submit-label="'Auto-Calibrate'"
@response="onRecalibrateResponse"
@error="onRecalibrateError"
@error="modalError"
>
</taskSubmitter>
</div>
@ -128,10 +128,6 @@ export default {
this.modalNotify("Finished recalibration.");
},
onRecalibrateError: function(error) {
this.modalError(error); // Let mixin handle error
},
flattenLensShadingTableRequest: function() {
axios.post(this.recalibrationLinks.flatten_lens_shading_table.href);
},

View file

@ -95,7 +95,7 @@
submit-label="Start scan"
@submit="scanRunning = true"
@response="scanRunning = false"
@error="scanRunning = false"
@error="onScanError"
></taskSubmitter>
<br />
@ -293,6 +293,11 @@ export default {
pad(tzo % 60)
);
}
},
onScanError: function(error) {
this.scanRunning = false;
this.modalError(error);
}
};
</script>