feat: ajouter l onglet infrastructure dynamique
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:
33
index.html
33
index.html
@@ -338,6 +338,10 @@
|
|||||||
Applications Santinova
|
Applications Santinova
|
||||||
<span class="tab-count" id="count-santinova">…</span>
|
<span class="tab-count" id="count-santinova">…</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button id="tab-infra" class="tab-btn" onclick="switchTab('infra', this)">
|
||||||
|
Infrastructure
|
||||||
|
<span class="tab-count" id="count-infra">…</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- MAIN -->
|
<!-- MAIN -->
|
||||||
@@ -365,6 +369,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
</main>
|
||||||
|
|
||||||
<!-- FOOTER -->
|
<!-- FOOTER -->
|
||||||
@@ -431,24 +446,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderApps(apps) {
|
function renderApps(apps) {
|
||||||
// Défense en profondeur : le dashboard exclut INFRA et le portail le fait aussi.
|
// La source est le dashboard local : chaque app est présentée dans son onglet métier.
|
||||||
var visibleApps = apps.filter(function(app) {
|
var deployableApps = apps.filter(function(app) {
|
||||||
return app.category !== 'INFRA' && isHttpsUrl(app.urls && app.urls[ENV]);
|
return isHttpsUrl(app.urls && app.urls[ENV]);
|
||||||
});
|
});
|
||||||
var itinovaApps = visibleApps.filter(function(app) { return app.category === 'ITINOVA'; });
|
var itinovaApps = deployableApps.filter(function(app) { return app.category === 'ITINOVA'; });
|
||||||
var santinovaApps = visibleApps.filter(function(app) { return app.category === 'SANTINOVA'; });
|
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 gridItinova = document.getElementById('grid-itinova');
|
||||||
var gridSantinova = document.getElementById('grid-santinova');
|
var gridSantinova = document.getElementById('grid-santinova');
|
||||||
|
var gridInfra = document.getElementById('grid-infra');
|
||||||
gridItinova.innerHTML = itinovaApps.length
|
gridItinova.innerHTML = itinovaApps.length
|
||||||
? itinovaApps.map(buildCard).join('')
|
? itinovaApps.map(buildCard).join('')
|
||||||
: '<div class="loading-msg">Aucune application Itinova déployée.</div>';
|
: '<div class="loading-msg">Aucune application Itinova déployée.</div>';
|
||||||
gridSantinova.innerHTML = santinovaApps.length
|
gridSantinova.innerHTML = santinovaApps.length
|
||||||
? santinovaApps.map(buildCard).join('')
|
? santinovaApps.map(buildCard).join('')
|
||||||
: '<div class="loading-msg">Aucune application Santinova déployée.</div>';
|
: '<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-itinova').textContent = itinovaApps.length;
|
||||||
document.getElementById('count-santinova').textContent = santinovaApps.length;
|
document.getElementById('count-santinova').textContent = santinovaApps.length;
|
||||||
|
document.getElementById('count-infra').textContent = infraApps.length;
|
||||||
hasRenderedApps = true;
|
hasRenderedApps = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,8 +497,10 @@
|
|||||||
var message = '<div class="loading-msg">Dashboard indisponible — veuillez réessayer.</div>';
|
var message = '<div class="loading-msg">Dashboard indisponible — veuillez réessayer.</div>';
|
||||||
document.getElementById('grid-itinova').innerHTML = message;
|
document.getElementById('grid-itinova').innerHTML = message;
|
||||||
document.getElementById('grid-santinova').innerHTML = message;
|
document.getElementById('grid-santinova').innerHTML = message;
|
||||||
|
document.getElementById('grid-infra').innerHTML = message;
|
||||||
document.getElementById('count-itinova').textContent = '!';
|
document.getElementById('count-itinova').textContent = '!';
|
||||||
document.getElementById('count-santinova').textContent = '!';
|
document.getElementById('count-santinova').textContent = '!';
|
||||||
|
document.getElementById('count-infra').textContent = '!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user