auto-sync-1715
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"version": "V83-business-kpi",
|
||||
"ts": "2026-04-19T15:13:44+00:00",
|
||||
"ts": "2026-04-19T15:14:14+00:00",
|
||||
"summary": {
|
||||
"total_categories": 7,
|
||||
"total_kpis": 56,
|
||||
|
||||
@@ -1865,6 +1865,162 @@ if (typeof window.navigateTo === 'function'){
|
||||
</script>
|
||||
<!-- V81 ORPHANS RESCUE END -->
|
||||
|
||||
<!-- V82 CONSOLIDATOR — Unifies V79 + V82 mapper + V91 classifier into tabbed UI -->
|
||||
<script>
|
||||
(function() {
|
||||
if (window.__WEVAL_V82) return;
|
||||
window.__WEVAL_V82 = true;
|
||||
|
||||
async function loadV82Tabs() {
|
||||
const drawer = document.getElementById('v80-drawer');
|
||||
if (!drawer) { setTimeout(loadV82Tabs, 500); return; }
|
||||
if (document.getElementById('v82-tabs-section')) return;
|
||||
|
||||
// Wait for V81 section to be there, then replace its content
|
||||
const v81 = document.getElementById('v81-orphans-section');
|
||||
if (!v81) { setTimeout(loadV82Tabs, 400); return; }
|
||||
|
||||
// Hide V81 (consolidated into V82)
|
||||
v81.style.display = 'none';
|
||||
|
||||
// Build V82 tabbed UI
|
||||
const section = document.createElement('div');
|
||||
section.id = 'v82-tabs-section';
|
||||
section.className = 'v80-section';
|
||||
section.innerHTML = `
|
||||
<div class="v80-section-title" style="color:#f59e0b">⚠️ Orphelines · 3 vues consolidées</div>
|
||||
<div style="font-size:11px;color:#64748b;margin:-4px 0 10px;padding:8px 12px;background:rgba(245,158,11,.05);border-radius:6px;border:1px solid rgba(245,158,11,.15);">
|
||||
Réconciliation train multi-Claude · <a href="/orphans-rescue.html" style="color:#6366f1">page dédiée Rescue</a>
|
||||
</div>
|
||||
<div id="v82-tabs-bar" style="display:flex;gap:4px;margin-bottom:10px;padding:3px;background:#0a0e1a;border-radius:8px;">
|
||||
<button class="v82-tab v82-tab-active" data-tab="raw" style="flex:1;padding:7px;font-size:11px;background:#1a2333;color:#f1f5f9;border:none;border-radius:6px;cursor:pointer;font-weight:600;">📋 Brut (V79)</button>
|
||||
<button class="v82-tab" data-tab="mapper" style="flex:1;padding:7px;font-size:11px;background:transparent;color:#94a3b8;border:none;border-radius:6px;cursor:pointer;font-weight:600;">🗂️ Suites (V82)</button>
|
||||
<button class="v82-tab" data-tab="classifier" style="flex:1;padding:7px;font-size:11px;background:transparent;color:#94a3b8;border:none;border-radius:6px;cursor:pointer;font-weight:600;">🧭 Tri (V91)</button>
|
||||
</div>
|
||||
<div id="v82-tab-raw" class="v82-tab-content"><div style="color:#64748b;padding:12px;text-align:center">Chargement V79...</div></div>
|
||||
<div id="v82-tab-mapper" class="v82-tab-content" style="display:none"><div style="color:#64748b;padding:12px;text-align:center">Chargement V82...</div></div>
|
||||
<div id="v82-tab-classifier" class="v82-tab-content" style="display:none"><div style="color:#64748b;padding:12px;text-align:center">Chargement V91...</div></div>
|
||||
`;
|
||||
|
||||
// Insert before footer
|
||||
const footer = drawer.querySelector('.v80-footer');
|
||||
if (footer) footer.parentNode.insertBefore(section, footer);
|
||||
|
||||
// Tab switching
|
||||
section.querySelectorAll('.v82-tab').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
section.querySelectorAll('.v82-tab').forEach(b => {
|
||||
b.style.background = 'transparent'; b.style.color = '#94a3b8';
|
||||
b.classList.remove('v82-tab-active');
|
||||
});
|
||||
btn.style.background = '#1a2333'; btn.style.color = '#f1f5f9';
|
||||
btn.classList.add('v82-tab-active');
|
||||
const t = btn.dataset.tab;
|
||||
section.querySelectorAll('.v82-tab-content').forEach(c => c.style.display = 'none');
|
||||
document.getElementById('v82-tab-' + t).style.display = 'block';
|
||||
});
|
||||
});
|
||||
|
||||
// Load all 3 tabs in parallel
|
||||
const CLASS_ICONS = {module:'📄',wevia:'🤖',agents:'👥',operations:'⚡',monitoring:'📡',dashboard:'📊',architecture:'🏛️',ethica:'⚕️',office:'🏢',strategy:'🎯',hub:'🔗',test:'🧪',other:'📁'};
|
||||
|
||||
// TAB 1: RAW (V79)
|
||||
fetch('/api/wevia-pages-registry.php?action=orphans').then(r=>r.json()).then(d => {
|
||||
const byClass = {};
|
||||
for (const name in d.orphans) {
|
||||
const m = d.orphans[name]; const c = m.class || 'other';
|
||||
if (!byClass[c]) byClass[c] = [];
|
||||
byClass[c].push({name, title: m.title || '', size_kb: m.size_kb});
|
||||
}
|
||||
const sorted = Object.keys(byClass).sort((a,b) => byClass[b].length - byClass[a].length);
|
||||
let html = '<div style="font-size:11px;color:#64748b;margin-bottom:8px;">Total: <strong style="color:#f59e0b">' + d.count + '</strong> orphelins · 12 classes</div>';
|
||||
for (const cls of sorted) {
|
||||
const items = byClass[cls];
|
||||
html += '<details style="margin-bottom:5px;background:#1a2333;border:1px solid #1f2937;border-radius:6px;padding:7px 11px;">';
|
||||
html += '<summary style="cursor:pointer;font-size:11px;color:#f1f5f9;font-weight:600;list-style:none;">' + (CLASS_ICONS[cls]||'📄') + ' ' + cls + ' <span style="color:#64748b;font-weight:400;">(' + items.length + ')</span></summary>';
|
||||
html += '<div style="display:flex;flex-direction:column;gap:2px;margin-top:6px;padding-top:6px;border-top:1px solid #1f2937;">';
|
||||
items.forEach(i => {
|
||||
html += '<a href="/' + i.name + '" class="v80-link" style="padding:4px 7px;font-size:10px;">';
|
||||
html += '<span style="display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;">' + (i.title||i.name) + '</span>';
|
||||
html += '<span class="v80-link-meta" style="color:#64748b;">' + i.size_kb + 'kb</span></a>';
|
||||
});
|
||||
html += '</div></details>';
|
||||
}
|
||||
document.getElementById('v82-tab-raw').innerHTML = html;
|
||||
}).catch(e => { document.getElementById('v82-tab-raw').innerHTML = '<div style="color:#ef4444;padding:12px">V79 fetch error: ' + e.message + '</div>'; });
|
||||
|
||||
// TAB 2: MAPPER (V82 Opus WIRE)
|
||||
fetch('/api/wevia-orphans-mapper.php').then(r=>r.json()).then(d => {
|
||||
if (d.error) throw new Error(d.error);
|
||||
const mapping = d.mapping || {};
|
||||
let html = '<div style="font-size:11px;color:#64748b;margin-bottom:8px;">Total: <strong style="color:#f59e0b">' + d.total_orphans + '</strong> · <strong style="color:#6366f1">' + d.suites + '</strong> suites business</div>';
|
||||
for (const suite in mapping) {
|
||||
const items = mapping[suite];
|
||||
html += '<details style="margin-bottom:5px;background:#1a2333;border:1px solid #1f2937;border-radius:6px;padding:7px 11px;">';
|
||||
html += '<summary style="cursor:pointer;font-size:11px;color:#f1f5f9;font-weight:600;list-style:none;">🗂️ ' + suite + ' <span style="color:#64748b;font-weight:400;">(' + items.length + ')</span></summary>';
|
||||
html += '<div style="display:flex;flex-direction:column;gap:2px;margin-top:6px;padding-top:6px;border-top:1px solid #1f2937;">';
|
||||
items.forEach(i => {
|
||||
html += '<a href="' + i.url + '" class="v80-link" style="padding:4px 7px;font-size:10px;">';
|
||||
html += '<span style="display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;">' + (i.title||i.name) + '</span>';
|
||||
html += '<span class="v80-link-meta" style="color:#64748b;">' + i.size_kb + 'kb</span></a>';
|
||||
});
|
||||
html += '</div></details>';
|
||||
}
|
||||
document.getElementById('v82-tab-mapper').innerHTML = html;
|
||||
}).catch(e => { document.getElementById('v82-tab-mapper').innerHTML = '<div style="color:#ef4444;padding:12px">V82 fetch error: ' + e.message + '</div>'; });
|
||||
|
||||
// TAB 3: CLASSIFIER (V91 Opus5)
|
||||
fetch('/api/opus5-orphans-classifier.php').then(r=>r.json()).then(d => {
|
||||
const cl = d.classification || {};
|
||||
const counts = d.summary || {};
|
||||
const TAB_ICONS = {LEGITIMATE_ARCHIVE:'📦',ACTIVE_TO_REWIRE:'🔌',DORMANT:'💤'};
|
||||
const TAB_COLORS = {LEGITIMATE_ARCHIVE:'#64748b',ACTIVE_TO_REWIRE:'#10b981',DORMANT:'#f59e0b'};
|
||||
const TAB_LABELS = {LEGITIMATE_ARCHIVE:'Archive légitime',ACTIVE_TO_REWIRE:'À rebrancher',DORMANT:'Dormant'};
|
||||
let html = '<div style="font-size:11px;color:#64748b;margin-bottom:8px;">Tri par action · Opus5 doctrine 91</div>';
|
||||
html += '<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:10px;">';
|
||||
for (const cat of ['LEGITIMATE_ARCHIVE','ACTIVE_TO_REWIRE','DORMANT']) {
|
||||
const items = cl[cat] || [];
|
||||
html += '<div style="background:#1a2333;border:1px solid #1f2937;border-radius:6px;padding:8px;text-align:center;">';
|
||||
html += '<div style="font-size:16px;font-weight:700;color:' + TAB_COLORS[cat] + '">' + items.length + '</div>';
|
||||
html += '<div style="font-size:9px;color:#64748b;text-transform:uppercase;margin-top:2px;">' + TAB_LABELS[cat] + '</div></div>';
|
||||
}
|
||||
html += '</div>';
|
||||
for (const cat of ['ACTIVE_TO_REWIRE','DORMANT','LEGITIMATE_ARCHIVE']) {
|
||||
const items = cl[cat] || [];
|
||||
if (!items.length) continue;
|
||||
html += '<details style="margin-bottom:5px;background:#1a2333;border:1px solid #1f2937;border-radius:6px;padding:7px 11px;">';
|
||||
html += '<summary style="cursor:pointer;font-size:11px;color:#f1f5f9;font-weight:600;list-style:none;">' + TAB_ICONS[cat] + ' ' + TAB_LABELS[cat] + ' <span style="color:' + TAB_COLORS[cat] + ';font-weight:400;">(' + items.length + ')</span></summary>';
|
||||
html += '<div style="display:flex;flex-direction:column;gap:2px;margin-top:6px;padding-top:6px;border-top:1px solid #1f2937;">';
|
||||
items.forEach(i => {
|
||||
html += '<a href="/' + i.page + '" class="v80-link" style="padding:4px 7px;font-size:10px;" title="' + (i.reason||'') + '">';
|
||||
html += '<span style="display:inline-block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;">' + i.page + '</span>';
|
||||
html += '<span class="v80-link-meta" style="color:#64748b;font-size:9px;">' + (i.reason||'') + '</span></a>';
|
||||
});
|
||||
html += '</div></details>';
|
||||
}
|
||||
document.getElementById('v82-tab-classifier').innerHTML = html;
|
||||
}).catch(e => { document.getElementById('v82-tab-classifier').innerHTML = '<div style="color:#ef4444;padding:12px">V91 fetch error: ' + e.message + '</div>'; });
|
||||
|
||||
console.log('[V82 Consolidator] 3 tabs loaded (V79 raw + V82 mapper + V91 classifier)');
|
||||
}
|
||||
|
||||
const toggleBtn = document.getElementById('v80-toggle');
|
||||
if (toggleBtn) {
|
||||
toggleBtn.addEventListener('click', () => setTimeout(loadV82Tabs, 300));
|
||||
document.addEventListener('keydown', e => {
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === 'k') setTimeout(loadV82Tabs, 300);
|
||||
});
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
const b = document.getElementById('v80-toggle');
|
||||
if (b) b.addEventListener('click', () => setTimeout(loadV82Tabs, 300));
|
||||
}, 1200);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<!-- V82 CONSOLIDATOR END -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- WTP-INFRA-LIVE-V1 · Infrastructure Live Widget · Opus Yacine 19avr -->
|
||||
|
||||
Reference in New Issue
Block a user