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 <[email protected]>
Цей коміт міститься в:
Deng Liuтаdengliu authored and GitHub committed 2026-12-05 07:22:57 +08:00
1 джерело bb628998cc
коміт cd989aace8
8 files changed
+21 -9

No files matched your search

+9
Переглянути файл
@@ -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();
+4 -4
Переглянути файл
@@ -2165,10 +2165,10 @@ export function ComposeProjectDashboard({
<T>Memory</T>
</th>
<th>
<T>Network I/O</T>
<T>Disk I/O</T>
</th>
<th>
<T>Block I/O</T>
<T>Network I/O</T>
</th>
<th>
<T>PIDs</T>
@@ -2230,10 +2230,10 @@ export function ComposeProjectDashboard({
)}
</td>
<td className={clsx(styles.mono, styles.nowrapCell)}>
{stats?.netIo || <span className={styles.mutedMeta}>—</span>}
{stats?.blockIo || <span className={styles.mutedMeta}>—</span>}
</td>
<td className={clsx(styles.mono, styles.nowrapCell)}>
{stats?.blockIo || <span className={styles.mutedMeta}>—</span>}
{stats?.netIo || <span className={styles.mutedMeta}>—</span>}
</td>
<td className={clsx(styles.mono, styles.nowrapCell)}>
{stats?.pids || <span className={styles.mutedMeta}>—</span>}
+7
Переглянути файл
@@ -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();
-1
Переглянути файл
@@ -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",
-1
Переглянути файл
@@ -8189,7 +8189,6 @@
"CPU": "CPU",
"Memory": "Память",
"Network I/O": "Сетевой ввод-вывод",
"Block I/O": "Блочный ввод-вывод",
"PIDs": "PID",
"Metrics unavailable": "Метрики недоступны",
"Port Bindings": "Привязки портов",
-1
Переглянути файл
@@ -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",
+1 -1
Переглянути файл
@@ -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": "埠繫結",
-1
Переглянути файл
@@ -8817,7 +8817,6 @@
"CPU": "处理器 (CPU)",
"Memory": "内存",
"Network I/O": "网络 I/O",
"Block I/O": "磁盘 I/O",
"PIDs": "进程数 (PIDs)",
"Metrics unavailable": "指标不可用",
"Port Bindings": "端口绑定",