Fix: modal initialization to prevent empty modal on page load

This commit is contained in:
2025-09-26 09:16:24 -03:00
parent 3511e1cd41
commit 6c01527b5e
2 changed files with 9 additions and 5 deletions

View File

@@ -506,11 +506,15 @@
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
z-index: 1000; z-index: 1000;
display: flex; display: none;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.modal.show {
display: flex;
}
.modal-content { .modal-content {
background: white; background: white;
border-radius: 8px; border-radius: 8px;
@@ -774,7 +778,7 @@
<div class="success hidden" id="success"></div> <div class="success hidden" id="success"></div>
<!-- Historical Analysis Modal --> <!-- Historical Analysis Modal -->
<div class="modal hidden" id="historicalModal"> <div class="modal hidden" id="historicalModal" style="display: none;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h2 id="historicalModalTitle">Historical Analysis</h2> <h2 id="historicalModalTitle">Historical Analysis</h2>
@@ -1453,11 +1457,11 @@
function showHistoricalModal(namespace) { function showHistoricalModal(namespace) {
document.getElementById('historicalModalTitle').textContent = `Historical Analysis - ${namespace}`; document.getElementById('historicalModalTitle').textContent = `Historical Analysis - ${namespace}`;
document.getElementById('historicalModal').classList.remove('hidden'); document.getElementById('historicalModal').classList.add('show');
} }
function closeHistoricalModal() { function closeHistoricalModal() {
document.getElementById('historicalModal').classList.add('hidden'); document.getElementById('historicalModal').classList.remove('show');
} }
// Close modal when clicking outside // Close modal when clicking outside

View File

@@ -10,7 +10,7 @@ metadata:
haproxy.router.openshift.io/timeout: "300s" haproxy.router.openshift.io/timeout: "300s"
haproxy.router.openshift.io/rate-limit: "100" haproxy.router.openshift.io/rate-limit: "100"
spec: spec:
host: resource-governance.apps.openshift.local host: resource-governance.apps.shrocp4upi418ovn.lab.upshift.rdu2.redhat.com
to: to:
kind: Service kind: Service
name: resource-governance-service name: resource-governance-service