Start repository

This commit is contained in:
tips-of-mine
2025-05-31 10:03:48 +02:00
commit 194322c9fc
57 changed files with 14723 additions and 0 deletions

502
src/css/cve.css Normal file
View File

@@ -0,0 +1,502 @@
/**
* GLPI CVE Plugin - Main CSS
* This file contains styles specific to the CVE plugin
*/
/* General Layout */
.cve-container {
margin: 0;
padding: 15px;
background-color: #f5f5f5;
}
.cve-card {
background: #fff;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
margin-bottom: 20px;
overflow: hidden;
}
.cve-card-header {
border-bottom: 1px solid #e5e5e5;
padding: 15px;
font-weight: bold;
background-color: #f9f9f9;
}
.cve-card-body {
padding: 15px;
}
/* Dashboard Components */
.cve-stats-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.cve-stat-card {
position: relative;
padding: 15px;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
background-color: #fff;
}
.cve-stat-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 50%;
margin-right: 15px;
}
.cve-stat-content {
display: inline-block;
vertical-align: top;
}
.cve-stat-label {
font-size: 14px;
color: #666;
margin-bottom: 5px;
}
.cve-stat-value {
font-size: 24px;
font-weight: bold;
margin-top: 0;
margin-bottom: 10px;
}
.cve-progress-bar {
height: 8px;
background-color: #e9ecef;
border-radius: 4px;
overflow: hidden;
margin-top: 10px;
}
.cve-progress-bar-fill {
height: 100%;
border-radius: 4px;
}
/* Severity colors */
.cve-critical {
background-color: #ffebee;
}
.cve-critical .cve-stat-icon {
background-color: #ffcdd2;
color: #c62828;
}
.cve-critical .cve-progress-bar-fill {
background-color: #f44336;
}
.cve-high {
background-color: #fff3e0;
}
.cve-high .cve-stat-icon {
background-color: #ffe0b2;
color: #ef6c00;
}
.cve-high .cve-progress-bar-fill {
background-color: #ff9800;
}
.cve-pending {
background-color: #e3f2fd;
}
.cve-pending .cve-stat-icon {
background-color: #bbdefb;
color: #1565c0;
}
.cve-pending .cve-progress-bar-fill {
background-color: #2196f3;
}
.cve-resolved {
background-color: #e8f5e9;
}
.cve-resolved .cve-stat-icon {
background-color: #c8e6c9;
color: #2e7d32;
}
.cve-resolved .cve-progress-bar-fill {
background-color: #4caf50;
}
/* Tables */
.cve-table {
width: 100%;
border-collapse: collapse;
}
.cve-table th {
background-color: #f5f5f5;
text-align: left;
padding: 10px;
font-weight: bold;
border-bottom: 2px solid #ddd;
}
.cve-table td {
padding: 10px;
border-bottom: 1px solid #ddd;
}
.cve-table tr:hover {
background-color: #f9f9f9;
}
.cve-sortable {
cursor: pointer;
position: relative;
}
.cve-sortable:after {
content: '⇕';
margin-left: 5px;
color: #999;
font-size: 12px;
}
.cve-sortable.sort-asc:after {
content: '↑';
color: #333;
}
.cve-sortable.sort-desc:after {
content: '↓';
color: #333;
}
/* Badges */
.badge {
display: inline-block;
padding: 3px 7px;
font-size: 12px;
font-weight: bold;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: middle;
border-radius: 10px;
}
.badge-danger {
background-color: #ffcdd2;
color: #c62828;
}
.badge-warning {
background-color: #ffe0b2;
color: #ef6c00;
}
.badge-info {
background-color: #bbdefb;
color: #1565c0;
}
.badge-primary {
background-color: #c5cae9;
color: #283593;
}
.badge-success {
background-color: #c8e6c9;
color: #2e7d32;
}
.badge-purple {
background-color: #e1bee7;
color: #6a1b9a;
}
.badge-inactive {
background-color: #e0e0e0;
color: #616161;
}
.badge-pending {
background-color: #fffde7;
color: #f57f17;
}
/* Filters */
.cve-filters {
display: flex;
flex-wrap: wrap;
gap: 15px;
margin-bottom: 20px;
}
.cve-filter-group {
position: relative;
flex: 1;
min-width: 200px;
}
.cve-filter-icon {
position: absolute;
left: 10px;
top: 10px;
color: #757575;
}
.cve-filter-input,
.cve-filter-select {
width: 100%;
padding: 8px 8px 8px 35px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
}
/* Buttons */
.cve-btn-container {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
.btn {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: 6px 12px;
font-size: 14px;
line-height: 1.5;
border-radius: 4px;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
cursor: pointer;
}
.btn:focus, .btn:hover {
text-decoration: none;
}
.btn-primary {
color: #fff;
background-color: #2196f3;
border-color: #2196f3;
}
.btn-primary:hover {
background-color: #0d8bf2;
border-color: #0c83e9;
}
.btn-success {
color: #fff;
background-color: #4caf50;
border-color: #4caf50;
}
.btn-success:hover {
background-color: #43a047;
border-color: #3d9142;
}
.btn-danger {
color: #fff;
background-color: #f44336;
border-color: #f44336;
}
.btn-danger:hover {
background-color: #e53935;
border-color: #d32f2f;
}
.btn-purple {
color: #fff;
background-color: #9c27b0;
border-color: #9c27b0;
}
.btn-purple:hover {
background-color: #8e24aa;
border-color: #7b1fa2;
}
.btn-secondary {
color: #fff;
background-color: #757575;
border-color: #757575;
}
.btn-secondary:hover {
background-color: #616161;
border-color: #616161;
}
.btn-sm {
padding: 4px 8px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
/* Forms */
.cve-form-section {
background-color: #fff;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
padding: 20px;
margin-bottom: 20px;
}
.cve-form-title {
font-size: 18px;
margin-bottom: 15px;
font-weight: bold;
}
.cve-form-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.cve-form-group {
margin-bottom: 15px;
}
.cve-form-label {
display: block;
margin-bottom: 5px;
font-weight: 500;
font-size: 14px;
}
.cve-form-input,
.cve-form-select {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
}
.cve-form-checkbox {
margin-right: 8px;
}
.cve-form-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 20px;
}
/* Navigation */
.cve-nav {
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
}
.cve-nav-item {
display: inline-block;
padding: 10px 15px;
margin-right: 5px;
margin-bottom: -1px;
cursor: pointer;
border: 1px solid transparent;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.cve-nav-item:hover {
background-color: #f5f5f5;
}
.cve-nav-item.active {
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: #fff;
font-weight: bold;
}
.cve-nav-icon {
margin-right: 5px;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.cve-stats-container {
grid-template-columns: 1fr;
}
.cve-filters {
flex-direction: column;
}
.cve-table {
display: block;
overflow-x: auto;
white-space: nowrap;
}
.cve-form-grid {
grid-template-columns: 1fr;
}
}
/* Chart styles */
.cve-chart-container {
height: 300px;
display: flex;
align-items: flex-end;
justify-content: space-around;
padding: 20px;
}
.cve-chart-bar {
width: 60px;
border-radius: 4px 4px 0 0;
display: flex;
flex-direction: column;
align-items: center;
transition: height 0.3s ease;
}
.cve-chart-label {
margin-top: 8px;
font-size: 12px;
text-align: center;
font-weight: bold;
}
.cve-chart-value {
margin-top: 4px;
font-size: 14px;
font-weight: 500;
}
.cve-chart-critical {
background-color: #f44336;
}
.cve-chart-high {
background-color: #ff9800;
}
.cve-chart-medium {
background-color: #ffeb3b;
}
.cve-chart-low {
background-color: #2196f3;
}