feat: add get_all_runner_status to WASM client and use it to show real runner status in dropdown

This commit is contained in:
Timur Gordon
2025-11-11 15:09:19 +01:00
parent 2ca593510c
commit 285199edac
7 changed files with 49 additions and 529 deletions

View File

@@ -417,171 +417,6 @@ button:disabled {
}
}
/* Header Islands */
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
padding: 1rem;
}
.header-island {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
padding: 0.75rem 1.25rem;
display: flex;
align-items: center;
gap: 1rem;
}
.breadcrumbs-island {
flex: 1;
justify-content: center;
}
.breadcrumb-link {
background: none;
border: none;
color: var(--accent);
cursor: pointer;
font-size: 0.875rem;
padding: 0;
text-decoration: none;
}
.breadcrumb-link:hover {
color: var(--accent-hover);
text-decoration: underline;
}
.breadcrumb-separator {
color: var(--text-muted);
font-size: 0.875rem;
margin: 0 0.5rem;
}
.breadcrumb-item {
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 500;
}
.user-info {
display: flex;
flex-direction: column;
gap: 0.125rem;
margin-right: 0.5rem;
}
.user-name {
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 600;
}
.user-scope {
color: var(--text-muted);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.server-info {
display: flex;
align-items: center;
gap: 0.75rem;
}
.server-label {
color: var(--text-muted);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
}
.server-url {
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 500;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text-muted);
}
.status-dot.connected {
background: var(--success);
box-shadow: 0 0 8px var(--success);
animation: pulse 2s infinite;
}
.status-dot.disconnected {
background: var(--error);
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
/* Add Runner Card */
.add-runner-card {
background: var(--bg-primary);
border: 1px dashed var(--border);
border-radius: 8px;
padding: 1rem;
margin-bottom: 1rem;
}
.add-runner-card h4 {
color: var(--text-secondary);
font-size: 0.875rem;
font-weight: 600;
margin-bottom: 0.75rem;
}
.form-group-inline {
display: flex;
gap: 0.5rem;
}
.form-group-inline input {
flex: 1;
padding: 0.5rem 0.75rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text-primary);
font-size: 0.875rem;
}
.form-group-inline input:focus {
outline: none;
border-color: var(--accent);
}
.form-group-inline button {
padding: 0.5rem 1rem;
min-width: 40px;
}
/* Update logout button for icon */
.logout-btn {
padding: 0.5rem 0.75rem;
font-size: 1.125rem;
min-width: 40px;
}
/* Toast Container - Bottom Island */
.toast-container {
position: fixed;
@@ -1333,241 +1168,4 @@ button:disabled {
.key-delete-btn:hover {
color: #ef4444;
}
/* Job Detail Layout */
.job-detail-content {
display: flex;
flex-direction: column;
gap: 1.5rem;
height: 100%;
}
.detail-top-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
flex: 1;
min-height: 0;
}
.detail-bottom-row {
display: flex;
flex-direction: column;
min-height: 200px;
max-height: 300px;
}
.detail-island {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.island-header {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
background: var(--bg-secondary);
}
.island-header h3 {
margin: 0;
color: var(--text-primary);
font-size: 1rem;
font-weight: 600;
}
.island-content {
flex: 1;
padding: 1.5rem;
overflow-y: auto;
background: var(--bg-secondary);
}
.code-block {
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1rem;
color: var(--text-primary);
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
font-size: 0.875rem;
line-height: 1.6;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
margin: 0;
}
/* Job Detail Sidebar */
.job-detail-sidebar {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.detail-section {
display: flex;
flex-direction: column;
gap: 1rem;
}
.detail-row {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border);
}
.detail-row:last-child {
border-bottom: none;
padding-bottom: 0;
}
.detail-label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.detail-value {
font-size: 0.9375rem;
color: var(--text-primary);
font-weight: 500;
}
.detail-actions {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-top: auto;
padding-top: 1rem;
border-top: 1px solid var(--border);
}
.btn-back {
background: transparent;
border: none;
color: var(--text-secondary);
font-size: 1.5rem;
cursor: pointer;
padding: 0.25rem;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s;
}
.btn-back:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
}
/* Status Display */
.status-display {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 2rem;
border-radius: 8px;
background: var(--bg-secondary);
border: 2px solid var(--border);
}
.status-display.running {
border-color: #f59e0b;
background: rgba(245, 158, 11, 0.05);
}
.status-display.completed {
border-color: #10b981;
background: rgba(16, 185, 129, 0.05);
}
.status-display.error {
border-color: #ef4444;
background: rgba(239, 68, 68, 0.05);
}
.status-display.idle {
border-color: var(--border);
background: var(--bg-secondary);
}
.status-text {
flex: 1;
text-align: center;
}
.status-text h4 {
margin: 0 0 0.5rem 0;
color: var(--text-primary);
font-size: 1.125rem;
font-weight: 600;
}
.status-text p {
margin: 0;
color: var(--text-secondary);
font-size: 0.9375rem;
line-height: 1.5;
}
/* Edit Form */
.edit-textarea {
width: 100%;
height: 100%;
min-height: 300px;
padding: 1rem;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-primary);
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
font-size: 0.875rem;
line-height: 1.6;
resize: none;
}
.edit-textarea:focus {
outline: none;
border-color: var(--accent);
}
.edit-form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.edit-form .form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.edit-form label {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary);
}
/* Responsive adjustments for job detail */
@media (max-width: 1200px) {
.detail-top-row {
grid-template-columns: 1fr;
}
.detail-bottom-row {
max-height: none;
}
}
}

View File

@@ -101,7 +101,6 @@
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
margin-bottom: 1.5rem;
}
.detail-bottom-row {

View File

@@ -46,8 +46,6 @@ body {
/* Header */
.app-header {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
padding: 0.75rem 1.5rem;
height: 60px;
display: flex;