feat: device row warning highlight when online but media server not running

This commit is contained in:
tian 2026-07-17 17:39:53 +08:00
parent bc5bd7d3fc
commit b2fbae9e4b
3 changed files with 10 additions and 4 deletions

View File

@ -15,7 +15,7 @@
| # | 事项 | 状态 | 开始 | 完成 |
|---|------|------|------|------|
| 6 | 告警浏览器通知SSE / 标题闪烁) | ✅ 已完成 | 2026-07-17 | 2026-07-17 |
| 7 | 设备列表服务健康指示 | ⬜ 待开始 | - | - |
| 7 | 设备列表服务健康指示 | ✅ 已完成 | 2026-07-17 | 2026-07-17 |
| 8 | 操作结果提示优化toast 替代 URL 消息) | ⬜ 待开始 | - | - |
| 9 | 术语统一 | ⬜ 待开始 | - | - |
@ -42,6 +42,10 @@
- 3 步引导:选设备 → 配检测(从设备读取运行通道,下拉选已有视频源或手动添加) → 一键下发
- 标准模式可见,复用的 AutoConfigService 链路
- **P1-7 设备服务健康指示**
- 模板本已有媒体服务状态(运行中/未运行/待确认)
- 新增:在线但媒体服务异常的行背景变淡橙色警告
- **P1-6 告警浏览器通知**
- 顶栏铃铛图标显示未处理告警数(红点+数字徽章)
- 页面标题闪烁 `(N) SafeSight`
@ -70,4 +74,4 @@
---
**已完成:4/1526.7%**
**已完成:5/1533.3%**

View File

@ -210,6 +210,7 @@ th{background:var(--surface-soft);font-size:12px;font-weight:600;color:var(--mut
.table-wrap td .table-key{color:var(--table-link)}
tbody tr:hover{background:var(--surface-soft)}
tbody tr.selected{background:var(--selected-row)}
tbody tr.device-row-warn{background:rgba(255,180,100,.06)}
tbody tr.selected td{color:var(--text)}
tbody tr.selected .mono,
tbody tr.selected .table-key,

View File

@ -62,8 +62,9 @@
</tr>
</thead>
<tbody>
{{range .DeviceRows}}
<tr>
{{range .DeviceRows}}
{{$rowWarn := and .Device.Online (or (and .ConfigStatus (not .ConfigStatus.MediaServer.Running)) (not .ConfigStatus))}}
<tr {{if $rowWarn}}class="device-row-warn"{{end}}>
<td class="select-cell">
<input type="checkbox" name="device_id" value="{{.Device.DeviceID}}" {{if hasString $.SelectedDeviceIDs .Device.DeviceID}}checked{{end}} />
</td>