fix(sidecar-v2): second-round review fixes

- cooldown_manager: move function-level imports to module top
- proxy.py: emergency_count counter now actually increments
- server.py: metrics reads emergency_count from proxy module
- dashboard.html: real JS CDN fallback (not just comment)
- requirements.txt: remove unused prometheus_client

Round 2 review residual fixes from 沈路明/陆怀瑾/梁思筑 feedback

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-06-25 17:53:37 +08:00
parent 4f415fb500
commit 474f1eddfd
5 changed files with 34 additions and 11 deletions
+18 -2
View File
@@ -4,9 +4,25 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sidecar V2 — Provider Pool Dashboard</title>
<!-- Primary: jsDelivr CDN -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
<!-- CDN fallback: place chart.umd.min.js in static/ for offline deployments -->
<script>if(typeof Chart==='undefined'){document.write('<script src="/static/chart.umd.min.js"><\/script>')}</script>
<!-- Fallback: local static copy for offline/intranet deployments -->
<script>
(function() {
var check = function() {
if (typeof Chart === 'undefined') {
var s = document.createElement('script');
s.src = '/static/chart.umd.min.js';
s.onerror = function() {
console.warn('Chart.js unavailable (CDN + local both failed). Charts disabled.');
};
document.head.appendChild(s);
}
};
// Check after CDN script has had a chance to load
setTimeout(check, 2000);
})();
</script>
<style>
:root {
--bg: #0f1117;