feat: probe host stats, node cards with a separate lines panel grouped by carrier, Windows host sampling, manual carrier override [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

This commit is contained in:
justme committed 2026-10-08 21:56:19 +08:00
1 parent bac1c27e72
commit 88b1a0a9bb
36 files changed
+750 -185

No files matched your search

+26
View File
@@ -191,6 +191,15 @@ function NameDialog({ title, initial, onClose, onSubmit }: { title: string; init
)
}
const ISP_CHOICES = [
{ value: 'auto', label: '运营商:自动识别' },
{ value: 'telecom', label: '中国电信' },
{ value: 'unicom', label: '中国联通' },
{ value: 'mobile', label: '中国移动' },
{ value: 'broadnet', label: '中国广电' },
{ value: 'other', label: '其他' },
]
type Pending = { kind: 'revoke' | 'delete'; probe: ProbeDto }
export function Probes() {
@@ -200,6 +209,8 @@ export function Probes() {
const [creating, setCreating] = useState(false)
const [renaming, setRenaming] = useState<ProbeDto>()
const [pending, setPending] = useState<Pending>()
// 刚改过的运营商(公开的节点信息每分钟才刷新一次,先按这里显示)
const [isp, setIsp] = useState<Record<string, string>>({})
const list = probes.data?.items ?? []
@@ -246,6 +257,21 @@ export function Probes() {
)}
<span className="mono faint">{p.id}</span>
<span className="right row wrap">
<select
className="input small"
title="展示页按电信 / 联通 / 移动给线路分组,自动识别不准时在这里手动指定"
value={isp[p.id] ?? (infos.get(p.id)?.isp_manual ? infos.get(p.id)?.isp_key ?? 'auto' : 'auto')}
onChange={async (e) => {
const value = e.target.value
if (await run(() => api.patch(`/api/admin/probes/${p.id}`, { isp: value }), '已保存')) setIsp((m) => ({ ...m, [p.id]: value }))
}}
>
{ISP_CHOICES.map((c) => (
<option key={c.value} value={c.value}>
{c.label}
</option>
))}
</select>
<button type="button" className="btn small" onClick={() => setRenaming(p)}>
<Pencil size={14} />
改名