fix: publier les services infra dans le portail production
Some checks failed
Validation applicative / Tests de contrat (push) Failing after 9s
Some checks failed
Validation applicative / Tests de contrat (push) Failing after 9s
This commit is contained in:
36
index.html
36
index.html
@@ -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 -->
|
||||
@@ -377,7 +392,7 @@
|
||||
<script>
|
||||
/*
|
||||
* Configuration d'environnement. Cette version est exclusivement destinée
|
||||
* à la recette. La version production ne diffère que par ces quatre valeurs.
|
||||
* à la production. Les URLs restent strictement propres à cet environnement.
|
||||
*/
|
||||
var ENV = 'prod';
|
||||
var ENV_LABEL = 'Production';
|
||||
@@ -431,24 +446,31 @@
|
||||
}
|
||||
|
||||
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]);
|
||||
// Le dashboard local est la source de vérité : toutes les catégories
|
||||
// déployées, y compris INFRA, restent publiées dans leur onglet dédié.
|
||||
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 +498,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 = '!';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user