Files
webtest-agent/static/css/style.css
T

101 lines
7.6 KiB
CSS

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f3f4f6; color: #111; }
.topbar { background: #111827; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 17px; font-weight: 600; }
.ver { font-size: 11px; background: #374151; padding: 2px 8px; border-radius: 999px; margin-left: 6px; font-weight: 400; }
.health { font-size: 12px; color: #9ca3af; }
.health.ok { color: #4ade80; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid #e5e7eb; }
.card h2 { font-size: 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; }
.field.span2 { grid-column: span 2; }
.field label { font-size: 13px; color: #374151; margin-bottom: 6px; font-weight: 500; }
.field input, .field textarea { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.btn { padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; }
.btn.primary { background: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn.small { padding: 5px 12px; font-size: 12px; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.btn.small:hover { background: #e5e7eb; }
.hint { margin-top: 12px; font-size: 12px; color: #6b7280; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: middle; }
th { background: #f9fafb; font-weight: 600; color: #374151; white-space: nowrap; }
td { word-break: break-all; }
td .goal-cell { max-width: 260px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; color: #9ca3af; padding: 24px; }
.status { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status.queued { background: #fef3c7; color: #92400e; }
.status.running { background: #dbeafe; color: #1e40af; }
.status.finished { background: #dcfce7; color: #166534; }
.status.stopped { background: #f3f4f6; color: #4b5563; }
.result { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.result.pass { background: #dcfce7; color: #166534; }
.result.fail { background: #fee2e2; color: #991b1b; }
.result.error { background: #ffedd5; color: #9a3412; }
.result.stopped { background: #f3f4f6; color: #4b5563; }
.result.pending { background: #f3f4f6; color: #9ca3af; }
a.report-link { color: #2563eb; text-decoration: none; }
a.report-link:hover { text-decoration: underline; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-body { width: 90vw; height: 90vh; background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
#report-frame { flex: 1; border: none; width: 100%; }
.btn.danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.btn.danger:hover { background: #fecaca; }
/* 任务详情 */
.detail-body { width: 96vw; max-width: 1100px; }
.detail-content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; font-size: 13px; margin-bottom: 14px; }
.detail-meta .m-item b { display: block; color: #6b7280; font-size: 11px; font-weight: 500; margin-bottom: 3px; }
.detail-meta .m-item span { color: #111; word-break: break-all; }
.live-bar { display: flex; align-items: flex-start; gap: 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.live-bar.hidden { display: none; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #3b82f6; margin-top: 5px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-phase { font-weight: 600; font-size: 14px; color: #1e40af; margin-bottom: 4px; }
.live-detail { font-size: 13px; color: #374151; }
.live-reason { font-size: 12px; color: #6b7280; margin-top: 4px; }
.detail-steps-head { font-size: 14px; font-weight: 600; margin: 18px 0 10px; }
.detail-steps { display: flex; flex-direction: column; gap: 8px; }
.step-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; background: #fff; }
.step-card .step-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.step-num { background: #f3f4f6; color: #374151; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.step-action { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #dbeafe; color: #1e40af; }
.step-action.assert { background: #fef3c7; color: #92400e; }
.step-action.click { background: #dcfce7; color: #166534; }
.step-action.fill { background: #ede9fe; color: #5b21b6; }
.step-action.fail { background: #fee2e2; color: #991b1b; }
.step-target { font-family: ui-monospace, monospace; font-size: 12px; color: #374151; background: #f9fafb; padding: 2px 8px; border-radius: 6px; }
.step-result { margin-left: auto; font-size: 12px; font-weight: 600; }
.step-result.ok { color: #16a34a; }
.step-result.bad { color: #dc2626; }
.step-reason { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.step-shot img { max-width: 320px; border-radius: 8px; border: 1px solid #e5e7eb; display: block; margin-top: 6px; cursor: zoom-in; }
.step-detail { font-size: 12px; color: #374151; }
.step-time { font-size: 11px; color: #9ca3af; margin-left: 8px; }
/* 大模型配置 */
select { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff; }
select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.mode-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mode-badge.vision { background: #ede9fe; color: #6d28d9; }
.mode-badge.text { background: #f3f4f6; color: #4b5563; }
.tag { font-size: 11px; font-weight: 400; margin-left: 6px; padding: 1px 8px; border-radius: 999px; }
.tag-vision { background: #ede9fe; color: #6d28d9; }
.tag-text { background: #f3f4f6; color: #4b5563; }
.url-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-cell { font-weight: 600; }
.ops { white-space: nowrap; }
.llm-modal-body { width: 560px; height: auto; max-height: 92vh; }
.llm-form { padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; overflow-y: auto; }
.llm-opts { display: flex; flex-direction: row; gap: 20px; align-items: center; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.check input { width: auto; }
.llm-actions { grid-column: span 2; display: flex; align-items: center; gap: 12px; }
.llm-test-result { font-size: 12px; color: #6b7280; word-break: break-all; }