From 0a9f0c43f68a788b47dee3000c0130f3279b4e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 5 Apr 2022 17:42:45 +0200 Subject: [PATCH] Web: send messages & job updates to the chat window --- web/app/src/App.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/src/App.vue b/web/app/src/App.vue index 88af3b9f..5f0981ce 100644 --- a/web/app/src/App.vue +++ b/web/app/src/App.vue @@ -41,9 +41,15 @@ export default { }, onJobUpdate(jobUpdate) { console.log("job update received:", jobUpdate); + if (jobUpdate.previous_status) { + this.messages.push(`Job update: ${jobUpdate.id} (${jobUpdate.previous_status} → ${jobUpdate.status})`); + } else { + this.messages.push(`New job: ${jobUpdate.id} (${jobUpdate.status})`); + } }, onChatMessage(message) { console.log("chat message received:", message); + this.messages.push(`${message.text}`); }, }, };