Web: remove console.log calls
Remove a whole lot of `console.log()` calls. They were useful during development, but not really suitable for production environments. Because they also include (potentially large) objects, they can even slow down the webapp itself.
This commit is contained in:
parent
e6b662b8cd
commit
37477fc6bd
@ -71,7 +71,7 @@ export default {
|
||||
connectToWebsocket() {
|
||||
// The SocketIO client API docs are available at:
|
||||
// https://github.com/socketio/socket.io-client/blob/2.4.x/docs/API.md
|
||||
console.log("connecting JobsListener to WS", websocketURL);
|
||||
// console.log("connecting JobsListener to WS", websocketURL);
|
||||
const ws = io(websocketURL, {
|
||||
transports: ["websocket"],
|
||||
});
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
window.ws = ws;
|
||||
|
||||
this.socket.on('connect', (error) => {
|
||||
console.log("socketIO connection established");
|
||||
// console.log("socketIO connection established");
|
||||
this.sockStatus.connected();
|
||||
this._resubscribe();
|
||||
});
|
||||
@ -102,7 +102,7 @@ export default {
|
||||
});
|
||||
|
||||
this.socket.on("disconnect", (reason) => {
|
||||
console.log("socketIO disconnected:", reason);
|
||||
// console.log("socketIO disconnected:", reason);
|
||||
this.$emit("sioDisconnected", reason);
|
||||
this.sockStatus.disconnected(reason);
|
||||
|
||||
@ -179,7 +179,6 @@ export default {
|
||||
|
||||
sendBroadcastMessage(name, message) {
|
||||
const payload = { name: name, text: message };
|
||||
console.log("sending broadcast message:", payload);
|
||||
this.socket.emit("/chat", payload);
|
||||
},
|
||||
|
||||
@ -190,7 +189,6 @@ export default {
|
||||
*/
|
||||
_updateMainSubscription(operation, type) {
|
||||
const payload = new API.SocketIOSubscription(operation, type);
|
||||
console.log(`sending ${type} ${operation}:`, payload);
|
||||
this.socket.emit("/subscription", payload);
|
||||
},
|
||||
|
||||
@ -202,7 +200,6 @@ export default {
|
||||
_updateJobSubscription(operation, jobID) {
|
||||
const payload = new API.SocketIOSubscription(operation, "job");
|
||||
payload.uuid = jobID;
|
||||
console.log(`sending job ${operation}:`, payload);
|
||||
this.socket.emit("/subscription", payload);
|
||||
},
|
||||
|
||||
@ -214,7 +211,6 @@ export default {
|
||||
_updateTaskLogSubscription(operation, taskID) {
|
||||
const payload = new API.SocketIOSubscription(operation, "tasklog");
|
||||
payload.uuid = taskID;
|
||||
console.log(`sending tasklog ${operation}:`, payload);
|
||||
this.socket.emit("/subscription", payload);
|
||||
},
|
||||
|
||||
|
@ -33,8 +33,6 @@ onMounted(() => {
|
||||
tabulator = new Tabulator('#task_log_list', tabOptions);
|
||||
tabulator.on("tableBuilt", _scrollToBottom);
|
||||
tabulator.on("tableBuilt", _subscribeToPinia);
|
||||
console.log("Task log list: mounted on task ID", tasks.activeTaskID);
|
||||
|
||||
_fetchLogTail(tasks.activeTaskID);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
@ -42,7 +40,6 @@ onUnmounted(() => {
|
||||
});
|
||||
|
||||
tasks.$subscribe((_, state) => {
|
||||
console.log("Task log list: new task ID", state.activeTaskID);
|
||||
_fetchLogTail(state.activeTaskID);
|
||||
});
|
||||
|
||||
@ -71,5 +68,5 @@ function _fetchLogTail(taskID) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="task_log_list"></div>
|
||||
<div id="task_log_list"></div>
|
||||
</template>
|
||||
|
@ -152,7 +152,6 @@ export default {
|
||||
},
|
||||
|
||||
onJobTypeLoaded(jobType) {
|
||||
console.log("Job type loaded: ", jobType);
|
||||
this.jobType = jobType;
|
||||
|
||||
// Construct a lookup table for the settings.
|
||||
|
@ -48,14 +48,11 @@ function fetchImageURL(jobID) {
|
||||
* @param {JobLastRenderedImageInfo} thumbnailInfo
|
||||
*/
|
||||
function setImageURL(thumbnailInfo) {
|
||||
console.log("LastRenderedImage.vue: setImageURL", thumbnailInfo);
|
||||
|
||||
if (thumbnailInfo == null) {
|
||||
// This indicates that there is no last-rendered image.
|
||||
// Default to a hard-coded 'nothing to be seen here, move along' image.
|
||||
imageURL.value = "/app/nothing-rendered-yet.svg";
|
||||
cssClasses['nothing-rendered-yet'] = true;
|
||||
console.log("LastRenderedImage.vue: setting image URL to:", imageURL.value);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -72,7 +69,6 @@ function setImageURL(thumbnailInfo) {
|
||||
url.pathname = thumbnailInfo.base + "/" + suffix
|
||||
url.search = new Date().getTime(); // This forces the image to be reloaded.
|
||||
imageURL.value = url.toString();
|
||||
console.log("LastRenderedImage.vue: setting image URL to:", imageURL.value);
|
||||
foundThumbnail = true;
|
||||
break;
|
||||
}
|
||||
@ -95,13 +91,11 @@ function refreshLastRenderedImage(lastRenderedUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('refreshLastRenderedImage:', lastRenderedUpdate);
|
||||
setImageURL(lastRenderedUpdate.thumbnail);
|
||||
}
|
||||
|
||||
// Call fetchImageURL(jobID) whenever the job ID prop changes value.
|
||||
watch(() => props.jobID, (newJobID) => {
|
||||
console.log("Last-Rendered Image: new job ID: ", newJobID);
|
||||
fetchImageURL(newJobID);
|
||||
});
|
||||
fetchImageURL(props.jobID);
|
||||
|
@ -130,7 +130,6 @@ export default {
|
||||
this.fetchTasks();
|
||||
},
|
||||
fetchTasks() {
|
||||
console.log("Fetching tasks for job", this.jobID);
|
||||
if (!this.jobID) {
|
||||
this.tabulator.setData([]);
|
||||
return;
|
||||
|
@ -46,7 +46,6 @@ const apiClient = new ApiClient(urls.api());;
|
||||
const metaAPI = new MetaApi(apiClient);
|
||||
metaAPI.getConfiguration()
|
||||
.then((config) => {
|
||||
console.log("Got config!", config);
|
||||
if (config.isFirstRun) setupAssistantMode();
|
||||
else normalMode();
|
||||
})
|
||||
|
@ -34,7 +34,6 @@ export const useNotifs = defineStore('notifications', {
|
||||
const notif = {id: this._generateID(), msg: message, time: new Date()};
|
||||
this.history.push(notif);
|
||||
this.last = notif;
|
||||
console.log("New notification:", plain(notif));
|
||||
this._prune();
|
||||
this._restartHideTimer();
|
||||
},
|
||||
@ -43,7 +42,6 @@ export const useNotifs = defineStore('notifications', {
|
||||
* @param {API.SocketIOJobUpdate} jobUpdate Job update received via SocketIO.
|
||||
*/
|
||||
addJobUpdate(jobUpdate) {
|
||||
console.log('Received job update:', jobUpdate);
|
||||
let msg = `Job ${jobUpdate.name}`;
|
||||
if (jobUpdate.previous_status && jobUpdate.previous_status != jobUpdate.status) {
|
||||
msg += ` changed status ${jobUpdate.previous_status} ➜ ${jobUpdate.status}`;
|
||||
@ -55,7 +53,6 @@ export const useNotifs = defineStore('notifications', {
|
||||
* @param {API.SocketIOTaskUpdate} taskUpdate Task update received via SocketIO.
|
||||
*/
|
||||
addTaskUpdate(taskUpdate) {
|
||||
console.log('Received task update:', taskUpdate);
|
||||
let msg = `Task ${taskUpdate.name}`;
|
||||
if (taskUpdate.previous_status && taskUpdate.previous_status != taskUpdate.status) {
|
||||
msg += ` changed status ${taskUpdate.previous_status} ➜ ${taskUpdate.status}`;
|
||||
@ -70,7 +67,6 @@ export const useNotifs = defineStore('notifications', {
|
||||
* @param {API.SocketIOWorkerUpdate} workerUpdate Worker update received via SocketIO.
|
||||
*/
|
||||
addWorkerUpdate(workerUpdate) {
|
||||
console.log('Received worker update:', workerUpdate);
|
||||
let msg = `Worker ${workerUpdate.name}`;
|
||||
if (workerUpdate.previous_status && workerUpdate.previous_status != workerUpdate.status) {
|
||||
msg += ` changed status ${workerUpdate.previous_status} ➜ ${workerUpdate.status}`;
|
||||
|
@ -182,7 +182,6 @@ export default {
|
||||
*/
|
||||
_routeToJob(jobID) {
|
||||
const route = { name: 'jobs', params: { jobID: jobID } };
|
||||
console.log("routing to job", route.params);
|
||||
this.$router.push(route);
|
||||
},
|
||||
/**
|
||||
@ -191,7 +190,6 @@ export default {
|
||||
*/
|
||||
_routeToTask(taskID) {
|
||||
const route = { name: 'jobs', params: { jobID: this.jobID, taskID: taskID } };
|
||||
console.log("routing to task", route.params);
|
||||
this.$router.push(route);
|
||||
},
|
||||
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
*/
|
||||
_routeToWorker(workerID) {
|
||||
const route = { name: 'workers', params: { workerID: workerID } };
|
||||
console.log("routing to worker", route.params);
|
||||
this.$router.push(route);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user