fix(monitoring): match the wording and the figures the wireframe actually shows

Reading the page's Overview line by line against the app turned up more than
layout:

  * Tab strip: "Sự kiện bảo mật / Lịch sử gọi MCP / Nhật ký hành động /
    Trạng thái Agent" → "Bảo mật / MCP / Hành động / Agent", as drawn. The long
    names are also what pushed "Icon" off a 1024px window behind scroll arrows;
    all eight now fit.
  * Headings: "SỬ DỤNG TOKEN & CHI PHÍ" → "TOKEN & CHI PHÍ", "SỬ DỤNG TÀI
    NGUYÊN" → "TÀI NGUYÊN", "CHI TIẾT SANDBOX" → "SANDBOX & QUYỀN",
    "HOẠT ĐỘNG GẦN ĐÂY" → "NHẬT KÝ GẦN ĐÂY".
  * Tiles put the number FIRST and its name under it, which is how the page
    draws them; "Tổng chi phí" → "Chi phí" and Budget → "Ngân sách" in
    Vietnamese. Applies to the Dashboard's cards too, which share the widget.
  * Resources showed I/O and network RATES; the drawing shows capacity —
    memory as used/total (138 MB/15 GB) and the workspace drive's free space
    (15 GB trống). The rates are still measured and kept.
  * "SANDBOX & QUYỀN" rendered as "SANDBOX _QUYỀN": a group-box title treats
    "&" as a mnemonic. Same bug as the usage title, now fixed in both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
NamPDT
2026-08-17 16:15:49 +09:00
co-authored by Claude Opus 5
parent 175be15c4b
commit dc6cb309c2
3 changed files with 41 additions and 16 deletions
+5 -2
View File
@@ -50,8 +50,10 @@ class StatCard(QFrame):
# sizeHint hundreds of px wide, forcing its WHOLE grid column open and
# throwing every card in the row out of alignment.
self.sub_lbl.setWordWrap(True)
lay.addWidget(self.title_lbl)
# Number first, name under it — the figure is what the eye is looking
# for, and it is how the audit page's tiles are drawn.
lay.addWidget(self.value_lbl)
lay.addWidget(self.title_lbl)
lay.addWidget(self.sub_lbl)
def set(self, title: str, value: str, sub: str = "") -> None:
@@ -100,8 +102,9 @@ class BudgetCard(QFrame):
# sizeHint hundreds of px wide, forcing its WHOLE grid column open and
# throwing every card in the row out of alignment.
self.sub_lbl.setWordWrap(True)
lay.addWidget(self.title_lbl)
# Same order as StatCard: the number first, its name under it.
lay.addWidget(self.value_lbl)
lay.addWidget(self.title_lbl)
lay.addWidget(self.sub_lbl)
row = QHBoxLayout()