🥳 feat(detail): unify uptime status handling & enhance availability card UI
Summary • Centralized uptime status definition via `uptimeStatusMap`, containing color / label / text for each status. • Generated `uptimeLegendData`, `getUptimeStatusColor`, `getUptimeStatusText` directly from the map, removing multiple switch-case blocks. UI Improvements 1. Added statuses 2 (High Latency) & 3 (Maintenance) with dedicated colors. 2. Relocated status legend to a styled footer wrapped in a borderless sub-Card; header now only shows title + refresh button. 3. Footer (and its negative margin) renders only when `uptimeData` is present, preventing empty legend display. 4. Applied rounded, blurred badge style and always-on shadow to legend container for clearer separation. Maintenance • Simplified code paths, reduced duplication, and improved readability without breaking existing functionality.
This commit is contained in:
@@ -881,7 +881,6 @@
|
||||
"你好,": "Hello,",
|
||||
"线路监控": "line monitoring",
|
||||
"查看全部": "View all",
|
||||
"高延迟": "high latency",
|
||||
"异常": "Abnormal",
|
||||
"的未命名令牌": "unnamed token",
|
||||
"令牌更新成功!": "Token updated successfully!",
|
||||
@@ -1644,6 +1643,8 @@
|
||||
"服务可用性": "Service Status",
|
||||
"可用率": "Availability",
|
||||
"有异常": "Abnormal",
|
||||
"高延迟": "High latency",
|
||||
"维护中": "Maintenance",
|
||||
"暂无监控数据": "No monitoring data",
|
||||
"请联系管理员在系统设置中配置Uptime": "Please contact the administrator to configure Uptime in the system settings."
|
||||
}
|
||||
Reference in New Issue
Block a user