diff --git a/web/app/src/stores/notifications.js b/web/app/src/stores/notifications.js index 765c81ed..b24204f2 100644 --- a/web/app/src/stores/notifications.js +++ b/web/app/src/stores/notifications.js @@ -42,10 +42,18 @@ export const useNotifs = defineStore('notifications', { * @param {API.SocketIOJobUpdate} jobUpdate Job update received via SocketIO. */ addJobUpdate(jobUpdate) { - let msg = `Job ${jobUpdate.name}`; - if (jobUpdate.previous_status && jobUpdate.previous_status != jobUpdate.status) { + let msg = "Job"; + if (jobUpdate.name) msg += ` ${jobUpdate.name}`; + if (jobUpdate.was_deleted) { + msg += " was deleted"; + } + else if (jobUpdate.previous_status && jobUpdate.previous_status != jobUpdate.status) { msg += ` changed status ${jobUpdate.previous_status} ➜ ${jobUpdate.status}`; } + else { + // Don't bother logging just "Job" + its name, as it conveys no info. + return; + } this.add(msg) },