From 6cd46f33d5ff418e93bc1fead7603e7f45960691 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 21:18:23 +0200 Subject: [PATCH] Display each process as separate message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - User wants each process displayed as a separate message, not all together - Each process should be added individually to the status field **Modifications :** - Changed from joining all messages to displaying each process individually - Each process is added as a separate line with
tag - Messages are accumulated in the status field one by one **Pages affectées :** - src/pages/home/home.ts --- src/pages/home/home.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index 66efe56..8edc736 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -621,9 +621,7 @@ async function displayExistingProcesses(): Promise { return; } - // Create simple text messages for each process - let messages = []; - + // Display each process as a separate message for (const [processId, process] of Object.entries(processes)) { const processInfo = { id: processId.substring(0, 8) + '...', @@ -632,13 +630,14 @@ async function displayExistingProcesses(): Promise { lastUpdate: process.last_update || 'Unknown' }; - messages.push(`📋 Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}`); - } - - const messagesText = messages.join('\n'); - - if (mainStatus) { - mainStatus.innerHTML = `
${messagesText}
`; + const message = `📋 Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}`; + + if (mainStatus) { + // Add each message as a separate line + const currentContent = mainStatus.innerHTML; + const newMessage = currentContent ? `${currentContent}
${message}` : message; + mainStatus.innerHTML = newMessage; + } } } catch (error) {