Web: remove some debug logging, and convert one log into warning

This commit is contained in:
Sybren A. Stüvel 2022-05-17 14:52:27 +02:00
parent 530520b1c7
commit 42c81e9900
2 changed files with 8 additions and 13 deletions

View File

@ -24,7 +24,7 @@ export default {
}, },
mounted: function () { mounted: function () {
if (!this.websocketURL) { if (!this.websocketURL) {
console.log("UpdateListener: no websocketURL given, cannot do anything"); console.warn("UpdateListener: no websocketURL given, cannot do anything");
return; return;
} }
this.connectToWebsocket(); this.connectToWebsocket();

View File

@ -47,16 +47,11 @@ export default {
mounted() { mounted() {
window.jobsView = this; window.jobsView = this;
this.jobs.$subscribe((mutation, state) => { // Useful for debugging:
console.log("Pinia mutation:", mutation) // this.jobs.$subscribe((mutation, state) => {
console.log("Pinia state :", state) // console.log("Pinia mutation:", mutation)
// // import { MutationType } from 'pinia' // console.log("Pinia state :", state)
// mutation.type // 'direct' | 'patch object' | 'patch function' // })
// // same as cartStore.$id
// mutation.storeId // 'cart'
// // only available with mutation.type === 'patch object'
// mutation.payload // patch object passed to cartStore.$patch()
})
this._fetchJob(this.jobID); this._fetchJob(this.jobID);
this._fetchTask(this.taskID); this._fetchTask(this.taskID);
@ -82,7 +77,7 @@ export default {
this.tasks.deselectAllTasks(); this.tasks.deselectAllTasks();
return; return;
} }
console.log("selected task changed:", taskSummary);
const jobsAPI = new API.JobsApi(apiClient); const jobsAPI = new API.JobsApi(apiClient);
jobsAPI.fetchTask(taskSummary.id) jobsAPI.fetchTask(taskSummary.id)
.then((task) => { .then((task) => {
@ -95,7 +90,7 @@ export default {
// SocketIO data event handlers: // SocketIO data event handlers:
onSioJobUpdate(jobUpdate) { onSioJobUpdate(jobUpdate) {
console.log("job update", jobUpdate);
if (this.$refs.jobsTable) { if (this.$refs.jobsTable) {
if (jobUpdate.previous_status) if (jobUpdate.previous_status)
this.$refs.jobsTable.processJobUpdate(jobUpdate); this.$refs.jobsTable.processJobUpdate(jobUpdate);