Display each process as separate message
**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 <br> tag - Messages are accumulated in the status field one by one **Pages affectées :** - src/pages/home/home.ts
This commit is contained in:
parent
60ab17bb26
commit
6cd46f33d5
@ -621,9 +621,7 @@ async function displayExistingProcesses(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create simple text messages for each process
|
// Display each process as a separate message
|
||||||
let messages = [];
|
|
||||||
|
|
||||||
for (const [processId, process] of Object.entries(processes)) {
|
for (const [processId, process] of Object.entries(processes)) {
|
||||||
const processInfo = {
|
const processInfo = {
|
||||||
id: processId.substring(0, 8) + '...',
|
id: processId.substring(0, 8) + '...',
|
||||||
@ -632,13 +630,14 @@ async function displayExistingProcesses(): Promise<void> {
|
|||||||
lastUpdate: process.last_update || 'Unknown'
|
lastUpdate: process.last_update || 'Unknown'
|
||||||
};
|
};
|
||||||
|
|
||||||
messages.push(`📋 Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}`);
|
const message = `📋 Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}`;
|
||||||
}
|
|
||||||
|
|
||||||
const messagesText = messages.join('\n');
|
|
||||||
|
|
||||||
if (mainStatus) {
|
if (mainStatus) {
|
||||||
mainStatus.innerHTML = `<pre style="white-space: pre-wrap; font-family: monospace; font-size: 12px; text-align: left;">${messagesText}</pre>`;
|
// Add each message as a separate line
|
||||||
|
const currentContent = mainStatus.innerHTML;
|
||||||
|
const newMessage = currentContent ? `${currentContent}<br>${message}` : message;
|
||||||
|
mainStatus.innerHTML = newMessage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user