Files
Art-gallery/client/src/pages/AuditPage.css
T
Danila KhodjaefandCursor dc0ac81081 Add admin Activity page for curator audit reports.
Admins can filter and review curator_audit_log (date/time, actor, action, resource, details) via /api/audit against the environment DB.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 22:20:09 +03:00

311 lines
5.2 KiB
CSS

.audit-page {
padding: 1rem 1.5rem 2rem;
max-width: 1500px;
margin: 0 auto;
color: #f5f0e8;
}
.audit-header {
display: flex;
align-items: flex-start;
gap: 1rem;
margin-bottom: 1rem;
}
.audit-header-text h1 {
margin: 0;
font-size: 1.6rem;
}
.audit-env {
margin: 0.25rem 0 0;
color: rgba(245, 240, 232, 0.72);
font-size: 0.9rem;
}
.audit-back {
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.3);
color: inherit;
padding: 0.35rem 0.75rem;
border-radius: 6px;
cursor: pointer;
}
.audit-error {
color: #f5a5a5;
}
.audit-stats {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.75rem;
margin-bottom: 1rem;
}
.audit-stat {
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
padding: 0.75rem 0.9rem;
background: rgba(255, 255, 255, 0.03);
}
.audit-stat-label {
display: block;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.04em;
color: rgba(245, 240, 232, 0.65);
margin-bottom: 0.35rem;
}
.audit-stat-value {
font-size: 1.45rem;
font-weight: 600;
}
.audit-stat-value-sm {
font-size: 0.95rem;
font-weight: 500;
}
.audit-filters {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 0.65rem 0.75rem;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
padding: 0.9rem;
margin-bottom: 1rem;
background: rgba(255, 255, 255, 0.03);
}
.audit-filters label {
display: flex;
flex-direction: column;
gap: 0.25rem;
font-size: 0.85rem;
}
.audit-filters input,
.audit-filters select,
.audit-filter-actions button,
.audit-pager button,
.audit-chip {
font: inherit;
color: inherit;
}
.audit-filters input,
.audit-filters select {
background: rgba(0, 0, 0, 0.25);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 6px;
padding: 0.4rem 0.55rem;
}
.audit-filter-search {
grid-column: span 2;
}
.audit-filter-actions {
display: flex;
align-items: flex-end;
gap: 0.5rem;
}
.audit-filter-actions button,
.audit-pager button {
background: rgba(201, 169, 110, 0.2);
border: 1px solid rgba(201, 169, 110, 0.45);
border-radius: 6px;
padding: 0.45rem 0.85rem;
cursor: pointer;
}
.audit-filter-actions button:disabled,
.audit-pager button:disabled {
opacity: 0.45;
cursor: default;
}
.audit-secondary {
background: transparent !important;
border-color: rgba(255, 255, 255, 0.28) !important;
}
.audit-breakdowns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1rem;
}
.audit-breakdown {
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
padding: 0.75rem 0.9rem;
}
.audit-breakdown h2 {
margin: 0 0 0.55rem;
font-size: 0.95rem;
}
.audit-breakdown ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.audit-chip {
display: inline-flex;
align-items: center;
gap: 0.55rem;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 999px;
padding: 0.28rem 0.65rem;
cursor: pointer;
font-size: 0.82rem;
}
.audit-chip span {
color: rgba(201, 169, 110, 0.95);
}
.audit-table-wrap {
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
padding: 0.75rem;
overflow: auto;
}
.audit-table-meta {
display: flex;
justify-content: space-between;
gap: 1rem;
margin-bottom: 0.55rem;
font-size: 0.85rem;
color: rgba(245, 240, 232, 0.7);
}
.audit-table {
width: 100%;
border-collapse: collapse;
font-size: 0.88rem;
}
.audit-table th,
.audit-table td {
padding: 0.5rem 0.55rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
text-align: left;
vertical-align: top;
}
.audit-table th {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.04em;
color: rgba(245, 240, 232, 0.65);
}
.audit-table tbody tr {
cursor: pointer;
}
.audit-table tbody tr:hover {
background: rgba(255, 255, 255, 0.04);
}
.audit-row-open {
background: rgba(201, 169, 110, 0.08);
}
.audit-when {
white-space: nowrap;
}
.audit-user {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.audit-role {
font-size: 0.75rem;
color: rgba(245, 240, 232, 0.55);
}
.audit-resource {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.audit-resource-label {
color: rgba(201, 169, 110, 0.95);
font-size: 0.82rem;
}
.audit-details-cell {
max-width: 280px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: rgba(245, 240, 232, 0.7);
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 0.78rem;
}
.audit-details-row td {
background: rgba(0, 0, 0, 0.25);
}
.audit-details-row pre {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
font-size: 0.8rem;
color: rgba(245, 240, 232, 0.88);
}
.audit-empty {
color: rgba(245, 240, 232, 0.65);
}
.audit-pager {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 0.75rem;
}
@media (max-width: 980px) {
.audit-stats,
.audit-filters,
.audit-breakdowns {
grid-template-columns: 1fr 1fr;
}
.audit-filter-search {
grid-column: span 2;
}
}
@media (max-width: 640px) {
.audit-stats,
.audit-filters,
.audit-breakdowns {
grid-template-columns: 1fr;
}
.audit-filter-search {
grid-column: span 1;
}
}