From e4bc9f6fb05ce0383c5c3f6e9da6fa487a7f2634 Mon Sep 17 00:00:00 2001 From: IanShaw027 <131567472+IanShaw027@users.noreply.github.com> Date: Sun, 11 Jan 2026 15:50:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(ops):=20=E4=BC=98=E5=8C=96=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98Header=E5=93=8D=E5=BA=94=E5=BC=8F=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E4=B8=8E=E6=8C=87=E6=A0=87=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **响应式优化**: - 添加flex-wrap支持窄屏时间选择器自动换行 - 当前QPS/TPS在窄屏时自动换行,避免溢出 - 时间按钮在窄屏使用更小字号和间距(9px/1.5px) - 当前数值使用响应式字体(xl→sm:2xl) **指标展示优化**: 1. 请求卡片: - 标题简化:总请求 → 请求 - 字段调整:请求 → 请求数 - 移除:平均延迟、平均首字延迟(避免冗余) 2. 延迟和TTFT卡片: - 布局:grid → flex-wrap(自适应布局) - 指标不换行:添加whitespace-nowrap - 最小宽度:min-w-[60px]保证可读性 - 单位内联:名称、数值、单位在同一行(P95: 123 ms) - 自动换行:整个指标项作为整体换行 **效果**: - 窄屏:所有元素自动适配,无溢出 - 宽屏:充分利用空间,清晰展示 - 灵活布局:根据容器宽度自动调整指标排列 --- .../ops/components/OpsDashboardHeader.vue | 186 ++++++++++-------- 1 file changed, 101 insertions(+), 85 deletions(-) diff --git a/frontend/src/views/admin/ops/components/OpsDashboardHeader.vue b/frontend/src/views/admin/ops/components/OpsDashboardHeader.vue index 05b711d4..312642c3 100644 --- a/frontend/src/views/admin/ops/components/OpsDashboardHeader.vue +++ b/frontend/src/views/admin/ops/components/OpsDashboardHeader.vue @@ -833,9 +833,9 @@ function openJobsDetails() {
-
+
-
+
@@ -844,12 +844,12 @@ function openJobsDetails() {
-
+
-
- +
+
{{ t('admin.ops.current') }}
-
- {{ displayRealTimeQps.toFixed(1) }} - QPS -
-
- TPS: {{ displayRealTimeTps.toFixed(1) }} +
+
+ {{ displayRealTimeQps.toFixed(1) }} + QPS +
+
+ {{ displayRealTimeTps.toFixed(1) }} + TPS +
- -
-
{{ t('admin.ops.peak') }}
-
- {{ qpsPeakLabel }} - QPS + +
+ +
+
{{ t('admin.ops.peak') }}
+
+
+ {{ qpsPeakLabel }} + QPS +
+
+ {{ tpsPeakLabel }} + TPS +
+
-
- TPS: {{ tpsPeakLabel }} + + +
+
{{ t('admin.ops.average') }}
+
+
+ {{ qpsAvgLabel }} + QPS +
+
+ {{ tpsAvgLabel }} + TPS +
+
- -
-
{{ t('admin.ops.average') }}
-
- QPS: {{ qpsAvgLabel }} - - TPS: {{ tpsAvgLabel }} -
- - -
- - - - - -
+ +
+ + + + +
@@ -924,11 +938,11 @@ function openJobsDetails() {
- +
- {{ t('admin.ops.totalRequests') }} + {{ t('admin.ops.requests') }}
@@ -1018,26 +1024,31 @@ function openJobsDetails() {
ms (P99)
-
-
+
+
P95: - {{ durationP95Ms ?? '-' }}ms + {{ durationP95Ms ?? '-' }} + ms
-
+
P90: - {{ durationP90Ms ?? '-' }}ms + {{ durationP90Ms ?? '-' }} + ms
-
+
P50: - {{ durationP50Ms ?? '-' }}ms + {{ durationP50Ms ?? '-' }} + ms
-
+
Avg: - {{ durationAvgMs ?? '-' }}ms + {{ durationAvgMs ?? '-' }} + ms
-
+
Max: - {{ durationMaxMs ?? '-' }}ms + {{ durationMaxMs ?? '-' }} + ms
@@ -1063,26 +1074,31 @@ function openJobsDetails() {
ms (P99)
-
-
+
+
P95: - {{ ttftP95Ms ?? '-' }}ms + {{ ttftP95Ms ?? '-' }} + ms
-
+
P90: - {{ ttftP90Ms ?? '-' }}ms + {{ ttftP90Ms ?? '-' }} + ms
-
+
P50: - {{ ttftP50Ms ?? '-' }}ms + {{ ttftP50Ms ?? '-' }} + ms
-
+
Avg: - {{ ttftAvgMs ?? '-' }}ms + {{ ttftAvgMs ?? '-' }} + ms
-
+
Max: - {{ ttftMaxMs ?? '-' }}ms + {{ ttftMaxMs ?? '-' }} + ms