diff --git a/styles/style.css b/styles/style.css new file mode 100644 index 0000000..c3cf814 --- /dev/null +++ b/styles/style.css @@ -0,0 +1,306 @@ +/* Storage Saturation Report Component Styles - Neptune theme aware (Advanced Status Details style) */ + +/* Neptune CSS variables with fallbacks for when theme is not active (hsl() required for Neptune vars) */ +.saturationreport-page { + margin-top: 20px; +} + +/* All report actions in one row, aligned right (matches XI report pattern) */ +.report-options.form-inline { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: 8px; +} + +.report-options .reportexportlinks { + display: inline-flex; + align-items: center; + flex-wrap: wrap; + gap: 4px; +} + +.report-options .reportexportlinks .btn, +.report-options .reportexportlinks a.btn, +.report-options .btn { + margin-left: 0; +} + +.report-options .btn + .btn { + margin-left: 0; +} + +/* Drawer (options modal) on its own row when present */ +.report-options .neptune-drawer-options { + flex-basis: 100%; +} + +#saturationreport-container { + margin-top: 20px; + clear: both; +} + +.report-header { + margin-bottom: 20px; + border-bottom: 2px solid hsl(var(--border, 210 14% 89%)); + padding-bottom: 15px; +} + +.report-header h1 { + margin: 0 0 10px 0; + font-size: 24px; + font-weight: bold; + color: hsl(var(--foreground, 210 14% 18%)); +} + +.report-header .subtitle { + font-size: 14px; + color: hsl(var(--muted-foreground, 210 10% 50%)); + margin: 5px 0; +} + +.report-header .report-date { + font-size: 12px; + color: hsl(var(--muted-foreground, 210 10% 58%)); + margin: 5px 0; +} + +#saturationreport-table { + width: 100%; + background-color: hsl(var(--card, 0 0% 100%)); +} + +#saturationreport-table thead th { + background-color: hsl(var(--muted, 210 14% 18%)); + color: hsl(var(--muted-foreground, 210 14% 94%)); + font-weight: bold; + text-align: left; + padding: 10px; + border-bottom: 2px solid hsl(var(--border, 210 14% 23%)); + text-transform: uppercase; + font-size: 12px; + letter-spacing: 0.5px; +} + +/* Numeric columns right-aligned to match Nagios XI report examples (e.g. Availability Summary) */ +#saturationreport-table thead th.text-right, +#saturationreport-table tbody td.text-right { + text-align: right; +} + +#saturationreport-table thead th:hover { + background-color: hsl(var(--border, 210 14% 23%)); +} + +#saturationreport-table tbody td { + padding: 10px; + vertical-align: middle; + border-bottom: 1px solid hsl(var(--border, 210 14% 94%)); + color: hsl(var(--foreground, 210 14% 18%)); +} + +#saturationreport-table tbody tr:hover { + background-color: hsl(var(--muted, 210 14% 98%)); +} + +#saturationreport-table tbody tr:last-child td { + border-bottom: none; +} + +/* Progress Bar Styles */ +#saturationreport-container .progress { + height: 25px; + margin-bottom: 0; + background-color: hsl(var(--muted, 210 14% 94%)); + border-radius: var(--radius, 4px); + overflow: hidden; + position: relative; +} + +#saturationreport-container .progress-bar { + float: left; + width: 0%; + height: 100%; + font-size: 12px; + line-height: 25px; + text-align: center; + transition: width 0.6s ease; + font-weight: bold; + padding: 0 5px; + box-sizing: border-box; + position: relative; + z-index: 1; +} + +#saturationreport-container .progress-bar-success { + background-color: hsl(var(--success, 142 71% 45%)); + color: hsl(var(--primary-foreground, 0 0% 100%)); +} + +#saturationreport-container .progress-bar-info { + background-color: hsl(var(--warning, 38 92% 50%)); + color: hsl(var(--foreground, 210 14% 18%)); + text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); +} + +#saturationreport-container .progress-bar-warning { + background-color: hsl(var(--warning, 25 95% 53%)); + color: hsl(var(--primary-foreground, 0 0% 100%)); +} + +#saturationreport-container .progress-bar-danger { + background-color: hsl(var(--destructive, 0 84% 60%)); + color: hsl(var(--destructive-foreground, 0 0% 100%)); +} + +/* Color coding for available space */ +#saturationreport-container .text-danger { + color: hsl(var(--destructive, 0 84% 60%)); + font-weight: bold; +} + +#saturationreport-container .text-warning { + color: hsl(var(--warning, 38 92% 50%)); + font-weight: bold; +} + +#saturationreport-container .text-muted { + color: hsl(var(--muted-foreground, 210 10% 58%)); +} + +/* Ensure table doesn't overlap with page controls */ +.container-fluid { + padding-left: 15px; + padding-right: 15px; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + #saturationreport-table { + font-size: 12px; + } + + #saturationreport-table thead th, + #saturationreport-table tbody td { + padding: 8px 5px; + } + + .progress-bar { + font-size: 10px; + padding: 0 3px; + } + + .report-header h1 { + font-size: 20px; + } +} + +/* Print styles for PDF export */ +@media print { + /* Hide navigation and non-essential elements */ + .navbar, + .sidebar, + .footer, + .btn, + #export-pdf-btn, + #export-image-btn, + .report-header .col-md-4 { + display: none !important; + } + + /* Ensure full width for print */ + body { + margin: 0; + padding: 0; + } + + .container-fluid { + width: 100%; + margin: 0; + padding: 0; + } + + /* Report header styling for print */ + .report-header { + margin-bottom: 15px; + padding-bottom: 10px; + border-bottom: 2px solid #000; + page-break-after: avoid; + } + + .report-header h1 { + font-size: 20px; + margin: 0 0 5px 0; + } + + .report-header .subtitle { + font-size: 12px; + margin: 2px 0; + } + + .report-header .report-date { + font-size: 11px; + margin: 2px 0; + } + + /* Table styling for print */ + #saturationreport-table { + width: 100%; + border-collapse: collapse; + page-break-inside: auto; + } + + #saturationreport-table thead { + display: table-header-group; + } + + #saturationreport-table thead th { + background-color: #2c3e50 !important; + color: #fff !important; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + padding: 8px; + border: 1px solid #000; + } + + #saturationreport-table tbody tr { + page-break-inside: avoid; + page-break-after: auto; + } + + #saturationreport-table tbody td { + padding: 6px; + border: 1px solid #ccc; + } + + /* Progress bar for print */ + .progress { + height: 20px; + border: 1px solid #ccc; + } + + .progress-bar { + height: 100%; + line-height: 20px; + font-size: 11px; + } + + /* Ensure colors print */ + .text-danger { + color: #d9534f !important; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + + .text-warning { + color: #f0ad4e !important; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + + /* Avoid page breaks in table rows */ + #saturationreport-table tbody tr { + page-break-inside: avoid; + } +}