Files
claude-code/dashboard/cmd/server/web/static/css/style.css
OpenCode Test ae958528a6 Add Claude integration to dashboard
Add comprehensive Claude Code monitoring and realtime streaming to the K8s dashboard.
Includes API endpoints for health, stats, summary, inventory, and live event streaming.
Frontend provides overview, usage, inventory, debug, and live feed views.
2026-01-03 10:54:48 -08:00

451 lines
7.9 KiB
CSS

:root {
--bg-primary: #1a1a2e;
--bg-secondary: #16213e;
--bg-card: #0f3460;
--text-primary: #eaeaea;
--text-secondary: #a0a0a0;
--accent: #e94560;
--success: #4ade80;
--warning: #fbbf24;
--danger: #ef4444;
--info: #60a5fa;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.6;
}
header {
background: var(--bg-secondary);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--bg-card);
}
header h1 {
font-size: 1.5rem;
font-weight: 600;
}
.cluster-health {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--bg-card);
border-radius: 20px;
}
.health-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--text-secondary);
}
.health-indicator.healthy { background: var(--success); }
.health-indicator.degraded { background: var(--warning); }
.health-indicator.critical { background: var(--danger); }
nav {
background: var(--bg-secondary);
padding: 0.5rem 2rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
border-bottom: 1px solid var(--bg-card);
}
.nav-btn {
background: transparent;
border: none;
color: var(--text-secondary);
padding: 0.75rem 1.5rem;
cursor: pointer;
border-radius: 8px;
font-size: 0.9rem;
transition: all 0.2s;
}
.nav-btn:hover {
background: var(--bg-card);
color: var(--text-primary);
}
.nav-btn.active {
background: var(--accent);
color: white;
}
.badge {
background: var(--danger);
color: white;
font-size: 0.75rem;
padding: 0.1rem 0.5rem;
border-radius: 10px;
margin-left: 0.25rem;
}
main {
padding: 2rem;
max-width: 1400px;
margin: 0 auto;
}
.view {
display: none;
}
.view.active {
display: block;
}
.card {
background: var(--bg-card);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.card h2 {
font-size: 1.1rem;
margin-bottom: 1rem;
color: var(--text-primary);
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
text-align: left;
padding: 0.75rem;
border-bottom: 1px solid var(--bg-secondary);
}
th {
color: var(--text-secondary);
font-weight: 500;
font-size: 0.85rem;
text-transform: uppercase;
}
td {
font-size: 0.9rem;
}
.status-badge {
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 500;
}
.status-ready, .status-healthy, .status-synced, .status-success {
background: rgba(74, 222, 128, 0.2);
color: var(--success);
}
.status-notready, .status-degraded, .status-outofsync, .status-failed {
background: rgba(239, 68, 68, 0.2);
color: var(--danger);
}
.status-progressing, .status-pending {
background: rgba(251, 191, 36, 0.2);
color: var(--warning);
}
.status-rejected {
background: rgba(239, 68, 68, 0.2);
color: var(--danger);
}
.status-approved {
background: rgba(74, 222, 128, 0.2);
color: var(--success);
}
/* Claude dashboard extra badges */
.status-ok {
background: rgba(74, 222, 128, 0.2);
color: var(--success);
}
.status-missing {
background: rgba(239, 68, 68, 0.2);
color: var(--danger);
}
.simple-list {
margin-left: 1.25rem;
}
.simple-list li {
margin: 0.25rem 0;
}
.inventory-section + .inventory-section {
margin-top: 1.25rem;
}
.metric {
font-size: 2rem;
font-weight: 700;
margin-top: 0.25rem;
}
/* Grid helper for Claude overview (keeps markup minimal) */
.grid {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
/* In some contexts we want a grid inside a card; remove card bottom margin in that case */
.grid .card {
margin-bottom: 0;
}
.alerts-list, .pending-list, .workflows-list {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.alert-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.75rem;
background: var(--bg-secondary);
border-radius: 8px;
border-left: 3px solid var(--danger);
}
.alert-item.warning {
border-left-color: var(--warning);
}
.pending-item {
background: var(--bg-secondary);
border-radius: 8px;
padding: 1rem;
border-left: 3px solid var(--warning);
}
.pending-item .header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.5rem;
}
.pending-item .agent {
font-size: 0.8rem;
color: var(--text-secondary);
}
.pending-item .action {
font-weight: 600;
}
.pending-item .description {
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 1rem;
}
.pending-item .buttons {
display: flex;
gap: 0.5rem;
}
.btn {
padding: 0.5rem 1rem;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 0.85rem;
font-weight: 500;
transition: all 0.2s;
}
.btn-approve {
background: var(--success);
color: var(--bg-primary);
}
.btn-reject {
background: var(--danger);
color: white;
}
.btn-run {
background: var(--info);
color: var(--bg-primary);
}
.btn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.workflow-item {
background: var(--bg-secondary);
border-radius: 8px;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.workflow-item .info h3 {
font-size: 1rem;
margin-bottom: 0.25rem;
}
.workflow-item .info p {
color: var(--text-secondary);
font-size: 0.85rem;
}
.workflow-item .triggers {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
}
.trigger-tag {
background: var(--bg-card);
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
color: var(--text-secondary);
}
.empty-state {
color: var(--text-secondary);
text-align: center;
padding: 2rem;
font-style: italic;
}
footer {
text-align: center;
padding: 1rem;
color: var(--text-secondary);
font-size: 0.85rem;
border-top: 1px solid var(--bg-card);
}
/* Progress bar for resource usage */
.progress-bar {
width: 100px;
height: 8px;
background: var(--bg-secondary);
border-radius: 4px;
overflow: hidden;
}
.progress-bar .fill {
height: 100%;
background: var(--success);
transition: width 0.3s;
}
.progress-bar .fill.warning { background: var(--warning); }
.progress-bar .fill.danger { background: var(--danger); }
/* Live feed styles */
.live-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.conn-badge {
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 500;
}
.conn-badge-connected {
background: rgba(74, 222, 128, 0.2);
color: var(--success);
}
.conn-badge-error {
background: rgba(239, 68, 68, 0.2);
color: var(--danger);
}
.conn-badge-yellow {
background: rgba(251, 191, 36, 0.2);
color: var(--warning);
}
.raw-json {
background: var(--bg-secondary);
padding: 0.5rem;
border-radius: 4px;
font-size: 0.8rem;
overflow-x: auto;
margin-top: 0.5rem;
}
.btn-sm {
padding: 0.25rem 0.5rem;
border: 1px solid var(--bg-secondary);
background: transparent;
color: var(--text-primary);
border-radius: 4px;
cursor: pointer;
font-size: 0.75rem;
}
.btn-sm:hover {
background: var(--bg-secondary);
}
/* Responsive */
@media (max-width: 768px) {
header {
flex-direction: column;
gap: 1rem;
text-align: center;
}
nav {
flex-wrap: wrap;
justify-content: center;
}
main {
padding: 1rem;
}
table {
font-size: 0.85rem;
}
th, td {
padding: 0.5rem;
}
}