Files
vector/frontend/src/pages/analysis/AnalysisResult.css
T
Sadmin 90213e0491 E4 (B21): отправка зон в КОНТУР по операции (контракт B20)
- contour_operation_id в PATCH /operations/{id} (mapping на операцию КОНТУРа).
- backend/routers/contour.py: POST /{id}/send-to-contour — последний анализ
  (search_models → legacy analysis_log) → SearchZones[] GeoJSON-сектора
  направлений (±22.5°, probability по приоритету) → POST {CONTOUR_API_URL}/
  api/v1/vector/zones?operation_id=... (Bearer CONTOUR_TOKEN). Все шаги
  аудируются (contour_send_ok/failed). GET /{id}/areas-checked — прокси
  проверенных квадратов (inbound к B17).
- env: CONTOUR_API_URL (дефолт CT130:8000), CONTOUR_TOKEN (в secrets).
- case_id-фильтр в GET /operations.
- UI: панель «КОНТУР» на странице анализа: ввод/сохранение UUID операции
  КОНТУРа, кнопка «Отправить зоны в КОНТУР» со статусом результата.
- Тесты E4 (4): build B20-payload (полигон замкнут, probability 0..1,
  operation_id в query, Bearer), недостающий contour_id 400, отказ КОНТУРа
  → 502 + аудит, геометрия сектора.
226 passed, 5 skipped.
2026-09-09 21:39:18 +03:00

716 lines
14 KiB
CSS

.analysis-result {
min-height: 100vh;
background: var(--bg-primary);
color: var(--text-primary);
}
/* ===== Header: кейс + панель решения ===== */
.result-header {
background: linear-gradient(135deg, rgba(255, 77, 0, 0.1) 0%, rgba(255, 77, 0, 0.05) 100%);
border-bottom: 2px solid rgba(255, 77, 0, 0.3);
padding: 24px 24px 20px;
margin-bottom: 24px;
}
.header-top {
max-width: 1400px;
margin: 0 auto;
}
.result-header h1 {
font-size: 28px;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 10px 0;
display: flex;
align-items: center;
gap: 12px;
}
.logo {
color: var(--accent);
font-weight: 800;
}
.case-info {
display: flex;
flex-wrap: wrap;
gap: 12px;
font-size: 14px;
color: var(--text-secondary);
align-items: center;
}
.separator {
color: rgba(255, 77, 0, 0.5);
font-weight: 700;
}
/* Панель решения: срочность | радиус | критические действия */
.decision-strip {
max-width: 1400px;
margin: 18px 0 0 0;
display: grid;
grid-template-columns: 200px 220px 1fr;
gap: 12px;
}
.decision-cell {
background: var(--bg-secondary);
border: 1px solid rgba(255, 77, 0, 0.25);
border-radius: 10px;
padding: 12px 16px;
min-width: 0;
}
.decision-label {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.6px;
color: var(--text-secondary);
margin-bottom: 6px;
}
.decision-value {
font-size: 24px;
font-weight: 700;
color: var(--text-primary);
display: flex;
align-items: baseline;
gap: 8px;
line-height: 1.2;
}
.radius-mult {
font-size: 14px;
font-weight: 600;
color: var(--accent);
background: rgba(255, 77, 0, 0.12);
padding: 2px 8px;
border-radius: 6px;
}
/* Срочность — та же цветовая схема (акцентные тона ЦОУ) */
.urgency-cell.urgency-критический {
border-color: #ff4d00;
background: rgba(255, 77, 0, 0.12);
}
.urgency-cell.urgency-критический .decision-value { color: #ff4d00; }
.urgency-cell.urgency-высокий {
border-color: #ff9f1a;
background: rgba(255, 159, 26, 0.12);
}
.urgency-cell.urgency-высокий .decision-value { color: #ff9f1a; }
.urgency-cell.urgency-средний {
border-color: #ffd166;
background: rgba(255, 209, 102, 0.1);
}
.urgency-cell.urgency-средний .decision-value { color: #ffd166; }
.urgency-cell.urgency-стандартный .decision-value { color: var(--text-primary); }
.warnings-cell { display: flex; flex-direction: column; }
.decision-warnings {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 4px;
font-size: 13px;
line-height: 1.45;
color: var(--text-primary);
}
.decision-warnings li::before {
content: '🚨 ';
color: #ff4d00;
}
.decision-warnings.muted {
color: var(--text-secondary);
font-size: 13px;
}
.header-summary {
max-width: 1400px;
margin: 14px 0 0 0;
font-size: 14px;
line-height: 1.6;
color: var(--text-secondary);
}
/* ===== Content ===== */
.result-content {
max-width: 1400px;
margin: 0 auto;
padding: 0 24px 48px;
display: flex;
flex-direction: column;
gap: 20px;
}
/* ===== Ряд 1: карта + зоны ===== */
.main-row {
display: grid;
gap: 16px;
align-items: start;
}
.main-row.with-map {
grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
}
.main-row.no-map {
grid-template-columns: 1fr;
}
.section-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.section-head h2,
.info-card h3 {
font-size: 17px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.map-section,
.zones-panel,
.info-card {
background: var(--bg-secondary);
border: 1px solid rgba(255, 77, 0, 0.2);
border-radius: 12px;
padding: 18px;
min-width: 0;
}
/* Гео-чипы в шапке карты */
.geo-chips {
display: flex;
gap: 8px;
}
.geo-chip {
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
border-radius: 6px;
border: 1px solid var(--border);
color: var(--text-secondary);
background: var(--input-bg);
}
.geo-chip.water { border-color: rgba(47, 129, 247, 0.5); color: #79b8ff; }
.geo-chip.rail { border-color: rgba(138, 47, 47, 0.7); color: #ff9d9d; }
/* Предупреждения геослоя — компактные плашки */
.geo-warning {
font-size: 13px;
line-height: 1.5;
color: #ff4d00;
background: rgba(255, 77, 0, 0.08);
border: 1px solid rgba(255, 77, 0, 0.4);
border-radius: 8px;
padding: 8px 12px;
margin-bottom: 10px;
}
.geo-warning.rail {
color: #ff7b72;
border-color: rgba(138, 47, 47, 0.7);
background: rgba(138, 47, 47, 0.12);
}
.map-empty {
height: 320px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
background: var(--input-bg);
border-radius: 8px;
border: 1px dashed var(--border);
font-size: 14px;
}
.map-info {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 8px;
font-size: 13px;
color: var(--text-secondary);
}
.map-info .sep { color: rgba(255, 77, 0, 0.5); }
/* ===== Зоны ===== */
.zones-count {
font-size: 13px;
color: var(--text-secondary);
}
.zones-list {
display: flex;
flex-direction: column;
gap: 10px;
max-height: 560px;
overflow-y: auto;
padding-right: 4px;
}
.zone-card {
background: rgba(255, 77, 0, 0.04);
border-radius: 8px;
padding: 12px 14px;
border-left: 3px solid var(--border);
transition: background 0.15s ease;
}
.zone-card:hover {
background: rgba(255, 77, 0, 0.08);
}
.zone-card.priority-1 {
border-left-color: #ff4d00;
background: rgba(255, 77, 0, 0.09);
}
.zone-card.priority-2 {
border-left-color: #ff9f1a;
}
.zone-card.priority-3 {
border-left-color: #ffd166;
}
.zone-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.zone-title {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.zone-priority {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
background: var(--accent);
color: var(--bg-primary);
border-radius: 50%;
font-weight: 700;
font-size: 13px;
flex-shrink: 0;
}
.zone-name {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Направление / дистанция / score — справа компактно */
.zone-meta {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.zone-dir {
font-size: 12px;
font-weight: 700;
color: var(--text-secondary);
background: var(--input-bg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 6px;
min-width: 26px;
text-align: center;
}
.zone-dist {
font-size: 13px;
color: var(--text-secondary);
font-variant-numeric: tabular-nums;
}
.zone-score {
font-size: 17px;
font-weight: 700;
color: var(--accent);
min-width: 48px;
text-align: right;
font-variant-numeric: tabular-nums;
}
.zone-reasoning {
margin-top: 8px;
font-size: 12.5px;
color: var(--text-secondary);
line-height: 1.5;
}
.zones-empty {
padding: 24px;
text-align: center;
color: var(--text-secondary);
font-size: 14px;
}
/* ===== Ряд 2: поведение + действия ===== */
.behavior-row {
display: grid;
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
gap: 20px;
align-items: stretch;
}
.profile-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.profile-tag {
font-size: 12px;
font-weight: 600;
color: var(--accent);
background: rgba(255, 77, 0, 0.1);
border: 1px solid rgba(255, 77, 0, 0.35);
border-radius: 12px;
padding: 3px 10px;
}
.profile-tag.unmodeled {
color: var(--text-secondary);
border-color: var(--border);
background: var(--input-bg);
}
.prediction {
margin: 12px 0 0 0;
font-size: 14.5px;
line-height: 1.6;
color: var(--text-primary);
}
/* Тактика психотипа — сетка 2×2 */
.tactics-grid {
margin-top: 12px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.tactic {
background: var(--input-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
line-height: 1.5;
color: var(--text-secondary);
}
.tactic-label {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: rgba(255, 77, 0, 0.8);
margin-bottom: 4px;
font-weight: 600;
}
.unmodeled-note {
margin-top: 10px;
padding: 8px 12px;
background: var(--input-bg);
border-left: 3px solid var(--border);
border-radius: 6px;
font-size: 12.5px;
color: var(--text-secondary);
line-height: 1.6;
}
.unmodeled-note p { margin: 2px 0; }
/* Немедленные действия — нумерованный список с акцентом */
.actions-list {
margin: 12px 0 0 0;
padding: 0;
list-style: none;
counter-reset: action;
display: flex;
flex-direction: column;
gap: 8px;
}
.actions-list li {
counter-increment: action;
display: flex;
gap: 10px;
font-size: 14px;
line-height: 1.5;
color: var(--text-primary);
background: var(--input-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 12px;
}
.actions-list li::before {
content: counter(action);
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 50%;
background: var(--accent);
color: var(--bg-primary);
font-weight: 700;
font-size: 12px;
}
.actions-list li.critical {
border-color: #ff4d00;
background: rgba(255, 77, 0, 0.1);
font-weight: 600;
}
.actions-list li.critical::before {
background: #ff4d00;
}
/* ===== Ряд 3: обоснование радиуса ===== */
.radius-formula {
font-size: 12px;
color: var(--text-secondary);
font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.coeff-grid {
margin-top: 14px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 10px;
}
.coeff-chip {
background: var(--input-bg);
border: 1px solid var(--border);
border-left: 3px solid var(--accent);
border-radius: 8px;
padding: 10px 12px;
}
.coeff-name {
font-size: 13px;
color: var(--text-secondary);
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 6px;
}
.coeff-value {
font-size: 16px;
font-weight: 700;
color: var(--text-primary);
font-variant-numeric: tabular-nums;
}
.coeff-hint {
margin-top: 3px;
font-size: 11.5px;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Психотип-поправки */
.psy-mods {
margin-top: 14px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.psy-mods-title {
font-size: 13px;
color: var(--text-secondary);
margin-right: 4px;
}
.psy-mod-chip {
font-size: 12.5px;
font-weight: 600;
color: var(--text-primary);
background: rgba(255, 77, 0, 0.07);
border: 1px solid rgba(255, 77, 0, 0.25);
border-radius: 6px;
padding: 4px 10px;
font-variant-numeric: tabular-nums;
}
/* ===== Ряд 4: справочные данные ===== */
.reference-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 20px;
align-items: start;
}
.info-card p {
margin: 8px 0;
font-size: 13.5px;
line-height: 1.6;
color: var(--text-secondary);
}
.info-card p strong {
color: var(--text-primary);
font-weight: 600;
}
/* ===== Loading & Error ===== */
.loading-state,
.error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 60vh;
gap: 24px;
padding: 48px 24px;
}
.spinner {
width: 48px;
height: 48px;
border: 4px solid rgba(255, 77, 0, 0.2);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.error-state h2 {
font-size: 24px;
color: var(--text-primary);
margin: 0;
}
.error-state p {
font-size: 16px;
color: var(--text-secondary);
margin: 8px 0 24px;
}
.error-state button {
padding: 12px 24px;
background: var(--accent);
color: var(--bg-primary);
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.error-state button:hover {
background: var(--accent-hover);
transform: translateY(-2px);
}
/* ===== Responsive ===== */
@media (max-width: 1100px) {
.main-row.with-map {
grid-template-columns: 1fr;
}
.behavior-row {
grid-template-columns: 1fr;
}
.reference-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 768px) {
.result-header { padding: 20px 16px 16px; }
.result-header h1 { font-size: 22px; }
.decision-strip {
grid-template-columns: 1fr 1fr;
}
.warnings-cell { grid-column: 1 / -1; }
.result-content { padding: 0 16px 32px; }
.reference-grid { grid-template-columns: 1fr; }
.coeff-grid { grid-template-columns: 1fr 1fr; }
.case-info { flex-direction: column; align-items: flex-start; gap: 6px; }
.separator { display: none; }
.tactics-grid { grid-template-columns: 1fr; }
}
/* E4: панель КОНТУР */
.contour-panel {
margin-top: 12px;
padding: 12px;
background: #161b22;
border: 1px solid #30363d;
border-radius: 6px;
}
.contour-title { font-size: 13px; font-weight: 600; color: #e6edf3; margin-bottom: 8px; }
.contour-row { display: flex; gap: 8px; margin-bottom: 8px; }
.contour-input {
flex: 1;
padding: 8px 10px;
background: #0d1117;
border: 1px solid #30363d;
border-radius: 6px;
color: #e6edf3;
font-size: 13px;
}
.contour-save, .contour-send {
padding: 8px 12px;
border: none;
border-radius: 6px;
color: #fff;
font-size: 13px;
cursor: pointer;
white-space: nowrap;
}
.contour-save { background: #21262d; color: #e6edf3; }
.contour-send { background: #238636; }
.contour-send:disabled { background: #21262d; color: #8b949e; cursor: not-allowed; }
.contour-ok { font-size: 12px; color: #3fb950; }
.contour-err { font-size: 12px; color: #f85149; }