feat: ajouter l onglet infrastructure dynamique
Some checks failed
Validation applicative / Tests de contrat (push) Failing after 9s

This commit is contained in:
Manus Déploiement Santinova
2026-09-04 15:51:49 +00:00
parent bdfc417435
commit f0cd2caa1b

View File

@@ -338,6 +338,10 @@
Applications Santinova
<span class="tab-count" id="count-santinova">…</span>
</button>
<button id="tab-infra" class="tab-btn" onclick="switchTab('infra', this)">
Infrastructure
<span class="tab-count" id="count-infra">…</span>
</button>
</div>
<!-- MAIN -->
@@ -365,6 +369,17 @@
</div>
</div>
<!-- ONGLET INFRASTRUCTURE -->
<div id="panel-infra" class="tab-panel">
<div class="section-header">
<h2>Infrastructure</h2>
<p>Accès direct aux services techniques de cet environnement</p>
</div>
<div id="grid-infra" class="apps-grid">
<div class="loading-msg">Chargement des applications…</div>
</div>
</div>
</main>
<!-- FOOTER -->
@@ -431,24 +446,30 @@
}
function renderApps(apps) {
// Défense en profondeur : le dashboard exclut INFRA et le portail le fait aussi.
var visibleApps = apps.filter(function(app) {
return app.category !== 'INFRA' && isHttpsUrl(app.urls && app.urls[ENV]);
// La source est le dashboard local : chaque app est présentée dans son onglet métier.
var deployableApps = apps.filter(function(app) {
return isHttpsUrl(app.urls && app.urls[ENV]);
});
var itinovaApps = visibleApps.filter(function(app) { return app.category === 'ITINOVA'; });
var santinovaApps = visibleApps.filter(function(app) { return app.category === 'SANTINOVA'; });
var itinovaApps = deployableApps.filter(function(app) { return app.category === 'ITINOVA'; });
var santinovaApps = deployableApps.filter(function(app) { return app.category === 'SANTINOVA'; });
var infraApps = deployableApps.filter(function(app) { return app.category === 'INFRA'; });
var gridItinova = document.getElementById('grid-itinova');
var gridSantinova = document.getElementById('grid-santinova');
var gridInfra = document.getElementById('grid-infra');
gridItinova.innerHTML = itinovaApps.length
? itinovaApps.map(buildCard).join('')
: '<div class="loading-msg">Aucune application Itinova déployée.</div>';
gridSantinova.innerHTML = santinovaApps.length
? santinovaApps.map(buildCard).join('')
: '<div class="loading-msg">Aucune application Santinova déployée.</div>';
gridInfra.innerHTML = infraApps.length
? infraApps.map(buildCard).join('')
: '<div class="loading-msg">Aucun service d’infrastructure déployé.</div>';
document.getElementById('count-itinova').textContent = itinovaApps.length;
document.getElementById('count-santinova').textContent = santinovaApps.length;
document.getElementById('count-infra').textContent = infraApps.length;
hasRenderedApps = true;
}
@@ -476,8 +497,10 @@
var message = '<div class="loading-msg">Dashboard indisponible — veuillez réessayer.</div>';
document.getElementById('grid-itinova').innerHTML = message;
document.getElementById('grid-santinova').innerHTML = message;
document.getElementById('grid-infra').innerHTML = message;
document.getElementById('count-itinova').textContent = '!';
document.getElementById('count-santinova').textContent = '!';
document.getElementById('count-infra').textContent = '!';
}
}
}