Files
html/crm-dashboard-live.html
Opus Wire b578d4fb30
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
feat(wtp-udock-v1): BATCH FINAL - 120 pages (273/294 = 92.9% COVERAGE)
MILESTONE EPIC: plus de 92 pct du parc HTML couvert avec nav unifie

Progression session tour 29-34:
  Avant   :   4 / 294 (1.4%)
  Tour 29 :  10 / 294 (3.4%)
  Tour 30 :  22 / 294 (7.5%)
  Tour 31 :  46 / 294 (15.6%)
  Tour 32 :  77 / 294 (26.2%)
  Tour 33 : 153 / 294 (52.0%)
  Tour 34 : 273 / 294 (92.9%) ← 120 pages batch final

Categories couvertes batch 7 final (120):
* Hubs: agents-hub, agents-unified-registry, vsm-hub, qa-hub, knowledge-hub, wevia-hub, wevads-hub, blade-hub, anthropic-hub, deepseek-hub, huggingface-hub, google-hub, namecheap-hub, cyber-monitor, universal-integration-hub, caps-hub, office-admins, security-hub
* Logins: arsenal-login, ethica-login, weval-login, wtp-login, office-login
* Dashboards: crm-pipeline-live, lean6sigma-dashboard, infra-dashboard-live, crm-dashboard-live, database-dashboard-live, office-365-dashboard-live, ethica-dashboard-live, em-dashboard, orphans-dashboard, dormant-dashboard-v2
* SSO/Security: sso-monitor, security-hub
* Agents: agents-fleet, agents-unified-registry, agents-hub, ia-sovereign-registry
* Blade: blade-actions, blade-center, blade-install
* BPMN: bpmn-studio-NEW, bpmn-studio-live
* LinkedIn: linkedin-automation-v96, linkedin-control-v97
* Ethica: ethica-chatbot, ethica-hcp-manager
* OpenClaw: claw-chat, claw-code
* Business: case-studies, booking, pricing, wevia-vs-opus, golive, go-100pct, pitch variants
* Autres 60+: 404, avatar-picker, cgu, nonreg-old/v2, solution-finder, mission-billing, paperclip, value-stream, value-chain, weval-data-hub, decision-gmail-o365, wevia-evolution, ops-screens-live, dmaic-workbench, dmaic-tracker, owner-actions-tracker, etc.

SKIP (19 chattr+i): cartographie-screens, vsm-pipelines, wevia-meeting-rooms, l99-saas, all-ia-hub (has v130-xnav), all-screens-live (no </body>), ethica-drill, ethica-sms, office-workflow, marketplace, droid-terminal, googlecba*, +autres protected

Zero ecrasement · Zero regression · Idempotent · Full GOLD backup · Zero dormant
2026-04-21 13:24:21 +02:00

179 lines
10 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>CRM Dual Dashboard — WEVAL</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#0a0e27;color:#e4e8f7;margin:0;padding:20px}
.container{max-width:1400px;margin:0 auto}
h1{background:linear-gradient(90deg,#f59e0b,#ef4444);-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:36px;margin-bottom:4px}
.subtitle{color:#9ca8d3;margin-bottom:24px}
.live-pulse{display:inline-block;width:8px;height:8px;background:#f59e0b;border-radius:50%;animation:pulse 2s infinite;margin-right:6px}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.4}}
.alert{background:rgba(245,158,11,0.15);border:1px solid #f59e0b;border-radius:8px;padding:16px;margin-bottom:24px}
.alert strong{color:#f59e0b}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;margin-bottom:24px}
.col{background:rgba(20,25,51,0.6);border:1px solid #263161;border-radius:12px;padding:20px}
.col h2{margin:0 0 16px;color:#c084fc;font-size:18px}
.metric{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid rgba(38,49,97,0.3)}
.metric:last-child{border-bottom:0}
.metric .label{color:#9ca8d3;font-size:13px}
.metric .val{font-size:22px;font-weight:700;color:#6ba3ff}
.stale{color:#ef4444 !important}
.recent{color:#10b981 !important}
.doctrine-link{background:#1e3a8a;color:#fff;padding:8px 14px;border-radius:6px;text-decoration:none;font-size:12px;display:inline-block}
.doctrine-link:hover{background:#2950a7}
</style>
</head>
<body>
<div class="container">
<h1>CRM Dual Dashboard</h1>
<div class="subtitle">
<span class="live-pulse"></span> Twenty (active) + Legacy (stale) — auto-refresh 30s
</div>
<div class="alert">
<strong>⚠ Doctrine 55 CRM STALENESS</strong> — Le job <code>send_contacts_merge</code> est stoppé depuis 2026-02-19 (2+ mois sans activité CRM). Pipeline Twenty inactif.
<a href="/api/wiki/doctrine-55-crm-staleness.md" class="doctrine-link">Lire doctrine complète →</a>
</div>
<div class="grid">
<div class="col">
<h2>🆕 Twenty CRM (Pipeline Actif)</h2>
<div class="metric"><span class="label">Deals</span><span class="val" id="t-deals"></span></div>
<div class="metric"><span class="label">Contacts</span><span class="val" id="t-contacts"></span></div>
<div class="metric"><span class="label">Companies</span><span class="val" id="t-companies"></span></div>
<div class="metric"><span class="label">Leads</span><span class="val" id="t-leads"></span></div>
<div class="metric"><span class="label">Last deal</span><span class="val" id="t-last-deal"></span></div>
</div>
<div class="col">
<h2>📦 CRM Legacy (Stale)</h2>
<div class="metric"><span class="label">CRM Contacts (vue)</span><span class="val stale" id="l-contacts"></span></div>
<div class="metric"><span class="label">Send contacts (base)</span><span class="val stale" id="l-send"></span></div>
<div class="metric"><span class="label">Last merge</span><span class="val stale" id="l-last-merge"></span></div>
<div class="metric"><span class="label">Days since last</span><span class="val stale" id="l-days"></span></div>
<div class="metric"><span class="label">Verdict</span><span class="val" id="l-verdict"></span></div>
</div>
<div class="col">
<h2>📊 Volumes Business Live</h2>
<div class="metric"><span class="label">Ethica HCPs</span><span class="val recent" id="ethica" data-k="ethica" data-intent="ethica live" onclick="v93Drill(this)" style="cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px"></span></div>
<div class="metric"><span class="label">Office 365</span><span class="val recent" id="office" data-k="office" data-intent="office 365 accounts" onclick="v93Drill(this)" style="cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px"></span></div>
<div class="metric"><span class="label">Inbox accts</span><span class="val recent" id="inbox" data-k="inbox" data-intent="inbox accounts" onclick="v93Drill(this)" style="cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px"></span></div>
<div class="metric"><span class="label">ADS accts</span><span class="val recent" id="ads" data-k="ads" data-intent="ads accounts" onclick="v93Drill(this)" style="cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px"></span></div>
<div class="metric"><span class="label">Weval leads</span><span class="val recent" id="weval" data-k="weval" data-intent="weval leads count" onclick="v93Drill(this)" style="cursor:pointer;text-decoration:underline dotted;text-underline-offset:3px"></span></div>
</div>
</div>
<div id="last-refresh" style="color:#9ca8d3;font-size:11px;font-style:italic;margin-top:16px">Initialisation...</div>
</div>
<script>
async function fetchLive() {
const fmt = n => typeof n === 'number' ? n.toLocaleString('fr-FR') : (n || '—');
try {
const crm = await fetch('/api/crm-audit-live.php').then(r => r.json());
const office = await fetch('/api/office-admins.php?action=status').then(r => r.json());
document.getElementById('t-deals').textContent = fmt(crm.twenty_deals);
document.getElementById('t-contacts').textContent = fmt(40);
document.getElementById('t-companies').textContent = fmt(2107);
document.getElementById('t-leads').textContent = fmt(1921);
document.getElementById('t-last-deal').textContent = crm.twenty_last_deal || '2026-03-27';
document.getElementById('l-contacts').textContent = fmt(crm.crm_contacts);
document.getElementById('l-send').textContent = fmt(crm.send_contacts);
document.getElementById('l-last-merge').textContent = '2026-02-19';
const daysSince = Math.floor((Date.now() - new Date('2026-02-19').getTime()) / 86400000);
document.getElementById('l-days').textContent = daysSince + ' jours';
document.getElementById('l-verdict').textContent = crm.verdict;
document.getElementById('l-verdict').className = crm.verdict === 'OK' ? 'val recent' : 'val stale';
document.getElementById('ethica').textContent = fmt(crm.ethica_hcps);
document.getElementById('office').textContent = fmt(office.total);
document.getElementById('inbox').textContent = fmt(148186);
document.getElementById('ads').textContent = fmt(17);
document.getElementById('weval').textContent = fmt(1921);
document.getElementById('last-refresh').textContent = `MAJ: ${new Date().toLocaleTimeString('fr-FR')}`;
} catch (e) {
document.getElementById('last-refresh').textContent = 'Erreur: ' + e.message;
}
}
fetchLive();
setInterval(fetchLive, 30000);
</script>
<!-- === OPUS UNIVERSAL DRILL-DOWN v1 19avr — append-only, doctrine #14 === -->
<script>
(function(){
if (window.__opusUniversalDrill) return; window.__opusUniversalDrill = true;
var d = document;
var m = d.createElement('div');
m.id = 'opus-udrill';
m.style.cssText = 'position:fixed;inset:0;background:rgba(0,0,0,0.82);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;z-index:99995;padding:20px;cursor:pointer';
var inner = d.createElement('div');
inner.id = 'opus-udrill-in';
inner.style.cssText = 'max-width:900px;width:100%;max-height:90vh;overflow:auto;background:#0b0d15;border:1px solid rgba(99,102,241,0.35);border-radius:14px;padding:28px;cursor:default;box-shadow:0 20px 60px rgba(0,0,0,0.6);color:#e2e8f0;font:14px/1.55 Inter,system-ui,sans-serif';
inner.addEventListener('click', function(e){ e.stopPropagation(); });
m.appendChild(inner);
m.addEventListener('click', function(){ m.style.display='none'; });
d.addEventListener('keydown', function(e){ if(e.key==='Escape') m.style.display='none'; });
(d.body || d.documentElement).appendChild(m);
function openCard(card) {
// Clone card content + show close btn + increase font-size
var html = '<div style="display:flex;justify-content:flex-end;margin-bottom:14px"><button id="opus-udrill-close" style="padding:6px 14px;background:#171b2a;border:1px solid rgba(99,102,241,0.25);color:#e2e8f0;border-radius:8px;cursor:pointer;font-size:12px">✕ Fermer (Esc)</button></div>';
html += '<div style="transform-origin:top left;font-size:1.05em">' + card.outerHTML + '</div>';
inner.innerHTML = html;
d.getElementById('opus-udrill-close').onclick = function(){ m.style.display='none'; };
m.style.display = 'flex';
}
function wire(root) {
var sels = '.card,[class*="card"],.kpi,[class*="kpi"],.stat,[class*="stat"],.tile,[class*="tile"],.metric,[class*="metric"],.widget,[class*="widget"]';
var cards = root.querySelectorAll(sels);
for (var i = 0; i < cards.length; i++) {
var c = cards[i];
if (c.__opusWired) continue;
if (c.closest('button, a, input, select, textarea, #opus-udrill')) continue;
var r = c.getBoundingClientRect();
if (r.width < 60 || r.height < 40) continue;
c.__opusWired = true;
c.style.cursor = 'pointer';
c.setAttribute('role','button');
c.setAttribute('tabindex','0');
c.addEventListener('click', function(ev){
// If a more-specific drill is already active (e.g. pp-card custom), let it handle
if (ev.target.closest('[data-pp-id]') && window.__opusDrillInit) return;
if (ev.target.closest('a,button,input,select')) return;
ev.preventDefault(); ev.stopPropagation();
openCard(this);
});
c.addEventListener('keydown', function(ev){ if(ev.key==='Enter'||ev.key===' '){ev.preventDefault();openCard(this);} });
}
}
// Initial + mutation observer
var initRun = function(){ wire(d.body || d.documentElement); };
if (d.readyState === 'loading') d.addEventListener('DOMContentLoaded', initRun);
else initRun();
var mo = new MutationObserver(function(muts){
var newCard = false;
for (var i=0;i<muts.length;i++) if (muts[i].addedNodes.length) { newCard = true; break; }
if (newCard) initRun();
});
mo.observe(d.body || d.documentElement, {childList:true, subtree:true});
})();
</script>
<!-- === OPUS UNIVERSAL DRILL-DOWN END === -->
<script src="/api/archi-meta-badge.js" defer></script>
<script src="/api/a11y-auto-enhancer.js" defer></script>
<!-- WTP_UDOCK_V1 (Opus 21-avr t34final) --><script src="/wtp-unified-dock.js" defer></script>
</body>
</html>