mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-07-09 06:23:36 +08:00
feat(docker): 完善龙虾军团任务调度与提示
This commit is contained in:
@@ -605,105 +605,6 @@
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* 隧道路由卡片 */
|
||||
.tunnel-routes {
|
||||
display: grid;
|
||||
gap: var(--space-md);
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
.tunnel-route-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-lg);
|
||||
transition: all var(--transition-fast);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tunnel-route-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
background: var(--accent);
|
||||
opacity: 0;
|
||||
transition: opacity var(--transition-fast);
|
||||
}
|
||||
|
||||
.tunnel-route-card:hover {
|
||||
background: var(--bg-card-hover);
|
||||
border-color: var(--border-focus);
|
||||
}
|
||||
|
||||
.tunnel-route-card:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tunnel-route-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.tunnel-route-name {
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.tunnel-route-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
background: var(--success-muted);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.tunnel-route-domain {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm);
|
||||
margin-bottom: var(--space-xs);
|
||||
}
|
||||
|
||||
.tunnel-route-domain a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-size: var(--font-size-sm);
|
||||
transition: color var(--transition-fast);
|
||||
}
|
||||
|
||||
.tunnel-route-domain a:hover {
|
||||
color: var(--accent-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.tunnel-route-service {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-xs);
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.tunnel-route-service code {
|
||||
background: var(--bg-tertiary);
|
||||
padding: 2px 6px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Gateway 配置页 — 选项卡片 */
|
||||
.gw-option-cards {
|
||||
display: grid;
|
||||
@@ -1015,6 +916,32 @@
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
/* 活跃实例标记 */
|
||||
.unit-card.active-instance {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
|
||||
}
|
||||
.unit-active-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background: rgba(99,102,241,.12);
|
||||
color: var(--accent);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.unit-switch-btn {
|
||||
flex-shrink: 0;
|
||||
font-size: 10px !important;
|
||||
padding: 1px 8px !important;
|
||||
opacity: 0;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
.unit-card:hover .unit-switch-btn { opacity: 1; }
|
||||
|
||||
.unit-links {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
@@ -1831,6 +1758,28 @@ details.docker-other-section[open] > .docker-other-toggle::before {
|
||||
}
|
||||
.pick-target:has(input:checked) .pick-dot { opacity: 1; box-shadow: 0 0 4px var(--pick-color); }
|
||||
|
||||
.task-beta-note {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
border-top: 1px solid var(--border-primary);
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
background:
|
||||
linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
|
||||
color: #b45309;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.task-beta-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #d97706;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.task-input-row {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
@@ -1871,90 +1820,283 @@ details.docker-other-section[open] > .docker-other-toggle::before {
|
||||
}
|
||||
.task-send-btn:disabled { opacity: .35; pointer-events: none; }
|
||||
|
||||
/* 任务结果 */
|
||||
.task-results {
|
||||
/* 异步工作区 */
|
||||
.task-workspace {
|
||||
margin-bottom: var(--space-lg);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg, 12px);
|
||||
overflow: hidden;
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
.task-results:empty { display: none; }
|
||||
.task-results-header {
|
||||
.workspace-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 14px;
|
||||
background: var(--bg-secondary);
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
}
|
||||
.workspace-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
background: var(--bg-secondary);
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.task-results-mode {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: var(--text-tertiary);
|
||||
background: var(--bg-primary);
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
.ws-worker-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||
gap: var(--space-sm);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
.ws-worker {
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md, 8px);
|
||||
padding: 12px;
|
||||
background: var(--bg-secondary);
|
||||
cursor: pointer;
|
||||
transition: all .15s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.task-results-grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.ws-worker::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0; top: 0; bottom: 0;
|
||||
width: 3px;
|
||||
background: var(--worker-color, var(--accent));
|
||||
opacity: 0;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
.task-result-card {
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
.ws-worker:hover { background: var(--bg-card-hover); border-color: var(--border-focus); }
|
||||
.ws-worker:hover::before { opacity: 1; }
|
||||
.ws-worker.working {
|
||||
border-color: color-mix(in srgb, var(--worker-color, #f59e0b) 40%, transparent);
|
||||
animation: ws-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
.task-result-card:last-child { border-bottom: none; }
|
||||
.task-result-header {
|
||||
.ws-worker.working::before { opacity: 1; }
|
||||
@keyframes ws-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--worker-color, #f59e0b) 15%, transparent); }
|
||||
50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--worker-color, #f59e0b) 8%, transparent); }
|
||||
}
|
||||
.ws-worker-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
background: var(--bg-secondary);
|
||||
gap: 10px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.task-result-name {
|
||||
font-size: 12px;
|
||||
.ws-worker-info { flex: 1; min-width: 0; }
|
||||
.ws-worker-name {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-mono);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.task-result-status {
|
||||
margin-left: auto;
|
||||
.ws-worker-role {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
.ws-worker-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 1px 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
padding: 2px 8px;
|
||||
border-radius: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.task-result-status.pending { color: var(--text-tertiary); }
|
||||
.task-result-status.running { color: #f59e0b; }
|
||||
.task-result-status.done { color: #22c55e; }
|
||||
.task-result-status.error { color: #ef4444; }
|
||||
.task-result-body {
|
||||
padding: 10px 14px;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
.ws-worker-badge.running { color: #f59e0b; background: rgba(245,158,11,.1); }
|
||||
.ws-worker-badge.done { color: #22c55e; background: rgba(34,197,94,.1); }
|
||||
.ws-worker-badge.error { color: #ef4444; background: rgba(239,68,68,.1); }
|
||||
.ws-worker-task {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid var(--border-primary);
|
||||
}
|
||||
.ws-worker-msg {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ws-worker-time {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary);
|
||||
font-family: var(--font-mono);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 任务记录 */
|
||||
.ws-history-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
padding: 8px 14px 4px;
|
||||
}
|
||||
.ws-history-list {
|
||||
padding: 4px 14px 10px;
|
||||
}
|
||||
.ws-history-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 8px;
|
||||
border-radius: var(--radius-sm, 4px);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: background .1s;
|
||||
}
|
||||
.ws-history-item:hover { background: var(--bg-secondary); }
|
||||
.ws-history-icon { flex-shrink: 0; }
|
||||
.ws-history-item.done .ws-history-icon { color: #22c55e; }
|
||||
.ws-history-item.error .ws-history-icon { color: #ef4444; }
|
||||
.ws-history-name {
|
||||
font-weight: 600;
|
||||
font-family: var(--font-mono);
|
||||
color: var(--text-primary);
|
||||
max-height: 240px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ws-history-msg {
|
||||
flex: 1;
|
||||
color: var(--text-secondary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
.ws-history-meta {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary);
|
||||
font-family: var(--font-mono);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn-xs {
|
||||
font-size: 11px;
|
||||
padding: 1px 8px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* 任务详情弹窗 */
|
||||
.task-detail-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,.5);
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
}
|
||||
.task-detail-modal {
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-lg, 12px);
|
||||
width: 100%;
|
||||
max-width: 640px;
|
||||
max-height: 80vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 16px 48px rgba(0,0,0,.2);
|
||||
}
|
||||
.task-detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 14px 18px;
|
||||
background: var(--bg-secondary);
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.task-detail-header span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.task-detail-body {
|
||||
padding: 18px;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
.task-detail-section {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.task-detail-label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.task-detail-content {
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.task-detail-result {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-md, 8px);
|
||||
padding: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-primary);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
.task-result-body .typing-cursor {
|
||||
display: inline-block;
|
||||
width: 2px; height: 14px;
|
||||
background: var(--primary);
|
||||
margin-left: 2px;
|
||||
vertical-align: text-bottom;
|
||||
animation: cursor-blink .8s step-end infinite;
|
||||
.task-detail-result.error { color: #ef4444; }
|
||||
.task-detail-tools {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
@keyframes cursor-blink {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
.task-detail-tool {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-primary);
|
||||
border-radius: var(--radius-sm, 4px);
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.task-detail-tool code {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
}
|
||||
.task-detail-tool pre {
|
||||
font-size: 11px;
|
||||
line-height: 1.5;
|
||||
margin: 4px 0 0;
|
||||
color: var(--text-secondary);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
.task-detail-tool pre.tool-output { color: var(--text-tertiary); }
|
||||
.task-detail-meta {
|
||||
font-size: 11px;
|
||||
color: var(--text-tertiary);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 分栏标题 */
|
||||
|
||||
Reference in New Issue
Block a user