feat: Network Status Dashboard frontend

- Host cards grid with live status (green/red/yellow badges), latency, expandable details
- Service table with category, URL/port, status, latency
- Local services tab (from ss -tlnp)
- Auto-refresh every 30s with visual countdown bar
- Manual refresh button with rotate animation
- Summary bar (online/degraded/offline/total counts)
- Mobile-responsive: single-column cards, scrollable tables
- Tab-based navigation between Hosts / Services / Local Services
This commit is contained in:
2026-06-01 23:50:38 -04:00
parent 54af25d2da
commit ca1cb63f65
2 changed files with 545 additions and 3 deletions
+270
View File
@@ -32,6 +32,276 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; b
.content { margin-left: 0; padding: 12px; }
}
/* ── Agent Chat ──────────────────────────────────────────────────── */
#chat-app {
display: flex;
flex-direction: column;
height: calc(100vh - 100px);
min-height: 400px;
}
.chat-header {
flex-shrink: 0;
padding: 0 0 12px;
border-bottom: 1px solid var(--border);
margin-bottom: 0;
}
.chat-profile-strip {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.chat-profiles-label {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
white-space: nowrap;
}
.chat-profile-tabs {
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.chat-profile-tab {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 12px;
border: 1px solid var(--border);
border-radius: 16px;
background: transparent;
color: var(--text-muted);
font-size: 12px;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}
.chat-profile-tab:hover {
border-color: var(--accent);
color: var(--text);
}
.chat-profile-tab.active {
background: rgba(0, 212, 255, 0.1);
border-color: var(--accent);
color: var(--accent);
}
.chat-profile-tab .status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.chat-profile-tab .status-dot.online {
background: var(--success);
box-shadow: 0 0 6px rgba(63, 185, 80, 0.5);
}
.chat-profile-tab .status-dot.offline {
background: var(--text-muted);
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 16px 0;
display: flex;
flex-direction: column;
gap: 8px;
scroll-behavior: smooth;
}
.chat-welcome {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
flex: 1;
color: var(--text-muted);
gap: 8px;
}
.chat-welcome-icon {
font-size: 48px;
opacity: 0.5;
}
.chat-welcome h3 {
font-size: 18px;
color: var(--text);
margin: 0;
}
.chat-welcome p {
font-size: 13px;
max-width: 360px;
line-height: 1.5;
margin: 0;
}
.chat-message {
display: flex;
flex-direction: column;
max-width: 80%;
animation: msg-in 0.2s ease;
}
@keyframes msg-in {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.chat-message.user {
align-self: flex-end;
}
.chat-message.agent {
align-self: flex-start;
}
.chat-message .bubble {
padding: 10px 14px;
border-radius: 14px;
line-height: 1.5;
font-size: 13px;
word-wrap: break-word;
white-space: pre-wrap;
}
.chat-message.user .bubble {
background: var(--accent);
color: #000;
border-bottom-right-radius: 4px;
}
.chat-message.agent .bubble {
background: var(--surface);
border: 1px solid var(--border);
border-bottom-left-radius: 4px;
color: var(--text);
}
.chat-message .msg-meta {
display: flex;
align-items: center;
gap: 6px;
font-size: 10px;
color: var(--text-muted);
padding: 2px 4px 0;
}
.chat-message.user .msg-meta {
justify-content: flex-end;
}
.chat-message .msg-profile-icon {
font-size: 11px;
}
.chat-typing {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 4px;
padding: 8px 4px;
font-size: 12px;
color: var(--text-muted);
}
.typing-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--text-muted);
animation: typing-bounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-6px); }
}
.typing-label {
margin-left: 6px;
font-style: italic;
}
.chat-input-area {
flex-shrink: 0;
display: flex;
gap: 8px;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.chat-input-area textarea {
flex: 1;
padding: 10px 14px;
border: 1px solid var(--border);
border-radius: 20px;
background: var(--surface);
color: var(--text);
font-size: 13px;
font-family: inherit;
outline: none;
resize: none;
line-height: 1.4;
min-height: 40px;
max-height: 120px;
transition: border-color 0.15s;
}
.chat-input-area textarea:focus {
border-color: var(--accent);
}
.chat-input-area textarea::placeholder {
color: var(--text-muted);
}
.chat-input-area .btn {
border-radius: 20px;
padding: 8px 20px;
flex-shrink: 0;
align-self: flex-end;
}
.chat-error {
color: var(--danger);
font-size: 12px;
padding: 4px 0;
text-align: center;
}
/* Mobile */
@media (max-width: 768px) {
#chat-app {
height: calc(100vh - 180px);
}
.chat-message {
max-width: 90%;
}
.chat-message .bubble {
font-size: 14px;
}
.chat-profile-tab {
font-size: 11px;
padding: 4px 10px;
}
}
/* ── Config Panel ───────────────────────────────────────────────── */
.config-panel { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.config-panel h2 { margin: 0; font-size: 16px; }