fix: kimi collector crash on CDP error + auto-start CDP proxy + dashboard renewal badge

- usage_collector_kimi: guard /targets dict response, auto-start CDP proxy if down
- usage_collector: add subscribed/renewal fields to HTTP+CDP collection
- dashboard: show UNSUBSCRIBED red badge / renewal-cancelled orange badge
This commit is contained in:
hmo
2026-07-20 23:18:40 +08:00
parent dc3b3d1868
commit 2598b286eb
3 changed files with 287 additions and 100 deletions
+7 -1
View File
@@ -440,7 +440,13 @@ document.getElementById('rdp-status-txt').textContent=fOn?'Connected':e4.rdp_ena
}else if(a.error){
html+='<span style="font-size:11px;color:var(--dim)" title="'+esc(a.error)+'">⚠</span>';
}else{
html+='<span style="font-size:11px;color:var(--dim)">'+maxPct+'% max</span>';
var statusTags='';
if(a.subscribed===false){
statusTags+='<span style="font-size:11px;color:#e53935;background:rgba(229,57,53,.1);padding:2px 6px;border-radius:4px;margin-right:4px">UNSUBSCRIBED</span>';
}else if(a.renewal==='cancelled'){
statusTags+='<span style="font-size:11px;color:#fb8c00;background:rgba(251,140,0,.1);padding:2px 6px;border-radius:4px;margin-right:4px" title="续订已取消·当前周期仍有效">⏳ 续订取消</span>';
}
html+=statusTags+'<span style="font-size:11px;color:var(--dim)">'+maxPct+'% max</span>';
}
html+='</div>';
if(a.session_expired||a.error){