From cd989aace802de3d0effd619abd8500f4ed58fe1 Mon Sep 17 00:00:00 2001 From: Deng Liu Date: Fri, 4 Dec 2026 15:22:57 -0800 Subject: [PATCH] fix(services): name the Compose Services table column Disk I/O and order it like the charts (#8134) The Services table of the Compose Project dashboard called the disk column Block I/O and listed Network I/O first, while the Project Resource Usage charts below it say Disk I/O and show it before Network I/O. The table now uses Disk I/O and the same order; the unused Block I/O catalog entries are removed (zh-TW keeps its translation under the new key). Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com> --- e2e/services.spec.ts | 9 +++++++++ src/features/services/dashboard.tsx | 8 ++++---- src/features/services/dashboardStats.test.tsx | 7 +++++++ src/platform/locales/text/en.json | 1 - src/platform/locales/text/ru.json | 1 - src/platform/locales/text/tr.json | 1 - src/platform/locales/text/zh-TW.json | 2 +- src/platform/locales/text/zh.json | 1 - 8 files changed, 21 insertions(+), 9 deletions(-) diff --git a/e2e/services.spec.ts b/e2e/services.spec.ts index 38ec18f357..2d3dac9abb 100644 --- a/e2e/services.spec.ts +++ b/e2e/services.spec.ts @@ -1468,6 +1468,15 @@ test("Compose Project dashboard renders Services table above aggregate Project R const cpuCard = detail.getByRole("group", { name: "CPU" }); const memCard = detail.getByRole("group", { name: "Memory" }); await expect(table).toBeVisible(); + await expect(table.locator("thead th")).toHaveText([ + "Service", + "Status", + "CPU", + "Memory", + "Disk I/O", + "Network I/O", + "PIDs", + ]); await expect(detail.getByText("Project Resource Usage")).toBeVisible(); await cpuCard.scrollIntoViewIfNeeded(); await expect(cpuCard).toBeVisible(); diff --git a/src/features/services/dashboard.tsx b/src/features/services/dashboard.tsx index 02d0e00f36..e39952d8a4 100644 --- a/src/features/services/dashboard.tsx +++ b/src/features/services/dashboard.tsx @@ -2165,10 +2165,10 @@ export function ComposeProjectDashboard({ Memory - Network I/O + Disk I/O - Block I/O + Network I/O PIDs @@ -2230,10 +2230,10 @@ export function ComposeProjectDashboard({ )} - {stats?.netIo || —} + {stats?.blockIo || —} - {stats?.blockIo || —} + {stats?.netIo || —} {stats?.pids || —} diff --git a/src/features/services/dashboardStats.test.tsx b/src/features/services/dashboardStats.test.tsx index ac4b3351da..fb15dad8a1 100644 --- a/src/features/services/dashboardStats.test.tsx +++ b/src/features/services/dashboardStats.test.tsx @@ -651,6 +651,13 @@ describe("Compose Project Resource Usage 2x2 charts and synchronized table scrub await act(async () => { await Promise.resolve(); }); + // Services table column names and order match the 2x2 Project Resource Usage charts below. + const headers = screen.getAllByRole("columnheader").map((th) => th.textContent); + expect(headers).toEqual(["Service", "Status", "CPU", "Memory", "Disk I/O", "Network I/O", "PIDs"]); + const dbCells = within(screen.getByText("shop-db-1").closest("tr")!).getAllByRole("cell"); + expect(dbCells[4]!.textContent).toBe("10MB / 20MB"); + expect(dbCells[5]!.textContent).toBe("2MB / 1MB"); + expect(screen.getByText("Project Resource Usage")).toBeInTheDocument(); expect(screen.getByText("2 running")).toBeInTheDocument(); expect(screen.getByText("PIDs 18")).toBeInTheDocument(); diff --git a/src/platform/locales/text/en.json b/src/platform/locales/text/en.json index dca8307135..5b768313a6 100644 --- a/src/platform/locales/text/en.json +++ b/src/platform/locales/text/en.json @@ -1915,7 +1915,6 @@ "CPU": "CPU", "Memory": "Memory", "Network I/O": "Network I/O", - "Block I/O": "Block I/O", "PIDs": "PIDs", "Metrics unavailable": "Metrics unavailable", "Port Bindings": "Port Bindings", diff --git a/src/platform/locales/text/ru.json b/src/platform/locales/text/ru.json index b1625d70dd..a86578acd1 100644 --- a/src/platform/locales/text/ru.json +++ b/src/platform/locales/text/ru.json @@ -8189,7 +8189,6 @@ "CPU": "CPU", "Memory": "Память", "Network I/O": "Сетевой ввод-вывод", - "Block I/O": "Блочный ввод-вывод", "PIDs": "PID", "Metrics unavailable": "Метрики недоступны", "Port Bindings": "Привязки портов", diff --git a/src/platform/locales/text/tr.json b/src/platform/locales/text/tr.json index f33c52c64b..4fc917ecf5 100644 --- a/src/platform/locales/text/tr.json +++ b/src/platform/locales/text/tr.json @@ -1142,7 +1142,6 @@ "CPU": "CPU", "Memory": "Bellek", "Network I/O": "Ağ G/Ç", - "Block I/O": "Blok G/Ç", "PIDs": "PID'ler", "Metrics unavailable": "Ölçümler kullanılamıyor", "Port Bindings": "Bağlantı Noktası Eşlemeleri", diff --git a/src/platform/locales/text/zh-TW.json b/src/platform/locales/text/zh-TW.json index cd3ab0de3d..bcce71909d 100644 --- a/src/platform/locales/text/zh-TW.json +++ b/src/platform/locales/text/zh-TW.json @@ -7798,7 +7798,7 @@ "CPU": "處理器 (CPU)", "Memory": "記憶體", "Network I/O": "網路 I/O", - "Block I/O": "磁碟 I/O", + "Disk I/O": "磁碟 I/O", "PIDs": "程序數 (PIDs)", "Metrics unavailable": "指標不可用", "Port Bindings": "埠繫結", diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 6f8c5b89ac..7cccf599b9 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -8817,7 +8817,6 @@ "CPU": "处理器 (CPU)", "Memory": "内存", "Network I/O": "网络 I/O", - "Block I/O": "磁盘 I/O", "PIDs": "进程数 (PIDs)", "Metrics unavailable": "指标不可用", "Port Bindings": "端口绑定",