RAI Connect Admin (測試用)

{{ apiEndpoint }}
已認證

{{ selectedDevice.device_name || '未命名裝置' }} {{ selectedDevice.edge_version }}

{{ getStatusText(selectedDevice.status) }} ⏳ 等待重新簽發 — 按下方「重新簽發 Token」即可復原
裝置 ID

{{ selectedDevice.device_id }}

硬體 ID

{{ selectedDevice.hardware_id }}

擁有者

{{ selectedDevice.owner_tenant_id || '-' }}

最後上線

{{ formatTime(selectedDevice.last_seen_at) }}

心跳資訊

Edge 版本
{{ selectedDevice.edge_version }}
本地 IP
{{ ip.interface }}: {{ ip.ip }}
主機網路流量 (實體網卡自開機累計,含機上所有程序;共用主機如 DGX 非 edge 專屬)
總計: ↓ {{ formatBytes(getTotalRx(selectedDevice.network_traffic)) }} ↑ {{ formatBytes(getTotalTx(selectedDevice.network_traffic)) }}
速率: ↓ {{ getTotalRxRate(selectedDevice.network_traffic).toFixed(1) }} Mbps ↑ {{ getTotalTxRate(selectedDevice.network_traffic).toFixed(1) }} Mbps
顯示各介面 ({{ selectedDevice.network_traffic.interfaces.length }})
{{ iface.interface }} ↓{{ formatBytes(iface.rx_bytes) }} ({{ iface.rx_rate_mbps?.toFixed(1) || 0 }}Mbps) ↑{{ formatBytes(iface.tx_bytes) }} ({{ iface.tx_rate_mbps?.toFixed(1) || 0 }}Mbps)

OTA 更新

目前版本 / 架構
{{ selectedDevice.edge_version || '-' }} / {{ deviceOTA.arch || '未回報' }}
更新狀態
{{ deviceOTA.update_status || '無' }} ({{ deviceOTA.update_target }})
{{ deviceOTA.update_error }}
指派目標版本
目前指派:{{ deviceOTA.target_version }}
灰度紀律:先指派辦公室測試機,跑 1-2 天再指派客戶機

遠端 SSH 通道 排查維護用,開啟後自動過期,平常保持關閉

關閉 ● 通道在線(port {{ sshTunnel.port }}) 開啟中,等 Edge 建立(≤60 秒)… {{ formatTime(sshTunnel.expires_at) }} 自動關閉
登入帳號 依機器實際帳號(樹莓派=pi、DGX=rai),connect_hint 據此組出
{{ sshTunnel.connect_hint }}

port 只綁 53.19 的 loopback,須經跳板進入;進去後可用 ssh -D / -L 存取該站點內網

操作紀錄(最近 {{ sshAudit.length }} 筆,來源 IP = 操作電腦)
{{ formatTime(a.created_at) }} {{ a.action === 'enabled' ? '開啟' : '關閉' }} port {{ a.port }} · 來自 {{ a.source_ip || '未知' }}

推流管理

設備尚未指派 Tenant,無法新增推流

尚未設定推流

狀態 名稱 推流路徑 來源 錄影 啟用 操作
{{ getStreamStatusIcon(effStreamStatus(stream)) }} {{ stream.stream_name }} {{ stream.stream_path }} {{ stream.source_url }}
{{ devices.length }}
總裝置數
{{ claimedCount }}
已綁定
{{ unclaimedCount }}
待綁定
{{ offlineCount }}
離線
狀態 裝置名稱 類別 版本 硬體 ID 推流 最後上線 操作
{{ getStatusText(device.status) }} 已預建 ⏳ 等待重新簽發 {{ device.device_name || '-' }} 轉碼推流 AI 辨識 協定閘道 穿透 {{ device.edge_version || '-' }} {{ truncate(device.hardware_id, 16) }} {{ device.streams.active }}/{{ device.streams.total }} - {{ formatTime(device.last_seen_at) }}

沒有符合條件的裝置

掃描 QR Code 綁定裝置

使用相機掃描裝置上的 QR Code,或手動輸入 Hardware ID 與 Claim Secret 來綁定裝置。

{{ qrScanError }}

或手動輸入

ECDSA P-256 壓縮公鑰,QR Code 中的 pk 參數

掃描成功

Hardware ID: {{ qrScanResult.hardware_id }}

Claim Secret: {{ truncate(qrScanResult.claim_secret, 16) }}...

Public Key: {{ truncate(qrScanResult.public_key, 20) }}...

{{ allStreams.length }}
總推流數
{{ streamingCount }}
正常串流
{{ errorCount }}
錯誤
{{ disabledCount }}
已停用

{{ effStreamStatus(stream) === 'disabled' ? getStreamStatusText('disabled') : (stream.error_message || getStreamStatusText(stream.status)) }}

{{ getStreamStatusText(effStreamStatus(stream)) }}

{{ stream.stream_name }}

{{ stream.device_name }}

{{ stream.stream_path }}

開啟
共 {{ filteredStreams.length }} 筆

沒有符合條件的串流

RTSP 連線測試工具

測試 RTSP 來源是否可連線,驗證攝影機設定是否正確。

{{ rtspTestResult.success ? '連線成功' : '連線失敗' }}

{{ rtspTestResult.message }}

解析度: {{ rtspTestResult.info.resolution }}

編碼: {{ rtspTestResult.info.codec }}

幀率: {{ rtspTestResult.info.fps }} fps

{{ rtspTestResult.error }}

健康監控儀表板

{{ healthOverview.streams?.total || 0 }}
總串流數
{{ healthOverview.streams?.healthy || 0 }}
健康
{{ healthOverview.streams?.degraded || 0 }}
降級
{{ healthOverview.streams?.unhealthy || 0 }}
異常
{{ healthOverview.streams?.unknown || 0 }}
未知
{{ healthOverview.scheduler_status?.in_progress_remediation_count || 0 }}
修復中

串流健康狀態

狀態 串流 問題 操作
{{ getHealthStatusText(health.status) }}
{{ health.stream_name || '未命名' }}
{{ health.stream_path }}
{{ health.issues ? health.issues.join(', ') : '-' }}

沒有符合條件的串流

最近事件

沒有最近事件

{{ event.severity }} {{ event.event_type }}
{{ formatTime(event.created_at) }}

{{ event.message }}

{{ event.stream_id }}

調度器狀態

運行狀態 {{ schedulerStatus.running ? '運行中' : '已停止' }}
自動修復 {{ schedulerStatus.auto_remediation_enabled ? '已啟用' : '已停用' }}
修復中 {{ schedulerStatus.in_progress_remediation_count || 0 }}
上次快速檢查 {{ formatTime(schedulerStatus.last_quick_check) }}
上次清理 {{ formatTime(schedulerStatus.last_cleanup) }}
上次掃描 {{ formatTime(schedulerStatus.last_scan) }}

磁碟使用

{{ retentionStatus.disk_usage?.path || '/recordings' }}
{{ (retentionStatus.disk_usage?.usage_percent || 0).toFixed(1) }}%
{{ formatBytes(retentionStatus.disk_usage?.used_bytes || 0) }} / {{ formatBytes(retentionStatus.disk_usage?.total_bytes || 0) }}
可用空間: {{ formatBytes(retentionStatus.disk_usage?.available_bytes || 0) }}

錄影統計

錄影檔案數 {{ retentionStatus.recordings_stats?.total_count || 0 }}
總大小 {{ formatBytes(retentionStatus.recordings_stats?.total_size || 0) }}
總時長 {{ formatDuration(retentionStatus.recordings_stats?.total_duration || 0) }}

錄影列表

共 {{ recordings.length }} 筆
串流 檔案 大小 開始時間 過期時間 操作
{{ rec.stream_id }}
{{ getFileName(rec.file_path) }}
{{ formatBytes(rec.file_size) }} {{ formatDateTime(rec.start_time) }} {{ formatDateTime(rec.expires_at) }}

沒有錄影檔案

深度探測結果

正在探測串流...

{{ probeResult.probe.is_healthy ? '串流健康' : '串流異常' }}
解析度 {{ probeResult.probe.width }}x{{ probeResult.probe.height }}
編碼 {{ probeResult.probe.codec }}
幀率 {{ probeResult.probe.fps?.toFixed(2) }} fps
位元率 {{ formatBitrate(probeResult.probe.bitrate) }}
問題:
  • {{ issue }}
探測失敗

告警管理

{{ alertStats.total || 0 }}
活躍告警
{{ groupedAlerts.filter(g => g.activeCount > 0).length }}
受影響串流
{{ alerts24hCount }}
24 小時內新增
{{ alerts.length }}
列表筆數
{{ g.latest.severity }}
{{ g.streamPath || g.latest.title }} ×{{ g.count }}
{{ g.rootCause }}
{{ formatTime(g.latest.created_at) }}
活躍 已解決
最新修復歷程
{{ line }}

沒有告警

節點管理

{{ node.name }}

{{ node.is_active ? '活躍' : '停用' }}
{{ node.environment }}
API URL: {{ node.api_url }}
RTSP URL: {{ node.rtsp_url }}
串流數: {{ node.stream_count }} (健康: {{ node.healthy_count }})
最後心跳: {{ formatTime(node.last_seen) }}

尚未新增任何節點

點擊「新增節點」來添加 MediaMTX 節點

觀看者監控 共 {{ viewerCount }} 人觀看

{{ pathName }} {{ pathViewers.length }} 人觀看
開啟
{{ viewer.type.toUpperCase() }}
{{ viewer.remote_addr || '未知' }} 透過代理
已傳送: {{ formatBytes(viewer.bytes_sent) }}
{{ formatTime(viewer.created) }}
{{ formatViewerDuration(viewer.created) }}

目前沒有人在觀看

當有 VLC、WebRTC 或 HLS 觀看者時會顯示在這裡

RTSP 連線

{{ rtspSessionCount }}

WebRTC 連線

{{ webrtcSessionCount }}

活躍路徑

{{ activePathCount }}

版本管理

各版本裝置分佈

{{ ver }} {{ count }} 台 未上架
尚無資料
版本 架構 說明 上架時間 使用中
{{ g.version }} {{ copiedSha === a.sha256 ? '已複製 SHA' : a.arch }} {{ g.notes }} (無說明) {{ formatTime(g.created_at) }} {{ deviceVersions[g.version] || 0 }} 台
尚未上架任何版本(發佈流程見 docs/ota-update.md)

上架新版本:make release-arm64 編譯簽章 → docker cp 進 device-service 的 /var/lib/rai/releases/ → POST /api/v1/admin/releases 登錄(含 notes 說明)→ 到裝置詳情指派

{{ editingNode ? '編輯節點' : '新增節點' }}

啟用節點

{{ claimForm.device_exists ? '配對裝置' : (isSuperAdmin ? '註冊裝置' : '綁定裝置') }}

Hardware ID: {{ claimForm.hardware_id }}

設備已註冊 新設備,將自動註冊 設備尚未註冊,請聯繫 Super Admin 先進行註冊

可從裝置上的 QR Code 取得,或查看 Edge 日誌

若裝置已有 public key 記錄可留空,否則請從 Edge 日誌取得

Edge 裝置透過 FRP 隧道傳輸 RTSP 串流 Edge 裝置進行轉碼後推送到外部平台(即將推出) 透過協定閘道連接 DVR/NVR,轉換為 RTSP 串流 DeepStream AI 辨識後輸出推流(即將推出)

{{ showEditStreamDialog ? '編輯推流' : '新增推流' }}

設備尚未指派 Tenant ID,無法設定推流路徑

{{ streamRtspResult.success ? '連線成功' : streamRtspResult.message }}

需 Edge 0.2.0 以上版本(見裝置詳情的 Edge 版本),舊版會忽略此設定

錄影資訊

錄影已自動啟用

路徑: /recordings/{{ streamPathPrefix }}/{{ streamForm.stream_path_suffix || '...' }}/

格式: fMP4 | 片段: 1小時 | 保留: 24小時

登入

{{ loginError }}

使用 Auth Token Service 帳號登入

選擇 API Key

載入中...

{{ toast.message }}