Implementing more advanced feature: audit and more

This commit is contained in:
Martino Ferrari
2026-06-19 14:17:46 +02:00
parent 8f6dbcba49
commit 901b87d407
31 changed files with 1669 additions and 569 deletions
+183 -81
View File
@@ -123,6 +123,8 @@ body {
color: #94a3b8;
border: 1px solid #334155;
text-transform: capitalize;
white-space: nowrap;
flex-shrink: 0;
}
.status-chip.connected {
@@ -165,18 +167,6 @@ body {
}
/* ── User identity chip ──────────────────────────────────────────────────── */
.user-chip {
display: flex;
align-items: center;
font-size: 0.75rem;
padding: 0.2rem 0.6rem;
border-radius: 9999px;
background: #1e293b;
color: #cbd5e1;
border: 1px solid #334155;
white-space: nowrap;
}
/* ── Access denied screen ────────────────────────────────────────────────── */
.access-denied {
display: flex;
@@ -2746,90 +2736,50 @@ kbd {
color: #e2e8f0;
}
/* ── Contextual Help ─────────────────────────────────────────────────────── */
/* ── Manual: Quick Tips list ─────────────────────────────────────────────── */
.ctx-help {
position: relative;
display: flex;
align-items: center;
}
.ctx-help-btn {
width: 22px;
height: 22px;
border-radius: 50%;
border: 1.5px solid #4a5568;
background: #1a2236;
color: #94a3b8;
font-size: 0.78rem;
font-weight: 700;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: border-color 0.15s, color 0.15s;
flex-shrink: 0;
line-height: 1;
.help-tips-list {
list-style: none;
margin: 0 0 1rem;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.ctx-help-btn:hover { border-color: #4a9eff; color: #4a9eff; }
.ctx-help-popover {
position: absolute;
top: calc(100% + 8px);
right: 0;
z-index: 400;
.help-tip-item {
display: flex;
align-items: center;
gap: 0.6rem;
width: 100%;
text-align: left;
background: #1a1f2e;
border: 1px solid #2d3748;
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
width: 280px;
padding: 0.75rem;
}
.ctx-help-tip {
display: flex;
gap: 0.5rem;
font-size: 0.82rem;
border-radius: 6px;
padding: 0.55rem 0.7rem;
color: #cbd5e1;
line-height: 1.5;
margin-bottom: 0.6rem;
font-size: 0.85rem;
line-height: 1.45;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
}
.help-tip-item:hover {
border-color: #4a9eff;
background: #1e2540;
}
.ctx-help-icon {
font-size: 1rem;
.help-tip-icon {
flex-shrink: 0;
margin-top: 0.05rem;
font-size: 1rem;
}
.ctx-help-footer {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #2d3748;
padding-top: 0.5rem;
gap: 0.5rem;
}
.help-tip-text { flex: 1; }
.ctx-help-nav {
font-size: 0.75rem;
color: #64748b;
background: none;
border: none;
cursor: pointer;
padding: 0;
}
.ctx-help-nav:hover { color: #94a3b8; }
.ctx-help-link {
font-size: 0.75rem;
.help-tip-go {
flex-shrink: 0;
color: #4a9eff;
background: none;
border: none;
cursor: pointer;
padding: 0;
font-weight: 700;
}
.ctx-help-link:hover { text-decoration: underline; }
/* ── Historical time-nav bar (below main toolbar, hidden by default) ──────── */
@@ -3446,6 +3396,37 @@ kbd {
overflow: hidden;
}
.cl-confirm-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.55);
display: flex;
align-items: center;
justify-content: center;
z-index: 650;
}
.cl-confirm {
background: #1a1f2e;
border: 1px solid #2d3748;
border-radius: 10px;
padding: 1.25rem 1.5rem;
width: min(440px, 92vw);
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.cl-confirm-title {
font-weight: 600;
margin-bottom: 0.5rem;
}
.cl-confirm-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 1.25rem;
}
.cl-header {
display: flex;
align-items: center;
@@ -3455,6 +3436,127 @@ kbd {
flex-shrink: 0;
}
/* ── Audit log viewer ──────────────────────────────────────────────────── */
.audit-modal {
width: min(1300px, 98vw);
}
.audit-filters {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0.6rem 1.25rem;
border-bottom: 1px solid #2d3748;
flex-shrink: 0;
}
.audit-filter {
background: #0f1420;
border: 1px solid #2d3748;
border-radius: 5px;
color: #e2e8f0;
padding: 0.3rem 0.5rem;
font-size: 0.8rem;
}
.audit-filter-label {
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
color: #94a3b8;
}
.audit-body {
flex: 1;
overflow: auto;
padding: 0 0 0.5rem;
}
.audit-empty {
padding: 1.5rem 1.25rem;
}
.audit-table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
}
.audit-table th,
.audit-table td {
text-align: left;
padding: 0.35rem 0.6rem;
border-bottom: 1px solid #232b3a;
white-space: nowrap;
}
.audit-table th {
position: sticky;
top: 0;
background: #161c2a;
color: #94a3b8;
font-weight: 600;
z-index: 1;
}
.audit-table tbody tr:hover {
background: #1d2433;
}
.audit-row-error td {
background: rgba(220, 38, 38, 0.08);
}
.audit-time {
color: #94a3b8;
font-variant-numeric: tabular-nums;
}
.audit-signal,
.audit-detail {
max-width: 18rem;
overflow: hidden;
text-overflow: ellipsis;
}
.audit-value {
max-width: 10rem;
overflow: hidden;
text-overflow: ellipsis;
font-family: ui-monospace, monospace;
}
.audit-actor-tag {
display: inline-block;
font-size: 0.65rem;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.05rem 0.35rem;
border-radius: 3px;
vertical-align: middle;
}
.audit-actor-user {
background: #1e3a5f;
color: #93c5fd;
}
.audit-actor-system {
background: #4a2d6b;
color: #d8b4fe;
}
.audit-result-ok {
color: #4ade80;
}
.audit-result-err {
color: #f87171;
font-weight: 600;
}
.cl-title {
font-size: 1rem;
font-weight: 700;