fix(设备池): 指纹对账纠正 IP 复用导致的身份错位
- reconcile_serial_identity:按物理指纹交换两条记录的名字/指纹,同步分组/任务引用,不删身份 - 实际指纹不在池里只告警,不擅自改名 - 后台对账默认每 300s(DEVICE_FP_AUDIT / _INTERVAL),启动 20s 后开始 - 设备页「指纹对账」+ POST /api/devices/pool/fingerprint_audit - TaskManager.swap_device_serials 同步内存副本,不重启即生效 - 新增 test_device_pool_audit.py;文档 §37/API/DEVELOPMENT 同步
This commit is contained in:
@@ -631,6 +631,17 @@ async function refreshPoolModels(){
|
||||
else showToast(r.error,'error');
|
||||
}
|
||||
|
||||
async function auditPoolFingerprints(){
|
||||
if(!confirm('读取在线设备的实际指纹并核对设备池身份?\n\n'
|
||||
+'只交换名字/指纹与分组引用,不删除设备、不改 IP、不重连。'))return;
|
||||
const r=await apiPost('/api/devices/pool/fingerprint_audit',{});
|
||||
if(!r)return;
|
||||
if(r.ok){
|
||||
showToast(r.msg, (r.results||[]).some(x=>x.type==='swapped')?'success':'info');
|
||||
loadDevPool();
|
||||
} else showToast(r.error,'error');
|
||||
}
|
||||
|
||||
// ================== 设备配置二维码(设备端 Agent 扫码即配好) ==================
|
||||
// 二维码内容:平台地址 + 设备令牌 + 这台设备的指纹(JSON)。
|
||||
// 手机上的 Agent 扫一下 → 保存这三项 → 不用在手机上打字、也不用连 adb。
|
||||
|
||||
Reference in New Issue
Block a user