Removed old console logs

This commit is contained in:
Joel Collins 2020-11-23 13:08:44 +00:00
parent 358d44189b
commit 2e34722d6e
23 changed files with 21 additions and 103 deletions

View file

@ -199,15 +199,13 @@ export default {
(state, getters) => {
return getters.uriV2;
},
uriV2 => {
() => {
this.checkConnection();
console.log(uriV2);
}
);
// Keyboard shortcuts
Mousetrap.bind("?", () => {
console.log(this.keyboardManual);
this.toggleModalElement(this.$refs["keyboardManualModal"]); // Calls the mixin
});
@ -290,7 +288,6 @@ export default {
// Remove origin watcher
this.unwatchOriginFunction();
// Remove key listeners
console.log("Resetting Mousetrap");
Mousetrap.reset();
},
@ -313,7 +310,6 @@ export default {
},
handleExit: function() {
console.log("Triggered beforeunload");
this.$root.$emit("globalTogglePreview", false);
},

View file

@ -230,7 +230,6 @@ export default {
pluginsGuiList: function() {
// List of plugin GUIs, obtained from this.plugins values
console.log("Recalculating plugins");
var pluginGuis = [];
for (let plugin of Object.values(this.plugins)) {
if (plugin.meta.gui) {
@ -304,11 +303,9 @@ export default {
methods: {
updatePlugins: function() {
console.log("Updating plugin forms");
return axios
.get(this.pluginsUri)
.then(response => {
console.log(response);
this.plugins = response.data;
})
.catch(error => {
@ -333,8 +330,6 @@ export default {
},
enterApp: function() {
// Stuff to do once connected and all init modals are finished
console.log("Entering main application");
//this.currentTab = "view";
}
}
};

View file

@ -111,11 +111,6 @@ export default {
this.$delete(newSelected, key);
this.$emit("input", newSelected);
},
modifyValue: function(e, v) {
console.log(e);
console.log(v);
}
}
};

View file

@ -138,7 +138,6 @@ export default {
checkExistingTasks: function() {
axios.get(this.submitUrl).then(response => {
console.log(response.data);
for (const task of response.data) {
if (task.status == "pending" || task.status == "running") {
this.taskStarted = true;
@ -165,10 +164,10 @@ export default {
startTask: function() {
// Starts a new Action task
console.log("Task start clicked");
this.$emit("submit", this.submitData);
// Send a request to start a task
console.log("Submitting to ", this.submitUrl);
this.taskStarted = true;
this.$emit("taskStarted", this.taskId);
axios
@ -191,7 +190,7 @@ export default {
this.pollTask(this.taskId, this.pollInterval)
.then(response => {
// Do something with the final response
console.log("Emitting onResponse: ", response);
this.$emit("response", response);
this.$emit("finished");
})
@ -199,12 +198,11 @@ export default {
if (!error) {
error = Error("Unknown error");
}
console.log("Emitting onError: ", error);
this.$emit("error", error);
this.$emit("finished");
})
.finally(() => {
console.log("Cleaning up after task.");
// Reset taskRunning and taskId
this.taskRunning = false;
this.taskStarted = false;
@ -223,7 +221,6 @@ export default {
var checkCondition = (resolve, reject) => {
// If the condition is met, we're done!
axios.get(this.taskUrl).then(response => {
console.log(response.data.status);
var result = response.data.status;
// If the task ends with success
if (result == "completed") {
@ -232,13 +229,13 @@ export default {
// If task ends with an error
else if (result == "error") {
// Pass the error string back with reject
console.log("Rejecting pollTask due to error");
reject(new Error(response.data.output));
}
// If task ends with termination
else if (result == "cancelled") {
// Pass a generic termination error back with reject
console.log("Rejecting pollTask due to cancellation");
reject(new Error("Task cancelled"));
} else {
// Since the task is still running, we can update the progress bar
@ -253,19 +250,13 @@ export default {
},
pollProgress: function() {
console.log("Starting progress polling");
axios.get(this.taskUrl).then(response => {
console.log("PROGRESS RESPONSE: ", response.data.progress);
this.progress = response.data.progress;
});
},
terminateTask: function() {
console.log("Terminating task...");
axios.delete(this.taskUrl).then(response => {
console.log("TERMINATION RESPONSE: ", response.data);
});
axios.delete(this.taskUrl);
}
}
};

View file

@ -265,7 +265,6 @@ export default {
},
onHide: function() {
console.log("UIKit modal hidden");
this.$emit("onClose");
},

View file

@ -201,8 +201,6 @@ export default {
},
updateForm() {
// Trigger a plugin form update
console.log("Emitting reloadForms");
this.$emit("reloadForms");
},
@ -214,14 +212,10 @@ export default {
},
newQuickRequest: function(params) {
console.log(this.submitApiUri);
console.log(params);
// Send a quick request
axios
.post(this.submitApiUri, params)
.then(response => {
// Do something with the response
console.log(response);
.then(() => {
// Do all the finished request stuff
this.onSubmissionCompleted();
})
@ -232,8 +226,7 @@ export default {
onTaskSubmit: function() {},
onTaskResponse: function(responseData) {
console.log("Task finished with response data: ", responseData);
onTaskResponse: function() {
// Do all the finished request stuff
this.onSubmissionCompleted();
},

View file

@ -165,9 +165,8 @@ export default {
() => {
if ("shutdown" in this.systemActionLinks) {
this.$store.commit("resetState");
axios.post(this.systemActionLinks.shutdown).catch(error => {
console.log(error); // Be quiet when empty response is recieved
});
// Post and silence errors
axios.post(this.systemActionLinks.shutdown).catch(() => {});
}
},
() => {}
@ -178,9 +177,8 @@ export default {
() => {
if ("reboot" in this.systemActionLinks) {
this.$store.commit("resetState");
axios.post(this.systemActionLinks.reboot).catch(error => {
console.log(error); // Be quiet when empty response is recieved
});
// Post and silence errors
axios.post(this.systemActionLinks.reboot).catch(() => {});
}
},
() => {}

View file

@ -356,8 +356,6 @@ export default {
payload.annotations["Notes"] = this.captureNotes;
}
console.log(payload);
return payload;
},
@ -437,8 +435,7 @@ export default {
onScanSubmit: function() {},
onScanResponse: function(responseData) {
console.log("Scan finished with response data: ", responseData);
onScanResponse: function() {
this.modalNotify("Finished scan.");
},

View file

@ -241,7 +241,6 @@ export default {
methods: {
getMetadata: function() {
// Send metadata request
console.log("Loading capture metadata...");
axios
.get(this.captureURL)
.then(response => {
@ -322,7 +321,6 @@ export default {
},
delTagRequest: function(tagString) {
console.log(tagString);
// Send tag DELETE request
axios
.delete(this.tagsURL, { data: [tagString] })

View file

@ -17,7 +17,6 @@
:submit-url="zipBuilderUri"
:submit-label="'Create ZIP'"
:submit-data="captureIds"
@submit="onSubmit"
@response="onResponse"
@error="onError"
>
@ -155,14 +154,9 @@ export default {
},
deleteLastZip() {
axios
.delete(this.downloadUrl)
.then(response => {
console.log(response);
})
.catch(error => {
this.modalError(error); // Let mixin handle error
});
axios.delete(this.downloadUrl).catch(error => {
this.modalError(error); // Let mixin handle error
});
},
onResponse: function(response) {
@ -171,11 +165,6 @@ export default {
this.downloadReady = true;
},
onSubmit: function(submitData) {
console.log("SUBMITTED");
console.log(submitData);
},
onError: function(error) {
this.modalError(error); // Let mixin handle error
}

View file

@ -349,7 +349,6 @@ export default {
updateCaptures: function() {
if (this.$store.state.available) {
console.log("Updating capture list...");
axios
.get(this.capturesUri)
.then(response => {
@ -358,8 +357,6 @@ export default {
.catch(error => {
this.modalError(error); // Let mixin handle error
});
} else {
console.log("Delaying capture update until connection is available");
}
},

View file

@ -122,7 +122,6 @@ export default {
}
},
updateLogs: function() {
console.log("Updating logs...");
axios
.get(this.loggingUri)
.then(response => {

View file

@ -239,7 +239,6 @@ export default {
},
moveRequest: function(x, y, z, absolute) {
console.log(`Sending move request of ${x}, ${y}, ${z}`);
// If not movement-locked
if (!this.moveLock) {
// Lock move requests
@ -266,7 +265,6 @@ export default {
},
moveInImageCoordinatesRequest: function(x, y) {
console.log(`Sending move request in image coordinates: ${x}, ${y}`);
// If not movement-locked
if (!this.moveLock) {
// Lock move requests

View file

@ -84,8 +84,6 @@ export default {
axios
.get(this.recalibrationLinks.get_calibration.href)
.then(response => {
console.log("CSM data:");
console.log(response.data);
if (Object.keys(response.data).length === 0) {
this.dataAvailable = false;
} else {

View file

@ -93,8 +93,6 @@ export default {
axios
.get(this.recalibrationLinks.get_calibration.href)
.then(response => {
console.log("CSM data:");
console.log(response.data);
if (Object.keys(response.data).length === 0) {
this.dataAvailable = false;
} else {

View file

@ -36,7 +36,6 @@ export default {
watch: {
appTheme() {
console.log("Saving appTheme setting");
this.setLocalStorageObj("appTheme", this.appTheme);
}
},

View file

@ -110,7 +110,6 @@ export default {
},
applyConfigRequest: function() {
console.log("Applying config to the microscope");
var payload = {
camera: {
picamera: {

View file

@ -40,7 +40,6 @@ export default {
watch: {
IHIEnabled() {
console.log("Saving IHIEnabled setting");
this.setLocalStorageObj("IHIEnabled", this.IHIEnabled);
}
},

View file

@ -108,8 +108,6 @@ export default {
}
};
console.log(payload);
// Send request to update config
axios
.put(this.settingsUri, payload)

View file

@ -56,11 +56,9 @@ export default {
methods: {
getStageType: function() {
console.log("Getting stage type");
axios
.get(this.stageTypeUri)
.then(response => {
console.log("Stage type is " + response.data);
this.stageType = response.data;
})
.catch(error => {
@ -68,7 +66,6 @@ export default {
});
},
setStageType: function() {
console.log("Setting stage type");
axios
.put(this.stageTypeUri, this.stageType, {
headers: {
@ -77,7 +74,7 @@ export default {
})
.then(response => {
this.stageType = response.data;
console.log("Stage type set to " + this.stageType);
this.modalNotify("Stage geometry changed.");
})
.catch(error => {

View file

@ -174,7 +174,6 @@ export default {
return this.currentTime.substr(0, 19);
},
set(val) {
console.log(val);
// Get timezone
var dt = new Date();
var tzo = -dt.getTimezoneOffset(),

View file

@ -73,7 +73,6 @@ export default {
},
mounted() {
console.log(`${this._uid} mounted`);
// A global signal listener to change the GPU preview state
this.$root.$on("globalTogglePreview", state => {
this.previewRequest(state);
@ -97,13 +96,11 @@ export default {
},
created: function() {
console.log(`${this._uid} created`);
// Send a request to start/stop GPU preview based on global setting
this.safePreviewRequest(this.$store.state.autoGpuPreview);
},
beforeDestroy: function() {
console.log(`${this._uid} being destroyed`);
// Remove global signal listener to change the GPU preview state
this.$root.$off("globalTogglePreview");
// Remove global signal listener to flash the stream element
@ -163,15 +160,12 @@ export default {
handleDoneResize: function() {
// Recalculate size
console.log(`Recalculating frame size for ${this._uid}`);
this.recalculateSize();
// Handle closed stream
if (this.displaySize[0] == 0 && this.displaySize[1] == 0) {
console.log(`${this._uid} is zero`);
// If this stream was previously active
if (this.$store.state.activeStreams[this._uid] == true) {
console.log(`${this._uid} was active`);
console.log(`STREAM ${this._uid} CLOSED`);
this.$store.commit("removeStream", this._uid);
// If all streams are closed, request the GPU preview close
var a = Object.values(this.$store.state.activeStreams);
@ -182,7 +176,6 @@ export default {
}
// If resized to anything other than zero
} else {
console.log(`STREAM ${this._uid} OPEN`);
this.$store.commit("addStream", this._uid);
if (this.$store.state.autoGpuPreview == true) {
// Start the preview immediately
@ -282,7 +275,7 @@ export default {
}
// Send preview request
console.log(`${this._uid} toggled preview to ${state}`);
axios
.post(requestUri, payload)
.then(() => {})

View file

@ -53,9 +53,7 @@ Vue.mixin({
)
.finally(function() {
// Reenable the GPU preview, if it was active before the modal
console.log("Re-enabling GPU preview");
if (context.$store.state.autoGpuPreview) {
console.log("Re-enabling preview");
context.$root.$emit("globalTogglePreview", true);
}
});
@ -102,21 +100,17 @@ Vue.mixin({
// If the response is a nicely formatted JSON response from the server
if (error.response.data.message) {
errormsg = `${error.response.status}: ${error.response.data.message}`;
console.log(errormsg);
}
// If the response is just some generic error response
else {
errormsg = `${error.response.status}: ${error.response.data}`;
console.log(errormsg);
}
// If the error occured during the request
} else if (error.request) {
errormsg = `${error.message}`;
console.log(errormsg);
// Everything else
} else {
errormsg = `${error.message}`;
console.log(errormsg);
}
return errormsg;
},
@ -138,7 +132,6 @@ Vue.mixin({
try {
return JSON.parse(localStorage.getItem(keyName));
} catch (e) {
console.log("Malformed entry. Removing from localStorage");
localStorage.removeItem(keyName);
return null;
}