feat(routers): integrate Banana Pi Client API and onboard LibreSpeed measurements
Discover Ethernet routers under the board, map physical SIM slots, expose vendor controls and real telemetry, and provide packaged VPS speed tests with a live monochrome gauge. Enforce compact typography across Core and Node UI.
This commit is contained in:
@@ -411,3 +411,8 @@ decoders before BLE/Wi-Fi/data-session evidence exists.
|
|||||||
- Recover actual settings from retained JSON/records before considering manual
|
- Recover actual settings from retained JSON/records before considering manual
|
||||||
reconstruction. Distinguish a proven storage defect from an unproven deletion
|
reconstruction. Distinguish a proven storage defect from an unproven deletion
|
||||||
trigger, and state the timestamp/fidelity limit of any recovered source.
|
trigger, and state the timestamp/fidelity limit of any recovered source.
|
||||||
|
|
||||||
|
|
||||||
|
## Enforced compact typography
|
||||||
|
|
||||||
|
Operational values/section headings use md (13 px), explanatory/status/error copy uses Description/sm (12 px). Only canonical window/page title roles use title (18 px). Do not add browser-default paragraphs, local larger sizes, font shorthand or inline fontSize. Typography checks are mandatory build gates; never extend the frozen compact legacy baseline or generalize scene/display exceptions to satisfy a feature. Run the typography contract tests and verify computed sizes in centered/floating and narrow windows. See Design Guideline docs/OPERATIONAL_TYPOGRAPHY.md.
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"postinstall": "node scripts/install-rerun-navigation.mjs",
|
"postinstall": "node scripts/install-rerun-navigation.mjs",
|
||||||
"prebuild": "node scripts/install-rerun-navigation.mjs",
|
"prebuild": "npm run check:typography && node scripts/install-rerun-navigation.mjs",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"test:unit": "node --test --test-concurrency=1 test/*.test.mjs",
|
"test:unit": "node --test --test-concurrency=1 test/*.test.mjs",
|
||||||
"typecheck": "tsc -b --pretty false"
|
"typecheck": "tsc -b --pretty false",
|
||||||
|
"check:typography": "node --test test/operationalTypography.test.mjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@noble/hashes": "^2.2.0",
|
"@noble/hashes": "^2.2.0",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {SceneDisplayControls} from "../../../packages/spatial-ui/src/SceneDisplayControls";
|
import {SceneDisplayControls} from "../../../packages/spatial-ui/src/SceneDisplayControls";
|
||||||
import {SceneLayerControls} from "../../../packages/spatial-ui/src/SceneLayerControls";
|
import {SceneLayerControls} from "../../../packages/spatial-ui/src/SceneLayerControls";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
AdminNavigationPanel,
|
AdminNavigationPanel,
|
||||||
AppHeader,
|
AppHeader,
|
||||||
ApplicationPanel,
|
ApplicationPanel,
|
||||||
@@ -1110,7 +1110,7 @@ export default function App() {
|
|||||||
<i className="api-dot" data-status={effectiveSourceUrl ? "online" : "checking"} aria-hidden="true" />
|
<i className="api-dot" data-status={effectiveSourceUrl ? "online" : "checking"} aria-hidden="true" />
|
||||||
{effectiveSourceUrl ? "Источник назначен" : "Источник не назначен"}
|
{effectiveSourceUrl ? "Источник назначен" : "Источник не назначен"}
|
||||||
</span>
|
</span>
|
||||||
<p>Структура повторяет продуктовые сущности, а не внутренние панели визуального движка.</p>
|
<Description>Структура повторяет продуктовые сущности, а не внутренние панели визуального движка.</Description>
|
||||||
</div>
|
</div>
|
||||||
<SceneLayerControls sceneSettings={sceneSettings} pending={runtime.pendingAction === "viewer"} applyScenePatch={applyScenePatch}/>
|
<SceneLayerControls sceneSettings={sceneSettings} pending={runtime.pendingAction === "viewer"} applyScenePatch={applyScenePatch}/>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LandingStage as SharedLandingStage, StatusBadge } from "@nodedc/ui-react";
|
import { Description, LandingStage as SharedLandingStage, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import type { BackendStatus, RuntimePhase } from "../core/runtime/contracts";
|
import type { BackendStatus, RuntimePhase } from "../core/runtime/contracts";
|
||||||
import type { EnvironmentPage } from "../core/environment/environmentSettings";
|
import type { EnvironmentPage } from "../core/environment/environmentSettings";
|
||||||
@@ -35,7 +35,7 @@ export function LandingStage({
|
|||||||
<span className="section-eyebrow">ИСТОЧНИК</span>
|
<span className="section-eyebrow">ИСТОЧНИК</span>
|
||||||
<StatusBadge tone={phaseTone(phase)}>{phaseLabel(phase)}</StatusBadge>
|
<StatusBadge tone={phaseTone(phase)}>{phaseLabel(phase)}</StatusBadge>
|
||||||
</div>
|
</div>
|
||||||
<p>{message || "Выберите архитектурный блок в верхней навигации."}</p>
|
<Description>{message || "Выберите архитектурный блок в верхней навигации."}</Description>
|
||||||
</>}
|
</>}
|
||||||
footer={<>
|
footer={<>
|
||||||
<span>{root?.accent ?? "НАБЛЮДЕНИЕ · МИССИИ · ДАННЫЕ"}</span>
|
<span>{root?.accent ?? "НАБЛЮДЕНИЕ · МИССИИ · ДАННЫЕ"}</span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GlassSurface } from "@nodedc/ui-react";
|
import { Description, GlassSurface } from "@nodedc/ui-react";
|
||||||
|
|
||||||
export interface MetricCardProps {
|
export interface MetricCardProps {
|
||||||
eyebrow: string;
|
eyebrow: string;
|
||||||
@@ -16,7 +16,7 @@ export function MetricCard({ eyebrow, value, unit, detail, featured = false }: M
|
|||||||
<strong>{value}</strong>
|
<strong>{value}</strong>
|
||||||
{unit ? <span>{unit}</span> : null}
|
{unit ? <span>{unit}</span> : null}
|
||||||
</div>
|
</div>
|
||||||
<p>{detail}</p>
|
<Description>{detail}</Description>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { ConfirmationModal, Dropdown, Icon } from "@nodedc/ui-react";
|
import { Description, ConfirmationModal, Dropdown, Icon } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
type ObservationSessionReplayLaunch,
|
type ObservationSessionReplayLaunch,
|
||||||
@@ -279,16 +279,16 @@ export function ObservationSessionSelect({
|
|||||||
description={deleteTarget ? <>
|
description={deleteTarget ? <>
|
||||||
<strong>{deleteTarget.label}</strong>
|
<strong>{deleteTarget.label}</strong>
|
||||||
{deleteTarget.lab ? (
|
{deleteTarget.lab ? (
|
||||||
<p>
|
<Description>
|
||||||
Будут удалены только LAB-запись из каталога и её подготовленный кэш.
|
Будут удалены только LAB-запись из каталога и её подготовленный кэш.
|
||||||
Исходная запись {deleteTarget.lab.sourceSessionId} и зафиксированный
|
Исходная запись {deleteTarget.lab.sourceSessionId} и зафиксированный
|
||||||
лабораторный результат останутся неизменными.
|
лабораторный результат останутся неизменными.
|
||||||
</p>
|
</Description>
|
||||||
) : (
|
) : (
|
||||||
<p>
|
<Description>
|
||||||
Сессия, исходные данные наблюдения, подготовленная Rerun-запись и
|
Сессия, исходные данные наблюдения, подготовленная Rerun-запись и
|
||||||
видеоматериалы будут удалены с этого сервера без возможности восстановления.
|
видеоматериалы будут удалены с этого сервера без возможности восстановления.
|
||||||
</p>
|
</Description>
|
||||||
)}
|
)}
|
||||||
{sessions.error && sessions.deletingSessionId === null ? (
|
{sessions.error && sessions.deletingSessionId === null ? (
|
||||||
<p className="observation-session-delete-error" role="alert">{sessions.error}</p>
|
<p className="observation-session-delete-error" role="alert">{sessions.error}</p>
|
||||||
@@ -346,11 +346,11 @@ export function ObservationSessionArchive({
|
|||||||
{labsOnly ? "ВОСПРОИЗВОДИМЫЕ ЛАБОРАТОРНЫЕ ЗАПИСИ" : "АРХИВ НАБЛЮДЕНИЯ"}
|
{labsOnly ? "ВОСПРОИЗВОДИМЫЕ ЛАБОРАТОРНЫЕ ЗАПИСИ" : "АРХИВ НАБЛЮДЕНИЯ"}
|
||||||
</span>
|
</span>
|
||||||
<h2>{labsOnly ? "Записанные лабораторные работы" : "Сохранённые сессии"}</h2>
|
<h2>{labsOnly ? "Записанные лабораторные работы" : "Сохранённые сессии"}</h2>
|
||||||
<p>
|
<Description>
|
||||||
{labsOnly
|
{labsOnly
|
||||||
? "Каждая запись связана с LAB-конфигурацией и открывается как самостоятельный визуальный результат."
|
? "Каждая запись связана с LAB-конфигурацией и открывается как самостоятельный визуальный результат."
|
||||||
: "Выберите запись: сцена и синхронные каналы откроются ниже, не меняя эфир наблюдения."}
|
: "Выберите запись: сцена и синхронные каналы откроются ниже, не меняя эфир наблюдения."}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -457,16 +457,16 @@ export function ObservationSessionArchive({
|
|||||||
description={deleteTarget ? <>
|
description={deleteTarget ? <>
|
||||||
<strong>{deleteTarget.label}</strong>
|
<strong>{deleteTarget.label}</strong>
|
||||||
{deleteTarget.lab ? (
|
{deleteTarget.lab ? (
|
||||||
<p>
|
<Description>
|
||||||
Будут удалены только LAB-запись из каталога и её подготовленный кэш.
|
Будут удалены только LAB-запись из каталога и её подготовленный кэш.
|
||||||
Исходная запись {deleteTarget.lab.sourceSessionId} и зафиксированный
|
Исходная запись {deleteTarget.lab.sourceSessionId} и зафиксированный
|
||||||
лабораторный результат останутся неизменными.
|
лабораторный результат останутся неизменными.
|
||||||
</p>
|
</Description>
|
||||||
) : (
|
) : (
|
||||||
<p>
|
<Description>
|
||||||
Сессия, исходные данные наблюдения, подготовленная Rerun-запись и
|
Сессия, исходные данные наблюдения, подготовленная Rerun-запись и
|
||||||
видеоматериалы будут удалены с этого сервера без возможности восстановления.
|
видеоматериалы будут удалены с этого сервера без возможности восстановления.
|
||||||
</p>
|
</Description>
|
||||||
)}
|
)}
|
||||||
</> : null}
|
</> : null}
|
||||||
confirmLabel="Удалить сессию"
|
confirmLabel="Удалить сессию"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Description } from '@nodedc/ui-react';
|
||||||
import {
|
import {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
type CSSProperties,
|
type CSSProperties,
|
||||||
@@ -915,7 +916,7 @@ LaboratoryMetricEvidenceSceneHandle,
|
|||||||
return (
|
return (
|
||||||
<div className="laboratory-metric-evidence-scene">
|
<div className="laboratory-metric-evidence-scene">
|
||||||
<div ref={hostRef} className="laboratory-metric-evidence-scene__viewport">
|
<div ref={hostRef} className="laboratory-metric-evidence-scene__viewport">
|
||||||
{renderError ? <p>{renderError}</p> : null}
|
{renderError ? <Description>{renderError}</Description> : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="laboratory-metric-evidence-scene__legend">
|
<div className="laboratory-metric-evidence-scene__legend">
|
||||||
{showRenderStats && renderStats ? (
|
{showRenderStats && renderStats ? (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useId, useState, type ReactNode } from "react";
|
import { useId, useState, type ReactNode } from "react";
|
||||||
import { Icon, IconButton, Select, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Icon, IconButton, Select, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
export interface LaboratoryOption<T extends string> {
|
export interface LaboratoryOption<T extends string> {
|
||||||
id: T;
|
id: T;
|
||||||
@@ -91,7 +91,7 @@ export function LaboratorySelector<T extends string>({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">{eyebrow}</span>
|
<span className="section-eyebrow">{eyebrow}</span>
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
<p>{description}</p>
|
<Description>{description}</Description>
|
||||||
</div>
|
</div>
|
||||||
<div className="laboratory-selector__control">
|
<div className="laboratory-selector__control">
|
||||||
<span>{label}</span>
|
<span>{label}</span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GlassSurface } from "@nodedc/ui-react";
|
import { Description, GlassSurface } from "@nodedc/ui-react";
|
||||||
import { CanonicalResultRerunReplay } from "./CanonicalResultRerunReplay";
|
import { CanonicalResultRerunReplay } from "./CanonicalResultRerunReplay";
|
||||||
import { resolveCanonicalLabReplay } from "../../core/laboratory/canonicalLabReplay";
|
import { resolveCanonicalLabReplay } from "../../core/laboratory/canonicalLabReplay";
|
||||||
import type { ObservatoryPortableResultReview } from "../../core/observatory/recordedRun";
|
import type { ObservatoryPortableResultReview } from "../../core/observatory/recordedRun";
|
||||||
@@ -38,7 +38,7 @@ export function PortableResultReplay({
|
|||||||
&& (moduleId === "rf-detr" || moduleId === "object-distance");
|
&& (moduleId === "rf-detr" || moduleId === "object-distance");
|
||||||
if (!tgs && !semantics && !objects) return (
|
if (!tgs && !semantics && !objects) return (
|
||||||
<GlassSurface className="observatory-replay-state" padding="lg">
|
<GlassSurface className="observatory-replay-state" padding="lg">
|
||||||
<p role="alert">Сохранённый результат этого профиля пока не поддерживает визуальный разбор.</p>
|
<Description role="alert">Сохранённый результат этого профиля пока не поддерживает визуальный разбор.</Description>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
);
|
);
|
||||||
return <CanonicalResultRerunReplay key={review.resultId} resultId={review.resultId}
|
return <CanonicalResultRerunReplay key={review.resultId} resultId={review.resultId}
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import { Button, LoadingRegion, Window } from "@nodedc/ui-react";
|
import { Description, Button, LoadingRegion, Window } from "@nodedc/ui-react";
|
||||||
import type { RouteCheck } from "../../core/missions/planner";
|
import type { RouteCheck } from "../../core/missions/planner";
|
||||||
export function MissionCheckWindow({ open, onClose, busy, error, report, run }: {
|
export function MissionCheckWindow({ open, onClose, busy, error, report, run }: {
|
||||||
open: boolean; onClose: () => void; busy: boolean; error: string | null; report: RouteCheck | null; run: () => void;
|
open: boolean; onClose: () => void; busy: boolean; error: string | null; report: RouteCheck | null; run: () => void;
|
||||||
}) {
|
}) {
|
||||||
return <Window open={open} title="Проверка маршрута" size="md" onClose={onClose}><div className="mission-planner__check">
|
return <Window open={open} title="Проверка маршрута" size="md" onClose={onClose}><div className="mission-planner__check">
|
||||||
<p>Проверка сохранённой записи и выбранного участка. Новый проход со сканером для этой проверки не требуется.</p>
|
<Description>Проверка сохранённой записи и выбранного участка. Новый проход со сканером для этой проверки не требуется.</Description>
|
||||||
<LoadingRegion loading={busy} label="Проверка исходных данных">
|
<LoadingRegion loading={busy} label="Проверка исходных данных">
|
||||||
{error && <p role="alert">{error}</p>}
|
{error && <Description role="alert">{error}</Description>}
|
||||||
{report && <><dl>
|
{report && <><dl>
|
||||||
<div><dt>Исходная запись</dt><dd>{report.source_verified ? "Контрольные суммы совпадают" : "Недоступна"}</dd></div>
|
<div><dt>Исходная запись</dt><dd>{report.source_verified ? "Контрольные суммы совпадают" : "Недоступна"}</dd></div>
|
||||||
<div><dt>Версия черновика</dt><dd>{report.revision}</dd></div>
|
<div><dt>Версия черновика</dt><dd>{report.revision}</dd></div>
|
||||||
<div><dt>Длина маршрута</dt><dd>{report.length_m.toFixed(2)} м</dd></div>
|
<div><dt>Длина маршрута</dt><dd>{report.length_m.toFixed(2)} м</dd></div>
|
||||||
<div><dt>Положения сканера</dt><dd>{report.pose_count.toLocaleString("ru-RU")}</dd></div>
|
<div><dt>Положения сканера</dt><dd>{report.pose_count.toLocaleString("ru-RU")}</dd></div>
|
||||||
<div><dt>Максимальный шаг</dt><dd>{report.max_step_m.toFixed(2)} м</dd></div></dl>
|
<div><dt>Максимальный шаг</dt><dd>{report.max_step_m.toFixed(2)} м</dd></div></dl>
|
||||||
{report.warnings.map(w => <p key={w}>{w}</p>)}
|
{report.warnings.map(w => <Description key={w}>{w}</Description>)}
|
||||||
<p>Совмещение с повторным проходом не выполнялось. Записанная траектория описывает движение сканера; проходимость для аппарата по ней не проверена.</p></>}
|
<Description>Совмещение с повторным проходом не выполнялось. Записанная траектория описывает движение сканера; проходимость для аппарата по ней не проверена.</Description></>}
|
||||||
<Button disabled={busy} onClick={run}>{report ? "Повторить проверку" : "Начать проверку"}</Button>
|
<Button disabled={busy} onClick={run}>{report ? "Повторить проверку" : "Начать проверку"}</Button>
|
||||||
</LoadingRegion>
|
</LoadingRegion>
|
||||||
</div></Window>;
|
</div></Window>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { RangeControl } from "@nodedc/ui-react";
|
import { Description, RangeControl } from "@nodedc/ui-react";
|
||||||
import { routeLength, type PlanningPose, type PlanningSource } from "../../core/missions/planner";
|
import { routeLength, type PlanningPose, type PlanningSource } from "../../core/missions/planner";
|
||||||
/** Equal-axis plan projection; the moving marker is an archive pose, not localization. */
|
/** Equal-axis plan projection; the moving marker is an archive pose, not localization. */
|
||||||
export function MissionRoutePreview({ source, poses }: { source: PlanningSource; poses: PlanningPose[] }) {
|
export function MissionRoutePreview({ source, poses }: { source: PlanningSource; poses: PlanningPose[] }) {
|
||||||
@@ -22,8 +22,8 @@ export function MissionRoutePreview({ source, poses }: { source: PlanningSource;
|
|||||||
<polyline points={projection.selected} className="mission-route-preview__selected" fill="none" />
|
<polyline points={projection.selected} className="mission-route-preview__selected" fill="none" />
|
||||||
<circle cx={x} cy={y} r="6" className="mission-route-preview__cursor" />
|
<circle cx={x} cy={y} r="6" className="mission-route-preview__cursor" />
|
||||||
<path d="M40 450h100" className="mission-route-preview__selected" /><text x="40" y="438">{(100 / projection.scale).toFixed(1)} м</text>
|
<path d="M40 450h100" className="mission-route-preview__selected" /><text x="40" y="438">{(100 / projection.scale).toFixed(1)} м</text>
|
||||||
</svg><p>Путь: {routeLength(poses).toFixed(2)} м · {poses.length.toLocaleString("ru-RU")} положений · X/Y, масштаб осей одинаковый</p>
|
</svg><Description>Путь: {routeLength(poses).toFixed(2)} м · {poses.length.toLocaleString("ru-RU")} положений · X/Y, масштаб осей одинаковый</Description>
|
||||||
<RangeControl label="Положение на маршруте" value={Math.min(cursor, poses.length - 1) + 1} min={1} max={poses.length} step={1} formatValue={n => `${n} / ${poses.length}`} onChange={n => setCursor(n - 1)} />
|
<RangeControl label="Положение на маршруте" value={Math.min(cursor, poses.length - 1) + 1} min={1} max={poses.length} step={1} formatValue={n => `${n} / ${poses.length}`} onChange={n => setCursor(n - 1)} />
|
||||||
<p>Кадр {point.index + 1} · X {point.position[0].toFixed(2)} · Y {point.position[1].toFixed(2)} · Z {point.position[2].toFixed(2)} м</p>
|
<Description>Кадр {point.index + 1} · X {point.position[0].toFixed(2)} · Y {point.position[1].toFixed(2)} · Z {point.position[2].toFixed(2)} м</Description>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type {ReactNode} from 'react';
|
import type {ReactNode} from 'react';
|
||||||
import {Button, StatusBadge} from '@nodedc/ui-react';
|
import { Description,Button, StatusBadge} from '@nodedc/ui-react';
|
||||||
import {planningAwaitsCapture, usePlanningTest} from '../../core/missions/PlanningTestContext';
|
import {planningAwaitsCapture, usePlanningTest} from '../../core/missions/PlanningTestContext';
|
||||||
|
|
||||||
/** Composition-level handoff; never sends a device or acquisition command. */
|
/** Composition-level handoff; never sends a device or acquisition command. */
|
||||||
@@ -12,9 +12,9 @@ export function PlanningCaptureGuard({enabled, onResume, children}: {
|
|||||||
if (!enabled || !planningAwaitsCapture(planning.test)) return <>{children}</>;
|
if (!enabled || !planningAwaitsCapture(planning.test)) return <>{children}</>;
|
||||||
return <div className="mission-planner__check">
|
return <div className="mission-planner__check">
|
||||||
<StatusBadge tone="warning">Исследование ожидает новую запись</StatusBadge>
|
<StatusBadge tone="warning">Исследование ожидает новую запись</StatusBadge>
|
||||||
<p>{planning.test!.draft.name}</p>
|
<Description>{planning.test!.draft.name}</Description>
|
||||||
<p>Для самостоятельной съёмки завершите подготовленное исследование. Запись и подключение сканера не будут остановлены.</p>
|
<Description>Для самостоятельной съёмки завершите подготовленное исследование. Запись и подключение сканера не будут остановлены.</Description>
|
||||||
{planning.error && <p role="alert">{planning.error}</p>}
|
{planning.error && <Description role="alert">{planning.error}</Description>}
|
||||||
<div className="mission-planner__actions">
|
<div className="mission-planner__actions">
|
||||||
<Button loading={planning.busy} onClick={() => void planning.finish()}>Завершить исследование</Button>
|
<Button loading={planning.busy} onClick={() => void planning.finish()}>Завершить исследование</Button>
|
||||||
<Button disabled={planning.busy} onClick={onResume}>Вернуться к исследованию</Button>
|
<Button disabled={planning.busy} onClick={onResume}>Вернуться к исследованию</Button>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useEffect,useState,type ReactNode} from 'react';
|
import {useEffect,useState,type ReactNode} from 'react';
|
||||||
import {Button,LoadingRegion,StatusBadge,Window} from '@nodedc/ui-react';
|
import { Description,Button,LoadingRegion,StatusBadge,Window} from '@nodedc/ui-react';
|
||||||
import {useDevicePluginHost} from '../../core/device-plugins/DevicePluginHost';
|
import {useDevicePluginHost} from '../../core/device-plugins/DevicePluginHost';
|
||||||
import {planningTestTerminal,usePlanningTest} from '../../core/missions/PlanningTestContext';
|
import {planningTestTerminal,usePlanningTest} from '../../core/missions/PlanningTestContext';
|
||||||
|
|
||||||
@@ -15,17 +15,17 @@ export function PlanningConnectionWindow({children}:{children:ReactNode}){
|
|||||||
if(!p.test)return <>{children}</>;
|
if(!p.test)return <>{children}</>;
|
||||||
const t=p.test, terminal=planningTestTerminal(t);
|
const t=p.test, terminal=planningTestTerminal(t);
|
||||||
const details=<><StatusBadge tone="neutral">Профиль · Планирование</StatusBadge>
|
const details=<><StatusBadge tone="neutral">Профиль · Планирование</StatusBadge>
|
||||||
<p>{t.draft.name} · эталон {t.draft.zone.label} · {t.draft.route.length_m.toFixed(1)} м</p>
|
<Description>{t.draft.name} · эталон {t.draft.zone.label} · {t.draft.route.length_m.toFixed(1)} м</Description>
|
||||||
<p>Укажите новое имя проекта сканера. Неподвижная калибровка просматривает весь выбранный маршрут; после калибровки сканера оставайтесь на месте до статуса «Сопровождение». Если совпадение не найдено или неоднозначно, сцена сообщит причину и не начнёт сопровождение.</p></>;
|
<Description>Укажите новое имя проекта сканера. Неподвижная калибровка просматривает весь выбранный маршрут; после калибровки сканера оставайтесь на месте до статуса «Сопровождение». Если совпадение не найдено или неоднозначно, сцена сообщит причину и не начнёт сопровождение.</Description></>;
|
||||||
return <div className="mission-planner__check">
|
return <div className="mission-planner__check">
|
||||||
{details}<p>{t.message}</p>{p.error&&<p role="alert">{p.error}</p>}
|
{details}<Description>{t.message}</Description>{p.error&&<Description role="alert">{p.error}</Description>}
|
||||||
<div className="mission-planner__actions"><Button onClick={()=>setOpen(true)}>Подключение сканера</Button>
|
<div className="mission-planner__actions"><Button onClick={()=>setOpen(true)}>Подключение сканера</Button>
|
||||||
{t.state==='running'&&t.planning_phase==='lost'&&!t.tracking_established&&<Button loading={p.busy} onClick={()=>void p.retryInitialization()}>Переинициализировать</Button>}
|
{t.state==='running'&&t.planning_phase==='lost'&&!t.tracking_established&&<Button loading={p.busy} onClick={()=>void p.retryInitialization()}>Переинициализировать</Button>}
|
||||||
{!terminal&&<Button loading={p.busy} onClick={()=>void p.finish()}>Завершить исследование</Button>}</div>
|
{!terminal&&<Button loading={p.busy} onClick={()=>void p.finish()}>Завершить исследование</Button>}</div>
|
||||||
<Window open={open} title="Подключение сканера · Планирование" size="lg" className="planning-connection" onClose={()=>setOpen(false)}>
|
<Window open={open} title="Подключение сканера · Планирование" size="lg" className="planning-connection" onClose={()=>setOpen(false)}>
|
||||||
<div className="mission-planner__check">{details}
|
<div className="mission-planner__check">{details}
|
||||||
{t.state==='preparing'?<LoadingRegion loading label="Подготовка эталонного участка" />
|
{t.state==='preparing'?<LoadingRegion loading label="Подготовка эталонного участка" />
|
||||||
: terminal?<p>{t.message}</p>:children}
|
: terminal?<Description>{t.message}</Description>:children}
|
||||||
</div>
|
</div>
|
||||||
</Window>
|
</Window>
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Inspector, Icon, StatusBadge } from '@nodedc/ui-react';
|
import { Description, Inspector, Icon, StatusBadge } from '@nodedc/ui-react';
|
||||||
import { planningProjectStatus, type PlanningProjectDetail } from '../../core/missions/planningProjects';
|
import { planningProjectStatus, type PlanningProjectDetail } from '../../core/missions/planningProjects';
|
||||||
|
|
||||||
export function PlanningProjectResult({project:p}:{project:PlanningProjectDetail}) {
|
export function PlanningProjectResult({project:p}:{project:PlanningProjectDetail}) {
|
||||||
const r=p.result;
|
const r=p.result;
|
||||||
return <Inspector variant="panel" defaultOpen={['sources','result']} sections={[
|
return <Inspector variant="panel" defaultOpen={['sources','result']} sections={[
|
||||||
{id:'sources',label:'Проект',icon:<Icon name="file"/>,content:<div className="inspector-control-stack">
|
{id:'sources',label:'Проект',icon:<Icon name="file"/>,content:<div className="inspector-control-stack">
|
||||||
<p>{p.name}</p><small>{new Date(p.created_at_utc).toLocaleString('ru-RU')}</small>
|
<Description>{p.name}</Description><small>{new Date(p.created_at_utc).toLocaleString('ru-RU')}</small>
|
||||||
<dl><div><dt>Эталон</dt><dd>{p.reference_label}</dd></div><div><dt>Повторный проход</dt><dd>{p.query_label??'—'}</dd></div>
|
<dl><div><dt>Эталон</dt><dd>{p.reference_label}</dd></div><div><dt>Повторный проход</dt><dd>{p.query_label??'—'}</dd></div>
|
||||||
<div><dt>Участок эталона</dt><dd>{p.draft.route.length_m.toFixed(2)} м</dd></div></dl>
|
<div><dt>Участок эталона</dt><dd>{p.draft.route.length_m.toFixed(2)} м</dd></div></dl>
|
||||||
</div>},
|
</div>},
|
||||||
@@ -15,7 +15,7 @@ export function PlanningProjectResult({project:p}:{project:PlanningProjectDetail
|
|||||||
<div><dt>Расхождение поверхностей</dt><dd>{r.inlier_rmse_m==null?'—':`${r.inlier_rmse_m.toFixed(3)} м`}</dd></div>
|
<div><dt>Расхождение поверхностей</dt><dd>{r.inlier_rmse_m==null?'—':`${r.inlier_rmse_m.toFixed(3)} м`}</dd></div>
|
||||||
{r.correction_m!=null&&<div><dt>Уточнение привязки</dt><dd>{r.correction_m.toFixed(2)} м · {r.correction_deg.toFixed(1)}°</dd></div>}
|
{r.correction_m!=null&&<div><dt>Уточнение привязки</dt><dd>{r.correction_m.toFixed(2)} м · {r.correction_deg.toFixed(1)}°</dd></div>}
|
||||||
{r.registration_seconds!=null&&<div><dt>Расчёт</dt><dd>{r.registration_seconds.toFixed(2)} с</dd></div>}
|
{r.registration_seconds!=null&&<div><dt>Расчёт</dt><dd>{r.registration_seconds.toFixed(2)} с</dd></div>}
|
||||||
</dl><small>Совпадение поверхностей не является измеренной точностью положения.</small></>:<p>{p.message?`Сохранённое сообщение: ${p.message}`:'Расчёт совмещения ещё не выполнен.'}</p>}
|
</dl><small>Совпадение поверхностей не является измеренной точностью положения.</small></>:<Description>{p.message?`Сохранённое сообщение: ${p.message}`:'Расчёт совмещения ещё не выполнен.'}</Description>}
|
||||||
{p.evidence_relation==='same_recording'&&<small>Оба участка из одной записи: внутренняя проверка общей карты.</small>}
|
{p.evidence_relation==='same_recording'&&<small>Оба участка из одной записи: внутренняя проверка общей карты.</small>}
|
||||||
{p.scene_note&&p.scene_url&&<small>{p.scene_note}</small>}
|
{p.scene_note&&p.scene_url&&<small>{p.scene_note}</small>}
|
||||||
{r?.reasons.map(reason=><small key={reason}>{reason}</small>)}
|
{r?.reasons.map(reason=><small key={reason}>{reason}</small>)}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { ConfirmationModal, Icon, Select, ToastStack } from '@nodedc/ui-react';
|
import { Description, ConfirmationModal, Icon, Select, ToastStack } from '@nodedc/ui-react';
|
||||||
import { planningProjectDeletable, planningProjectStatus, type PlanningProject } from '../../core/missions/planningProjects';
|
import { planningProjectDeletable, planningProjectStatus, type PlanningProject } from '../../core/missions/planningProjects';
|
||||||
|
|
||||||
export function PlanningProjectSelect({items, value, disabled, onChange, onRemove}: {
|
export function PlanningProjectSelect({items, value, disabled, onChange, onRemove}: {
|
||||||
@@ -29,8 +29,8 @@ export function PlanningProjectSelect({items, value, disabled, onChange, onRemov
|
|||||||
<ConfirmationModal open={target !== null} title="Удалить совмещённый маршрут?"
|
<ConfirmationModal open={target !== null} title="Удалить совмещённый маршрут?"
|
||||||
description={target ? <>
|
description={target ? <>
|
||||||
<strong>{target.name}</strong>
|
<strong>{target.name}</strong>
|
||||||
<p>{new Date(target.created_at_utc).toLocaleString('ru-RU')} · {planningProjectStatus(target)}</p>
|
<Description>{new Date(target.created_at_utc).toLocaleString('ru-RU')} · {planningProjectStatus(target)}</Description>
|
||||||
<p>Проект будет удалён из списка совмещённых маршрутов. Эталон, запись прохода и сохранённые отчёты останутся на диске. Другие проекты не изменятся.</p>
|
<Description>Проект будет удалён из списка совмещённых маршрутов. Эталон, запись прохода и сохранённые отчёты останутся на диске. Другие проекты не изменятся.</Description>
|
||||||
</> : null}
|
</> : null}
|
||||||
confirmLabel="Удалить маршрут" pendingLabel="Удаление…" danger
|
confirmLabel="Удалить маршрут" pendingLabel="Удаление…" danger
|
||||||
onClose={() => { if (!busy) setTarget(null); }}
|
onClose={() => { if (!busy) setTarget(null); }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Icon, Inspector, InspectorSelectField, TextField } from '@nodedc/ui-react';
|
import { Description, Button, Icon, Inspector, InspectorSelectField, TextField } from '@nodedc/ui-react';
|
||||||
import { routeLength, canStartPlanningRoute } from '../../core/missions/planner';
|
import { routeLength, canStartPlanningRoute } from '../../core/missions/planner';
|
||||||
import type { useMissionPlanner } from '../../core/missions/useMissionPlanner';
|
import type { useMissionPlanner } from '../../core/missions/useMissionPlanner';
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ export function PlanningProjectSettings({p,onStart,starting}:{
|
|||||||
<div className="inspector-control-stack">
|
<div className="inspector-control-stack">
|
||||||
{p.source&&!routeReady&&<small>В записи недостаточно перемещения для привязки. Выберите другой эталон.</small>}
|
{p.source&&!routeReady&&<small>В записи недостаточно перемещения для привязки. Выберите другой эталон.</small>}
|
||||||
<Button variant="primary" loading={starting} disabled={disabled||!p.ready||!routeReady} onClick={onStart}><Icon name="play"/>Начать новый проход</Button>
|
<Button variant="primary" loading={starting} disabled={disabled||!p.ready||!routeReady} onClick={onStart}><Icon name="play"/>Начать новый проход</Button>
|
||||||
{p.error&&<p role="alert">{p.error}</p>}
|
{p.error&&<Description role="alert">{p.error}</Description>}
|
||||||
</div>
|
</div>
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {Fragment,useEffect,useState} from 'react';
|
|||||||
import {Button,Icon,SettingsCard} from '@nodedc/ui-react';
|
import {Button,Icon,SettingsCard} from '@nodedc/ui-react';
|
||||||
|
|
||||||
type Installer={id:string;label:string;version:string;os:string;filename:string;download_url:string;instructions:string[]};
|
type Installer={id:string;label:string;version:string;os:string;filename:string;download_url:string;instructions:string[]};
|
||||||
export function InstallerCard({kind,connectionInstruction}:{connectionInstruction?:string;kind:'node'|'vps-arnavi'|'vps-wireguard'|'vps-netbird'}){
|
export function InstallerCard({kind,connectionInstruction}:{connectionInstruction?:string;kind:'node'|'vps-arnavi'|'vps-wireguard'|'vps-netbird'|'vps-librespeed'}){
|
||||||
const [item,setItem]=useState<Installer|null>(null),[failed,setFailed]=useState(false);
|
const [item,setItem]=useState<Installer|null>(null),[failed,setFailed]=useState(false);
|
||||||
useEffect(()=>{let active=true;void fetch('/api/v1/fleet/installers',{cache:'no-store'}).then(async r=>{if(!r.ok)throw Error();return r.json() as Promise<{items:Installer[]}>;}).then(v=>{if(active){setItem(v.items.find(i=>i.id===kind)??null);setFailed(!v.items.some(i=>i.id===kind));}}).catch(()=>{if(active)setFailed(true);});return()=>{active=false;};},[kind]);
|
useEffect(()=>{let active=true;void fetch('/api/v1/fleet/installers',{cache:'no-store'}).then(async r=>{if(!r.ok)throw Error();return r.json() as Promise<{items:Installer[]}>;}).then(v=>{if(active){setItem(v.items.find(i=>i.id===kind)??null);setFailed(!v.items.some(i=>i.id===kind));}}).catch(()=>{if(active)setFailed(true);});return()=>{active=false;};},[kind]);
|
||||||
return <SettingsCard title="Установка" description={item?<>{`${item.label} ${item.version} · Только ${item.os}`}<br/><br/>{item.instructions.map((original,index)=>{const step=connectionInstruction&&index===item.instructions.length-1?connectionInstruction:original;return <Fragment key={step}>{index>0&&<br/>}{index+1}. {step}</Fragment>;})}</>:failed?'Установщик пока недоступен в этом Mission Core.':'Получение установщика…'}>
|
return <SettingsCard title="Установка" description={item?<>{`${item.label} ${item.version} · Только ${item.os}`}<br/><br/>{item.instructions.map((original,index)=>{const step=connectionInstruction&&index===item.instructions.length-1?connectionInstruction:original;return <Fragment key={step}>{index>0&&<br/>}{index+1}. {step}</Fragment>;})}</>:failed?'Установщик пока недоступен в этом Mission Core.':'Получение установщика…'}>
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import {useEffect,useRef,useState} from 'react';
|
||||||
|
import {Description,Icon} from '@nodedc/ui-react';
|
||||||
|
import type {SpeedMeasurement} from '../../../../../packages/router-ui/src/contracts';
|
||||||
|
import {speedFraction,speedPoint,speedTrack,speedValues} from './speedGauge';
|
||||||
|
import './routerSpeedGauge.css';
|
||||||
|
|
||||||
|
function useMarker(target:number){
|
||||||
|
const [position,setPosition]=useState(target),last=useRef(target);
|
||||||
|
useEffect(()=>{
|
||||||
|
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches){last.current=target;setPosition(target);return;}
|
||||||
|
const start=performance.now(),from=last.current;let frame=0;
|
||||||
|
function animate(now:number){const t=Math.min(1,(now-start)/650),next=from+(target-from)*(1-Math.pow(1-t,3));last.current=next;setPosition(next);if(t<1)frame=requestAnimationFrame(animate);}
|
||||||
|
frame=requestAnimationFrame(animate);return()=>cancelAnimationFrame(frame);
|
||||||
|
},[target]);
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
const format=(n:number|null)=>n===null?'—':new Intl.NumberFormat('ru-RU',{maximumFractionDigits:1}).format(n/1e6);
|
||||||
|
export function RouterSpeedGauge({measurement,waiting,fresh}:{measurement?:SpeedMeasurement;waiting:boolean;fresh:boolean}){
|
||||||
|
const {down,up}=speedValues(measurement),phase=measurement?.phase;
|
||||||
|
const running=phase==='download'||phase==='upload';
|
||||||
|
const [clock,setClock]=useState(Date.now());
|
||||||
|
useEffect(()=>{if(!running)return;const timer=setInterval(()=>setClock(Date.now()),1000);return()=>clearInterval(timer);},[running]);
|
||||||
|
const stale=running&&(!fresh||!!measurement?.sampled_at&&clock-measurement.sampled_at>6000);
|
||||||
|
const ceiling=Math.max(down??0,up??0)>1e9?1e10:1e9;
|
||||||
|
const active=phase==='upload'?up:down;
|
||||||
|
const marker=speedPoint(useMarker(speedFraction(active??0,ceiling)));
|
||||||
|
const secondary=speedPoint(speedFraction(up??0,ceiling));
|
||||||
|
const state=waiting?'Подготовка замера':stale?'Ожидаем данные борта':phase==='latency'?'Проверяем задержку':phase==='download'?'Измеряем приём':phase==='upload'?'Измеряем передачу':phase==='complete'?'Замер завершён':phase==='cancelled'?'Замер остановлен':phase==='error'?'Замер не завершён':'Готов к замеру';
|
||||||
|
const caption=phase==='download'||phase==='upload'?'Текущая средняя · Мбит/с':'Мбит/с';
|
||||||
|
return <div className="router-speed-visual"><div className="router-speed-state"><Description role="status">{state}</Description></div><figure className="router-speed-gauge" aria-label={`Скорость соединения. ${state}. Приём ${format(down)}, передача ${format(up)} Мбит/с.`}>
|
||||||
|
<svg viewBox="0 0 720 280" aria-hidden="true" className={stale?'router-speed-instrument is-stale':'router-speed-instrument'}>
|
||||||
|
<path d={speedTrack} className="router-speed-track"/>
|
||||||
|
{Array.from({length:121},(_,i)=>{const p=speedPoint(i/120),lit=active!==null&&i/120<=speedFraction(active,ceiling);return <line key={i} x1={p.x} y1={p.y} x2={p.x+p.nx*12} y2={p.y+p.ny*12} className={lit?'router-speed-tick is-lit':'router-speed-tick'}/>;})}
|
||||||
|
{[0,10,100,1000].map(n=>{const p=speedPoint(speedFraction(n*1e6*(ceiling/1e9),ceiling));return <line key={n} x1={p.x} y1={p.y} x2={p.x+p.nx*22} y2={p.y+p.ny*22} className="router-speed-major"/>;})}
|
||||||
|
{active!==null&&<g className="router-speed-marker"><circle cx={marker.x} cy={marker.y} r="11" className="router-speed-halo"/><circle cx={marker.x} cy={marker.y} r="4"/></g>}
|
||||||
|
{phase==='complete'&&up!==null&&<circle cx={secondary.x} cy={secondary.y} r="5" className="router-speed-upload-marker"/>}
|
||||||
|
</svg>
|
||||||
|
{[0,10,100,1000].map(n=>{const p=speedPoint(speedFraction(n*1e6*(ceiling/1e9),ceiling));return <span key={n} className="router-speed-scale" style={{left:`${(p.x-p.nx*22)/720*100}%`,top:`${(p.y-p.ny*22)/280*100}%`}}>{n*(ceiling/1e9)}</span>;})}
|
||||||
|
<figcaption className="router-speed-center">
|
||||||
|
<div className="router-speed-readings">
|
||||||
|
<div data-active={phase==='download'}><span><Icon name="download"/> Приём</span><strong>{format(down)}</strong></div>
|
||||||
|
<div data-active={phase==='upload'}><span><Icon name="upload"/> Передача</span><strong>{format(up)}</strong></div>
|
||||||
|
</div>
|
||||||
|
<Description>{caption}</Description>
|
||||||
|
</figcaption>
|
||||||
|
</figure></div>;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
.router-speed-visual{margin:8px 0}.router-speed-state{text-align:center}
|
||||||
|
.router-speed-gauge{position:relative;width:100%;max-width:600px;aspect-ratio:18/7;margin:0 auto;isolation:isolate;color:var(--nodedc-text-primary)}
|
||||||
|
.router-speed-instrument{display:block;width:100%;height:100%;overflow:visible}
|
||||||
|
.router-speed-track{fill:none;stroke:currentColor;stroke-width:1;opacity:.06}
|
||||||
|
.router-speed-tick{stroke:currentColor;stroke-width:1.4;stroke-linecap:round;opacity:.18;transition:opacity 450ms ease}
|
||||||
|
.router-speed-tick.is-lit{opacity:.8}
|
||||||
|
.router-speed-major{stroke:currentColor;stroke-width:1.5;stroke-linecap:round;opacity:.5}
|
||||||
|
.router-speed-marker{fill:currentColor}
|
||||||
|
.router-speed-halo{opacity:.1}
|
||||||
|
.router-speed-upload-marker{fill:none;stroke:var(--nodedc-text-muted);stroke-width:2}
|
||||||
|
.router-speed-instrument.is-stale{opacity:.45}
|
||||||
|
.router-speed-scale{position:absolute;transform:translate(-50%,-50%);font-size:var(--nodedc-font-size-sm);color:var(--nodedc-text-muted);font-variant-numeric:tabular-nums}
|
||||||
|
.router-speed-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:52%;display:grid;gap:12px;text-align:center}
|
||||||
|
.router-speed-readings{display:grid;grid-template-columns:1fr 1fr;gap:16px}
|
||||||
|
.router-speed-readings>div{display:grid;gap:8px}
|
||||||
|
.router-speed-readings span{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--nodedc-text-muted);font-size:var(--nodedc-font-size-sm)}
|
||||||
|
.router-speed-readings strong{font-size:var(--nodedc-font-size-md);font-weight:600;font-variant-numeric:tabular-nums}
|
||||||
|
.router-speed-readings [data-active=true] span{color:var(--nodedc-text-primary)}
|
||||||
|
@media(max-width:600px){.router-speed-gauge{margin:8px auto}.router-speed-center{gap:6px;width:58%}.router-speed-readings{gap:8px}.router-speed-readings>div{gap:4px}.router-speed-scale{font-size:var(--nodedc-font-size-xs)}}
|
||||||
|
@media(prefers-reduced-motion:reduce){.router-speed-tick{transition:none}}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/** Geometry of the router speed instrument. Values stay measured, only the marker interpolates. */
|
||||||
|
export function speedFraction(bps:number,ceiling=1e9){
|
||||||
|
return Math.log1p(Math.max(0,Math.min(ceiling,bps))/(ceiling/100))/Math.log(101);
|
||||||
|
}
|
||||||
|
export function speedPoint(fraction:number){
|
||||||
|
const radius=95,left=142,right=578,top=45,bottom=235,tail=143,straight=right-left;
|
||||||
|
let d=Math.max(0,Math.min(1,fraction))*(tail*2+Math.PI*radius*2+straight);
|
||||||
|
if(d<=tail)return{x:285-d,y:bottom,nx:0,ny:1};d-=tail;
|
||||||
|
if(d<=Math.PI*radius){const a=Math.PI/2+d/radius;return{x:left+radius*Math.cos(a),y:140+radius*Math.sin(a),nx:Math.cos(a),ny:Math.sin(a)};}d-=Math.PI*radius;
|
||||||
|
if(d<=straight)return{x:left+d,y:top,nx:0,ny:-1};d-=straight;
|
||||||
|
if(d<=Math.PI*radius){const a=-Math.PI/2+d/radius;return{x:right+radius*Math.cos(a),y:140+radius*Math.sin(a),nx:Math.cos(a),ny:Math.sin(a)};}d-=Math.PI*radius;
|
||||||
|
return{x:right-d,y:bottom,nx:0,ny:1};
|
||||||
|
}
|
||||||
|
export const speedTrack='M285 235 H142 A95 95 0 0 1 142 45 H578 A95 95 0 0 1 578 235 H435';
|
||||||
|
export function speedValues(m:{phase:string;current_bps?:number;sampled_at?:number;download_bps:number;upload_bps:number}|undefined){
|
||||||
|
if(!m)return{down:null,up:null};
|
||||||
|
if(m.phase==='complete')return{down:m.download_bps,up:m.upload_bps};
|
||||||
|
if(m.phase==='download')return{down:m.sampled_at?m.current_bps??null:null,up:null};
|
||||||
|
if(m.phase==='upload')return{down:m.download_bps,up:m.sampled_at?m.current_bps??null:null};
|
||||||
|
return{down:null,up:null};
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { ConfirmationModal, Icon, IconButton } from "@nodedc/ui-react";
|
import { Description, ConfirmationModal, Icon, IconButton } from "@nodedc/ui-react";
|
||||||
import type { ObservatoryRecordedJob } from "../../core/observatory/recordedJobs";
|
import type { ObservatoryRecordedJob } from "../../core/observatory/recordedJobs";
|
||||||
import { deleteFailedRunProjection } from "../../core/observatory/failedRunHistory";
|
import { deleteFailedRunProjection } from "../../core/observatory/failedRunHistory";
|
||||||
|
|
||||||
@@ -15,8 +15,8 @@ export function FailedRunActions({ job, onDeleted }: {
|
|||||||
<Icon name="trash" size={16} />
|
<Icon name="trash" size={16} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<ConfirmationModal open={open} title="Удалить ошибочную попытку?"
|
<ConfirmationModal open={open} title="Удалить ошибочную попытку?"
|
||||||
description={<><p>Попытка и её рабочие файлы будут удалены с этого устройства и Worker. Исходная запись сохранится.</p>
|
description={<><Description>Попытка и её рабочие файлы будут удалены с этого устройства и Worker. Исходная запись сохранится.</Description>
|
||||||
{error ? <p role="alert">{error}</p> : null}</>}
|
{error ? <Description role="alert">{error}</Description> : null}</>}
|
||||||
confirmLabel="Удалить попытку" pendingLabel="Удаляем…" danger
|
confirmLabel="Удалить попытку" pendingLabel="Удаляем…" danger
|
||||||
onClose={() => { if (!pending) setOpen(false); }}
|
onClose={() => { if (!pending) setOpen(false); }}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
import {Button,StatusBadge} from '@nodedc/ui-react';
|
import { Description,Button,StatusBadge} from '@nodedc/ui-react';
|
||||||
import type {RoverDiagnostics} from '../../core/fleet/useRoverDiagnostics';
|
import type {RoverDiagnostics} from '../../core/fleet/useRoverDiagnostics';
|
||||||
import type {ObservationHeaderTargets} from '../../../../../packages/sensor-ui/src/observation';
|
import type {ObservationHeaderTargets} from '../../../../../packages/sensor-ui/src/observation';
|
||||||
import './roverLogs.css';
|
import './roverLogs.css';
|
||||||
@@ -11,11 +11,11 @@ export function RoverLogs({capture,header}:{capture:RoverDiagnostics;header:Obse
|
|||||||
|
|
||||||
<div className="rover-logs">
|
<div className="rover-logs">
|
||||||
<div className="rover-logs__actions"><Button disabled={!storage?.file} loading={capture.saving} onClick={()=>void capture.save()}>Сохранить с борта</Button>{capture.state.local_capture?.id&&<Button loading={capture.saving} onClick={()=>void capture.saveLocal()}>Сохранить с компьютера</Button>}</div>
|
<div className="rover-logs__actions"><Button disabled={!storage?.file} loading={capture.saving} onClick={()=>void capture.save()}>Сохранить с борта</Button>{capture.state.local_capture?.id&&<Button loading={capture.saving} onClick={()=>void capture.saveLocal()}>Сохранить с компьютера</Button>}</div>
|
||||||
<p>{status} · {storage?.written??0} записей{storage?.dropped?` · Потеряно при записи: ${storage.dropped}`:''}</p>
|
<Description>{status} · {storage?.written??0} записей{storage?.dropped?` · Потеряно при записи: ${storage.dropped}`:''}</Description>
|
||||||
{storage?.file&&<p title={storage.file}>{storage.file}</p>}
|
{storage?.file&&<Description title={storage.file}>{storage.file}</Description>}
|
||||||
{failed&&<p role="alert">Файл может быть неполным: {failed}</p>}
|
{failed&&<Description role="alert">Файл может быть неполным: {failed}</Description>}
|
||||||
<p>{capture.state.options?.live===false?'События записываются локально; live-передача отключена.':'Последние события онлайн.'} «Сохранить с борта» выгружает полный бортовой файл. Закрытие окна не завершает запись.</p>
|
<Description>{capture.state.options?.live===false?'События записываются локально; live-передача отключена.':'Последние события онлайн.'} «Сохранить с борта» выгружает полный бортовой файл. Закрытие окна не завершает запись.</Description>
|
||||||
{capture.state.local_capture?.id&&<p>Замер компьютера: {capture.state.local_capture.active?'идёт запись':'завершён'} · {capture.state.local_capture.sequence??0} событий{capture.state.local_capture.dropped?` · Пропущено: ${capture.state.local_capture.dropped}`:''}. Сохраните до перезапуска Core.</p>}
|
{capture.state.local_capture?.id&&<Description>Замер компьютера: {capture.state.local_capture.active?'идёт запись':'завершён'} · {capture.state.local_capture.sequence??0} событий{capture.state.local_capture.dropped?` · Пропущено: ${capture.state.local_capture.dropped}`:''}. Сохраните до перезапуска Core.</Description>}
|
||||||
<div className="rover-logs__entries" role="log" aria-live="off" aria-label="События DEV-сессии">
|
<div className="rover-logs__entries" role="log" aria-live="off" aria-label="События DEV-сессии">
|
||||||
{[...capture.rows].reverse().map(item=>{const row=item.record??item;return <pre key={item.record_sequence}>{JSON.stringify(row,null,2)}</pre>;})}
|
{[...capture.rows].reverse().map(item=>{const row=item.record??item;return <pre key={item.record_sequence}>{JSON.stringify(row,null,2)}</pre>;})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {roverModelID} from '../../core/roverScene/model';
|
import {roverModelID} from '../../core/roverScene/model';
|
||||||
import {lazy,Suspense,useCallback,useEffect,useRef,useState} from 'react';
|
import {lazy,Suspense,useCallback,useEffect,useRef,useState} from 'react';
|
||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
import {Button,EditorWorkspace,Icon,IconButton,KeyButton,LoadingRegion,Select,StatusBadge,TextField,ToastStack,Window} from '@nodedc/ui-react';
|
import { Description,Button,EditorWorkspace,Icon,IconButton,KeyButton,LoadingRegion,Select,StatusBadge,TextField,ToastStack,Window} from '@nodedc/ui-react';
|
||||||
import {keysFor,roverSettings,roverNumberInput,persistableRoverSettings,type RoverMode} from '../../core/fleet/roverInput';
|
import {keysFor,roverSettings,roverNumberInput,persistableRoverSettings,type RoverMode} from '../../core/fleet/roverInput';
|
||||||
import {roverDevEvent} from '../../core/fleet/roverDevEvents';
|
import {roverDevEvent} from '../../core/fleet/roverDevEvents';
|
||||||
import {bindRoverHoldInput} from '../../core/fleet/roverHoldInput';
|
import {bindRoverHoldInput} from '../../core/fleet/roverHoldInput';
|
||||||
@@ -60,7 +60,7 @@ export function RoverView({vehicleID,name,controller:c,header,active,observation
|
|||||||
{settings.model===roverModelID?<LoadingRegion className="rover-view__scene" loading={modelState==='loading'||c.recovering} label={c.recovering?'Восстанавливаем связь':'Загрузка модели ровера'}>
|
{settings.model===roverModelID?<LoadingRegion className="rover-view__scene" loading={modelState==='loading'||c.recovering} label={c.recovering?'Восстанавливаем связь':'Загрузка модели ровера'}>
|
||||||
<Suspense fallback={null}><Scene key={vehicleID} vehicleID={vehicleID} editing={editing&&active} onModelState={setModelState}/></Suspense>
|
<Suspense fallback={null}><Scene key={vehicleID} vehicleID={vehicleID} editing={editing&&active} onModelState={setModelState}/></Suspense>
|
||||||
{modelState==='error'&&<p className="rover-view__empty">Не удалось загрузить модель ровера.</p>}
|
{modelState==='error'&&<p className="rover-view__empty">Не удалось загрузить модель ровера.</p>}
|
||||||
</LoadingRegion>:<div className="rover-view__empty"><p>Выберите модель аппарата.</p><Button onClick={showSettings}>Настройки вида</Button></div>}
|
</LoadingRegion>:<div className="rover-view__empty"><Description>Выберите модель аппарата.</Description><Button onClick={showSettings}>Настройки вида</Button></div>}
|
||||||
{c.ready&&!editing&&<div className="rover-view__controls">
|
{c.ready&&!editing&&<div className="rover-view__controls">
|
||||||
<div className={`rover-keys rover-keys--${settings.mode}`} aria-label={settings.mode==='arcade'?'Аркадное управление':'Танковое управление'}>
|
<div className={`rover-keys rover-keys--${settings.mode}`} aria-label={settings.mode==='arcade'?'Аркадное управление':'Танковое управление'}>
|
||||||
{keysFor(settings.mode).map(code=><KeyButton key={code} className={`rover-key-${code}`} label={settings.mode==='arcade'?({KeyW:'Вперёд · W',KeyS:'Назад · S',KeyA:'Налево · A',KeyD:'Направо · D'}[code]??code):({KeyQ:'Левая сторона вперёд · Q',KeyA:'Левая сторона назад · A',KeyE:'Правая сторона вперёд · E',KeyD:'Правая сторона назад · D'}[code]??code)}
|
{keysFor(settings.mode).map(code=><KeyButton key={code} className={`rover-key-${code}`} label={settings.mode==='arcade'?({KeyW:'Вперёд · W',KeyS:'Назад · S',KeyA:'Налево · A',KeyD:'Направо · D'}[code]??code):({KeyQ:'Левая сторона вперёд · Q',KeyA:'Левая сторона назад · A',KeyE:'Правая сторона вперёд · E',KeyD:'Правая сторона назад · D'}[code]??code)}
|
||||||
@@ -81,7 +81,7 @@ export function RoverView({vehicleID,name,controller:c,header,active,observation
|
|||||||
<TextField label="Скорость, ERPM" hint="300–3000" description="Электрические обороты двигателя. Скорость по земле требует параметров трансмиссии." type="number" min={300} max={3000} step={100} value={Number.isFinite(settings.maxErpm)?settings.maxErpm:''} onChange={e=>setSettings(v=>({...v,maxErpm:roverNumberInput(e.target.value)}))}/>}
|
<TextField label="Скорость, ERPM" hint="300–3000" description="Электрические обороты двигателя. Скорость по земле требует параметров трансмиссии." type="number" min={300} max={3000} step={100} value={Number.isFinite(settings.maxErpm)?settings.maxErpm:''} onChange={e=>setSettings(v=>({...v,maxErpm:roverNumberInput(e.target.value)}))}/>}
|
||||||
<TextField label="Предел тока каждого мотора, А" description={currentDescription} type="number" min={.5} step={.5} value={Number.isFinite(settings.currentA)?settings.currentA:''} onChange={e=>setSettings(v=>({...v,currentA:roverNumberInput(e.target.value)}))}/>
|
<TextField label="Предел тока каждого мотора, А" description={currentDescription} type="number" min={.5} step={.5} value={Number.isFinite(settings.currentA)?settings.currentA:''} onChange={e=>setSettings(v=>({...v,currentA:roverNumberInput(e.target.value)}))}/>
|
||||||
{(availability||c.error)&&<StatusBadge tone="warning">{availability||c.error}</StatusBadge>}
|
{(availability||c.error)&&<StatusBadge tone="warning">{availability||c.error}</StatusBadge>}
|
||||||
<p>Включайте управление на остановленном аппарате. Движение — только при удержании клавиш или кнопок. При уходе из окна команда снимается. После восстановления связи для движения нажмите клавишу заново. Команда с пульта прекращает удалённое управление.</p>
|
<Description>Включайте управление на остановленном аппарате. Движение — только при удержании клавиш или кнопок. При уходе из окна команда снимается. После восстановления связи для движения нажмите клавишу заново. Команда с пульта прекращает удалённое управление.</Description>
|
||||||
<Button variant="primary" tone="neutral" disabled={!c.canArm||!!observing.label||!(Number.isFinite(settings.currentA)&&settings.currentA>=.5&&speedValid)} loading={c.pending}
|
<Button variant="primary" tone="neutral" disabled={!c.canArm||!!observing.label||!(Number.isFinite(settings.currentA)&&settings.currentA>=.5&&speedValid)} loading={c.pending}
|
||||||
onClick={async()=>{roverDevEvent(`/api/v1/fleet/${encodeURIComponent(vehicleID)}/rover`,'settings',{mode:settings.mode,current_a:settings.currentA,speed:duty?settings.throttlePercent:settings.maxErpm,control_mode:duty?'duty':'rpm'});const acquired=await c.arm(settings.currentA,duty?settings.throttlePercent:settings.maxErpm,duty?'duty':'rpm');if(acquired){focusAfterArm.current=true;setOpen(false);}}}>Включить управление</Button>
|
onClick={async()=>{roverDevEvent(`/api/v1/fleet/${encodeURIComponent(vehicleID)}/rover`,'settings',{mode:settings.mode,current_a:settings.currentA,speed:duty?settings.throttlePercent:settings.maxErpm,control_mode:duty?'duty':'rpm'});const acquired=await c.arm(settings.currentA,duty?settings.throttlePercent:settings.maxErpm,duty?'duty':'rpm');if(acquired){focusAfterArm.current=true;setOpen(false);}}}>Включить управление</Button>
|
||||||
</div></Window>
|
</div></Window>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.nodedc-icon-button > .rover-dev-label {color:inherit;font-size:var(--nodedc-font-size-xs);font-weight:var(--nodedc-font-weight-medium);}
|
.nodedc-icon-button > .rover-dev-label {color:inherit;font-size:var(--nodedc-font-size-xs);font-weight:var(--nodedc-font-weight-medium);}
|
||||||
.rover-logs {height:100%;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:var(--nodedc-space-2);padding:calc(var(--observation-overlay-header-space, 0px) + var(--nodedc-space-3)) var(--nodedc-space-3) var(--nodedc-space-3);}
|
.rover-logs {height:100%;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:var(--nodedc-space-2);padding:calc(var(--observation-overlay-header-space, 0px) + var(--nodedc-space-3)) var(--nodedc-space-3) var(--nodedc-space-3);}
|
||||||
.rover-logs > p {margin:0;font-size:var(--nodedc-font-size-xs);color:var(--nodedc-text-secondary);overflow-wrap:anywhere;}
|
.rover-logs > p {margin:0;font-size:var(--nodedc-font-size-sm);color:var(--nodedc-text-secondary);overflow-wrap:anywhere;}
|
||||||
.rover-logs__entries {flex:1;min-height:0;overflow:auto;}
|
.rover-logs__entries {flex:1;min-height:0;overflow:auto;}
|
||||||
.rover-logs__entries pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--nodedc-font-size-xs);color:var(--nodedc-text-primary);}
|
.rover-logs__entries pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--nodedc-font-size-xs);color:var(--nodedc-text-primary);}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { SimulationViewTools } from "./SimulationViewTools";
|
|||||||
import { usePlannerPreferences } from "./usePlannerPreferences";
|
import { usePlannerPreferences } from "./usePlannerPreferences";
|
||||||
import { useEffect, useReducer, useRef, useState } from "react";
|
import { useEffect, useReducer, useRef, useState } from "react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { Button, FieldFrame, Icon, IconButton, LoadingRegion, RangeControl, Select, SegmentedControl, SegmentedGroup, SegmentedButton, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Button, FieldFrame, Icon, IconButton, LoadingRegion, RangeControl, Select, SegmentedControl, SegmentedGroup, SegmentedButton, StatusBadge } from "@nodedc/ui-react";
|
||||||
import { type EditorCache } from "../../core/simulation/aiEditor";
|
import { type EditorCache } from "../../core/simulation/aiEditor";
|
||||||
import type { AiWaypoint, AiWorld } from "../../core/simulation/aiPolygon";
|
import type { AiWaypoint, AiWorld } from "../../core/simulation/aiPolygon";
|
||||||
import { AiEditorRuntime, type EditorMarker } from "./AiEditorRuntime";
|
import { AiEditorRuntime, type EditorMarker } from "./AiEditorRuntime";
|
||||||
@@ -140,7 +140,7 @@ export function AiLocalPlanner({ world, initialPoints, onDraft, actionsHost, hea
|
|||||||
</>}
|
</>}
|
||||||
<div className="ai-polygon__telemetry-row ai-polygon__telemetry-row--local">
|
<div className="ai-polygon__telemetry-row ai-polygon__telemetry-row--local">
|
||||||
<StatusBadge tone={ready ? "success" : "neutral"}>{ready ? modeLabels[sceneMode] : message}</StatusBadge>
|
<StatusBadge tone={ready ? "success" : "neutral"}>{ready ? modeLabels[sceneMode] : message}</StatusBadge>
|
||||||
{planning?<p>{preparedRoute?`${preparedRoute.length_m.toFixed(1)} м · маршрут — ориентир, препятствия оцениваются при движении`:`${points.length} точек · первая — старт, последняя — финиш`}</p>:null}
|
{planning?<Description>{preparedRoute?`${preparedRoute.length_m.toFixed(1)} м · маршрут — ориентир, препятствия оцениваются при движении`:`${points.length} точек · первая — старт, последняя — финиш`}</Description>:null}
|
||||||
</div>
|
</div>
|
||||||
<div className="ai-polygon__viewer">
|
<div className="ai-polygon__viewer">
|
||||||
<div ref={viewport} className="ai-polygon__viewport ai-local-editor" onContextMenu={(e)=>e.preventDefault()}
|
<div ref={viewport} className="ai-polygon__viewport ai-local-editor" onContextMenu={(e)=>e.preventDefault()}
|
||||||
@@ -229,8 +229,8 @@ export function AiLocalPlanner({ world, initialPoints, onDraft, actionsHost, hea
|
|||||||
min={runtime.current!.height[0]} max={runtime.current!.height[1]} step="any" value={clip??runtime.current!.height}
|
min={runtime.current!.height[0]} max={runtime.current!.height[1]} step="any" value={clip??runtime.current!.height}
|
||||||
formatValue={(v)=>sceneClipLabel(v,runtime.current!.height)} formatLimit={(v)=>sceneClipLabel(v,runtime.current!.height)}
|
formatValue={(v)=>sceneClipLabel(v,runtime.current!.height)} formatLimit={(v)=>sceneClipLabel(v,runtime.current!.height)}
|
||||||
onChange={(v)=>{const view=runtime.current!;view.setClip(v[1],v[0]);setClip(sceneClipRange(view.snapshotView().clip,view.height));}}/></div>
|
onChange={(v)=>{const view=runtime.current!;view.setClip(v[1],v[0]);setClip(sceneClipRange(view.snapshotView().clip,view.height));}}/></div>
|
||||||
{error?<div className="ai-route__tools"><p role="alert">{error}</p></div>:null}</>:null}
|
{error?<div className="ai-route__tools"><Description role="alert">{error}</Description></div>:null}</>:null}
|
||||||
{error && !ready ? <div className="ai-polygon__preview-error"><p role="alert">{error}</p><Button onClick={()=>setRetry(retry+1)}>Повторить загрузку</Button></div>:null}
|
{error && !ready ? <div className="ai-polygon__preview-error"><Description role="alert">{error}</Description><Button onClick={()=>setRetry(retry+1)}>Повторить загрузку</Button></div>:null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useInfrastructureQueue } from "../../core/simulation/infrastructureAnalysis";
|
import { useInfrastructureQueue } from "../../core/simulation/infrastructureAnalysis";
|
||||||
import { Button, ConfirmationModal, Icon, IconButton, ResourceList, ResourceRow,
|
import { Description, Button, ConfirmationModal, Icon, IconButton, ResourceList, ResourceRow,
|
||||||
StatusBadge, TextField, ToastStack, Window, WindowFooterActions } from "@nodedc/ui-react";
|
StatusBadge, TextField, ToastStack, Window, WindowFooterActions } from "@nodedc/ui-react";
|
||||||
import { updateAiWorld, type AiWorld } from "../../core/simulation/aiPolygon";
|
import { updateAiWorld, type AiWorld } from "../../core/simulation/aiPolygon";
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ export function AiLocationCatalog({worlds, removedWorlds, activeWorldId, paused,
|
|||||||
</WindowFooterActions>}>
|
</WindowFooterActions>}>
|
||||||
<TextField label="Название локации" value={name} maxLength={120} disabled={!!busy}
|
<TextField label="Название локации" value={name} maxLength={120} disabled={!!busy}
|
||||||
onChange={event => setName(event.target.value)}/>
|
onChange={event => setName(event.target.value)}/>
|
||||||
{editing?.world_id === activeWorldId ? <p>Удаление станет доступно после завершения симуляции.</p> : null}
|
{editing?.world_id === activeWorldId ? <Description>Удаление станет доступно после завершения симуляции.</Description> : null}
|
||||||
</Window>
|
</Window>
|
||||||
<ConfirmationModal open={!!editing && confirming} title="Удалить локацию?" danger
|
<ConfirmationModal open={!!editing && confirming} title="Удалить локацию?" danger
|
||||||
description={<>«{editing?.name}» исчезнет из доступных локаций. Исходный скан, разметка и задания сохранятся.
|
description={<>«{editing?.name}» исчезнет из доступных локаций. Исходный скан, разметка и задания сохранятся.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, TextField, Window, WindowFooterActions } from "@nodedc/ui-react";
|
import { Description, Button, TextField, Window, WindowFooterActions } from "@nodedc/ui-react";
|
||||||
|
|
||||||
export function AiPlanSaveWindow({name,onName,busy,launch,onClose,onSave,error}: {
|
export function AiPlanSaveWindow({name,onName,busy,launch,onClose,onSave,error}: {
|
||||||
error:string|null;name:string;onName:(name:string)=>void;busy:boolean;launch:boolean;
|
error:string|null;name:string;onName:(name:string)=>void;busy:boolean;launch:boolean;
|
||||||
@@ -9,9 +9,9 @@ export function AiPlanSaveWindow({name,onName,busy,launch,onClose,onSave,error}:
|
|||||||
footer={<WindowFooterActions><Button variant="primary" loading={busy} disabled={!name.trim()}
|
footer={<WindowFooterActions><Button variant="primary" loading={busy} disabled={!name.trim()}
|
||||||
onClick={onSave}>{launch?"Сохранить и запустить":"Сохранить"}</Button></WindowFooterActions>}>
|
onClick={onSave}>{launch?"Сохранить и запустить":"Сохранить"}</Button></WindowFooterActions>}>
|
||||||
<div className="ai-polygon__form">
|
<div className="ai-polygon__form">
|
||||||
{error?<p role="alert">{error}</p>:null}
|
{error?<Description role="alert">{error}</Description>:null}
|
||||||
<TextField label="Название задания" value={name} maxLength={120} disabled={busy} onChange={(e)=>onName(e.target.value)}/>
|
<TextField label="Название задания" value={name} maxLength={120} disabled={busy} onChange={(e)=>onName(e.target.value)}/>
|
||||||
<p>Сохраняются текущие точки маршрута и выбранный ровер. Задание появится в списке над сценой.</p>
|
<Description>Сохраняются текущие точки маршрута и выбранный ровер. Задание появится в списке над сценой.</Description>
|
||||||
</div>
|
</div>
|
||||||
</Window>;
|
</Window>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useRef, useState, type PointerEvent } from "react";
|
import { useEffect, useRef, useState, type PointerEvent } from "react";
|
||||||
import { Button, RangeControl, SegmentedControl } from "@nodedc/ui-react";
|
import { Description, Button, RangeControl, SegmentedControl } from "@nodedc/ui-react";
|
||||||
import { type AiRun, type ScreenPoint } from "../../core/simulation/aiPolygon";
|
import { type AiRun, type ScreenPoint } from "../../core/simulation/aiPolygon";
|
||||||
import { useAiPlanningControls } from "./useAiPlanningControls";
|
import { useAiPlanningControls } from "./useAiPlanningControls";
|
||||||
|
|
||||||
@@ -133,8 +133,8 @@ export function AiRouteOverlay({ run, onChange, videoReady, visible = true }: {
|
|||||||
<Button disabled={!ready || !data?.markers.some((m) => m.id === selected)} onClick={() => send({ action: "delete", point_id: selected! })}>Удалить точку</Button>
|
<Button disabled={!ready || !data?.markers.some((m) => m.id === selected)} onClick={() => send({ action: "delete", point_id: selected! })}>Удалить точку</Button>
|
||||||
<Button disabled={!ready || !draft?.can_undo} onClick={() => send({ action: "undo" })}>Отменить</Button>
|
<Button disabled={!ready || !draft?.can_undo} onClick={() => send({ action: "undo" })}>Отменить</Button>
|
||||||
<Button disabled={!cameraReady} onClick={() => send({ action: "home" })}>К началу маршрута</Button>
|
<Button disabled={!cameraReady} onClick={() => send({ action: "home" })}>К началу маршрута</Button>
|
||||||
<p>Мышь — взгляд · Shift + мышь — сдвиг · Колесо — приближение · WASD / стрелки — полёт · Q / E — вниз / вверх · Shift — быстрее</p>
|
<Description>Мышь — взгляд · Shift + мышь — сдвиг · Колесо — приближение · WASD / стрелки — полёт · Q / E — вниз / вверх · Shift — быстрее</Description>
|
||||||
{error || draft?.error ? <p role="alert">{error ?? draft?.error}</p> : null}
|
{error || draft?.error ? <Description role="alert">{error ?? draft?.error}</Description> : null}
|
||||||
</div> : null}
|
</div> : null}
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Inspector, Icon, GlassSurface, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Inspector, Icon, GlassSurface, StatusBadge } from "@nodedc/ui-react";
|
||||||
import type { AiModules, AiRun } from "../../core/simulation/aiPolygon";
|
import type { AiModules, AiRun } from "../../core/simulation/aiPolygon";
|
||||||
|
|
||||||
import { AiSessionSection, useSessionLayout } from "./AiSessionSection";
|
import { AiSessionSection, useSessionLayout } from "./AiSessionSection";
|
||||||
@@ -32,11 +32,11 @@ export function AiRunReport({ runs, modules, onRemove, removing, worldId }: { wo
|
|||||||
action:{label:`Удалить прогон ${new Date(run.created_at ?? "").toLocaleString("ru-RU")}`,
|
action:{label:`Удалить прогон ${new Date(run.created_at ?? "").toLocaleString("ru-RU")}`,
|
||||||
icon:<Icon name="trash"/>,disabled:removing!==null || !["completed","stopped","failed"].includes(run.state),
|
icon:<Icon name="trash"/>,disabled:removing!==null || !["completed","stopped","failed"].includes(run.state),
|
||||||
onAction:()=>onRemove(run)},
|
onAction:()=>onRemove(run)},
|
||||||
}))}/> : <p>В этой локации ещё нет прогонов.</p>}
|
}))}/> : <Description>В этой локации ещё нет прогонов.</Description>}
|
||||||
</AiSessionSection>;
|
</AiSessionSection>;
|
||||||
}
|
}
|
||||||
function RunDetails({run}:{run:AiRun}) {
|
function RunDetails({run}:{run:AiRun}) {
|
||||||
if(!run.report)return <p>{run.message ?? "Отчёт появится после завершения прогона."}</p>;
|
if(!run.report)return <Description>{run.message ?? "Отчёт появится после завершения прогона."}</Description>;
|
||||||
const report=run.report;
|
const report=run.report;
|
||||||
return <div className="ai-polygon__form ai-polygon__report">
|
return <div className="ai-polygon__form ai-polygon__report">
|
||||||
<StatusBadge tone={report.mission_outcome === "goal-reached" ? "success" : "neutral"}>
|
<StatusBadge tone={report.mission_outcome === "goal-reached" ? "success" : "neutral"}>
|
||||||
@@ -60,8 +60,8 @@ function RunDetails({run}:{run:AiRun}) {
|
|||||||
<h3>Остановки после начала движения</h3>
|
<h3>Остановки после начала движения</h3>
|
||||||
{report.stops.length ? <dl>{report.stops.map((stop) => <div key={stop.reason}>
|
{report.stops.length ? <dl>{report.stops.map((stop) => <div key={stop.reason}>
|
||||||
<dt>{reasons[stop.reason] ?? stop.reason}</dt><dd>{stop.events} · {stop.seconds.toFixed(1)} с</dd>
|
<dt>{reasons[stop.reason] ?? stop.reason}</dt><dd>{stop.events} · {stop.seconds.toFixed(1)} с</dd>
|
||||||
</div>)}</dl> : <p>Переходов от движения к нулевой команде не записано.</p>}
|
</div>)}</dl> : <Description>Переходов от движения к нулевой команде не записано.</Description>}
|
||||||
<p>Исходные кадры и телеметрия хранятся на Worker. Архив: {report.evidence_files} файлов, {(report.evidence_bytes / 1024 ** 2).toFixed(1)} МБ.</p>
|
<Description>Исходные кадры и телеметрия хранятся на Worker. Архив: {report.evidence_files} файлов, {(report.evidence_bytes / 1024 ** 2).toFixed(1)} МБ.</Description>
|
||||||
<dl className="ai-polygon__report-identities">
|
<dl className="ai-polygon__report-identities">
|
||||||
<div><dt>Прогон</dt><dd>{report.run_id}</dd></div>
|
<div><dt>Прогон</dt><dd>{report.run_id}</dd></div>
|
||||||
<div><dt>Профиль ровера</dt><dd>{report.robot_sha256 ?? "Не записан"}</dd></div>
|
<div><dt>Профиль ровера</dt><dd>{report.robot_sha256 ?? "Не записан"}</dd></div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { StatusBadge } from "@nodedc/ui-react";
|
import { Description, StatusBadge } from "@nodedc/ui-react";
|
||||||
import { type AiRun } from "../../core/simulation/aiPolygon";
|
import { type AiRun } from "../../core/simulation/aiPolygon";
|
||||||
|
|
||||||
const STATES: Record<AiRun["state"], string> = {
|
const STATES: Record<AiRun["state"], string> = {
|
||||||
@@ -51,6 +51,6 @@ export function AiRunView({ run }: { run: AiRun }) {
|
|||||||
<dt>{label}</dt><dd>{value}</dd>
|
<dt>{label}</dt><dd>{value}</dd>
|
||||||
</div>)}
|
</div>)}
|
||||||
</dl>
|
</dl>
|
||||||
{run.state === "failed" && run.message ? <p>{run.message}</p> : null}
|
{run.state === "failed" && run.message ? <Description>{run.message}</Description> : null}
|
||||||
</section>;
|
</section>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useCallback, useRef, useState, type ReactNode } from "react";
|
import { useCallback, useRef, useState, type ReactNode } from "react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { Button, Checker, Dropdown, Icon, IconButton, LoadingRegion, Select, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Button, Checker, Dropdown, Icon, IconButton, LoadingRegion, Select, StatusBadge } from "@nodedc/ui-react";
|
||||||
import { setAiCamera, type AiCamera, type AiRun, type AiWorld } from "../../core/simulation/aiPolygon";
|
import { setAiCamera, type AiCamera, type AiRun, type AiWorld } from "../../core/simulation/aiPolygon";
|
||||||
import { WorkerVideo, type WorkerVideoState } from "./WorkerVideo";
|
import { WorkerVideo, type WorkerVideoState } from "./WorkerVideo";
|
||||||
import { AiRouteOverlay } from "./AiRouteOverlay";
|
import { AiRouteOverlay } from "./AiRouteOverlay";
|
||||||
@@ -60,7 +60,7 @@ export function AiWorldStream({ world, run, onBack, onChange, controls, headerAc
|
|||||||
video={<div className="ai-polygon__viewport ai-polygon__stream-bounds" ref={surface} tabIndex={0} aria-label="Управление камерой симуляции">
|
video={<div className="ai-polygon__viewport ai-polygon__stream-bounds" ref={surface} tabIndex={0} aria-label="Управление камерой симуляции">
|
||||||
<div className="ai-polygon__stream-picture">
|
<div className="ai-polygon__stream-picture">
|
||||||
{connectable ? <span className="ai-polygon__stream-fps">{state === "live" ? `Видео · ${fps?.toFixed(0) ?? "—"} FPS` : state === "failed" ? "Видео недоступно" : "Подключаем видео"}</span> : null}
|
{connectable ? <span className="ai-polygon__stream-fps">{state === "live" ? `Видео · ${fps?.toFixed(0) ?? "—"} FPS` : state === "failed" ? "Видео недоступно" : "Подключаем видео"}</span> : null}
|
||||||
{cameraError ? <p role="alert">Не удалось переключить камеру.</p> : null}
|
{cameraError ? <Description role="alert">Не удалось переключить камеру.</Description> : null}
|
||||||
<LoadingRegion loading={!terminal && (!connectable || state === "connecting")}
|
<LoadingRegion loading={!terminal && (!connectable || state === "connecting")}
|
||||||
label={run?.state === "disconnected" ? "Восстанавливаем связь с Worker" : !connectable ? "Подготавливаем сцену на Worker" : "Подключаем видео"}>
|
label={run?.state === "disconnected" ? "Восстанавливаем связь с Worker" : !connectable ? "Подготавливаем сцену на Worker" : "Подключаем видео"}>
|
||||||
<div className="ai-polygon__video" inert>
|
<div className="ai-polygon__video" inert>
|
||||||
@@ -69,9 +69,9 @@ export function AiWorldStream({ world, run, onBack, onChange, controls, headerAc
|
|||||||
</div>
|
</div>
|
||||||
</LoadingRegion>
|
</LoadingRegion>
|
||||||
{!terminal && run && run.telemetry?.route_overlay ? <AiRouteOverlay key={run.run_id} run={run} onChange={onChange} videoReady={state === "live"} visible={routeVisible} /> : null}
|
{!terminal && run && run.telemetry?.route_overlay ? <AiRouteOverlay key={run.run_id} run={run} onChange={onChange} videoReady={state === "live"} visible={routeVisible} /> : null}
|
||||||
{terminal ? <div className="ai-polygon__preview-error"><p>{run?.state === "failed" ? run.message ?? "Симуляция прервана." : "Симуляция завершена."}</p></div>
|
{terminal ? <div className="ai-polygon__preview-error"><Description>{run?.state === "failed" ? run.message ?? "Симуляция прервана." : "Симуляция завершена."}</Description></div>
|
||||||
: connectable && state === "failed" ? <div className="ai-polygon__preview-error" role="status">
|
: connectable && state === "failed" ? <div className="ai-polygon__preview-error" role="status">
|
||||||
<p>Не удалось получить видео после повторных подключений. Если сцена открыта в другой вкладке, закройте её и подключитесь снова.</p>
|
<Description>Не удалось получить видео после повторных подключений. Если сцена открыта в другой вкладке, закройте её и подключитесь снова.</Description>
|
||||||
<Button onClick={() => {setState("connecting");setRevision((value) => value + 1);}}>Подключить видео</Button>
|
<Button onClick={() => {setState("connecting");setRevision((value) => value + 1);}}>Подключить видео</Button>
|
||||||
</div> : null}
|
</div> : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { SimulationViewTools } from "./SimulationViewTools";
|
|||||||
import { usePlannerPreferences } from "./usePlannerPreferences";
|
import { usePlannerPreferences } from "./usePlannerPreferences";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { Button, GlassSurface, LoadingRegion, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Button, GlassSurface, LoadingRegion, StatusBadge } from "@nodedc/ui-react";
|
||||||
import type { AiRobot, AiWorld } from "../../core/simulation/aiPolygon";
|
import type { AiRobot, AiWorld } from "../../core/simulation/aiPolygon";
|
||||||
import type { RoverSettings } from "../../core/simulation/roverSettings";
|
import type { RoverSettings } from "../../core/simulation/roverSettings";
|
||||||
import { toEditor } from "../../core/simulation/aiEditor";
|
import { toEditor } from "../../core/simulation/aiEditor";
|
||||||
@@ -48,7 +48,7 @@ export function LocalManualScene({world,robot,settings,actionsHost,headerActions
|
|||||||
<canvas ref={canvas} aria-label={`Ручное управление ${robot.name}`} />
|
<canvas ref={canvas} aria-label={`Ручное управление ${robot.name}`} />
|
||||||
{ready?<div className="ai-simulation__speed"><GlassSurface tone="strong" radius="pill" padding="sm">Скорость: {Math.abs(speed).toFixed(2)} м/с</GlassSurface></div>:null}
|
{ready?<div className="ai-simulation__speed"><GlassSurface tone="strong" radius="pill" padding="sm">Скорость: {Math.abs(speed).toFixed(2)} м/с</GlassSurface></div>:null}
|
||||||
{!ready&&!error?<div className="ai-polygon__preview-error"><LoadingRegion loading label="Открываем локальную сцену"/></div>:null}
|
{!ready&&!error?<div className="ai-polygon__preview-error"><LoadingRegion loading label="Открываем локальную сцену"/></div>:null}
|
||||||
{error?<div className="ai-polygon__preview-error"><p role="alert">{error}</p><Button onClick={()=>{setError(null);setRetry(retry+1);}}>Повторить</Button></div>:null}
|
{error?<div className="ai-polygon__preview-error"><Description role="alert">{error}</Description><Button onClick={()=>{setError(null);setRetry(retry+1);}}>Повторить</Button></div>:null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {useSimulationLayout} from "./useSimulationLayout";
|
import {useSimulationLayout} from "./useSimulationLayout";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Checker, Dropdown, SegmentedButton } from "@nodedc/ui-react";
|
import { Description, Checker, Dropdown, SegmentedButton } from "@nodedc/ui-react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { loadExperience, attemptLabel, experienceMap, type SpatialExperience } from "../../core/simulation/spatialExperience";
|
import { loadExperience, attemptLabel, experienceMap, type SpatialExperience } from "../../core/simulation/spatialExperience";
|
||||||
import type { ScreenPoint } from "../../core/simulation/aiPolygon";
|
import type { ScreenPoint } from "../../core/simulation/aiPolygon";
|
||||||
@@ -33,13 +33,13 @@ export function PlannerExperience({worldId,worldSha,runtime,viewport,onVisibilit
|
|||||||
aria-haspopup="dialog" aria-expanded={open} aria-controls={surfaceId} onClick={toggle}>Память</SegmentedButton>}>
|
aria-haspopup="dialog" aria-expanded={open} aria-controls={surfaceId} onClick={toggle}>Память</SegmentedButton>}>
|
||||||
<div className="ai-polygon__layer-options">
|
<div className="ai-polygon__layer-options">
|
||||||
<strong>Память локации</strong>
|
<strong>Память локации</strong>
|
||||||
<p>Сохраняет посещённые места и попытки проезда между заездами. Новый заезд с той же конфигурацией ровера продолжает эту историю.</p>
|
<Description>Сохраняет посещённые места и попытки проезда между заездами. Новый заезд с той же конфигурацией ровера продолжает эту историю.</Description>
|
||||||
{error?<p role="alert">{error}</p>:memory?<>
|
{error?<Description role="alert">{error}</Description>:memory?<>
|
||||||
<p>Посещено участков: {memory.visits.length}. Попыток проезда: {memory.attempts.length}, из них позже пройдено: {memory.attempts.filter(a=>a.status==="revisited-successfully").length}.</p>
|
<Description>Посещено участков: {memory.visits.length}. Попыток проезда: {memory.attempts.length}, из них позже пройдено: {memory.attempts.filter(a=>a.status==="revisited-successfully").length}.</Description>
|
||||||
<Checker label="Показывать на карте" checked={visible} onChange={setVisible}/>
|
<Checker label="Показывать на карте" checked={visible} onChange={setVisible}/>
|
||||||
</>:<p>Сохранённых проездов пока нет. Память появится после движения ровера.</p>}
|
</>:<Description>Сохранённых проездов пока нет. Память появится после движения ровера.</Description>}
|
||||||
<p>Прежние попытки помогают выбрать другой подход. Возможность проезда всегда проверяется заново по текущим данным.</p>
|
<Description>Прежние попытки помогают выбрать другой подход. Возможность проезда всегда проверяется заново по текущим данным.</Description>
|
||||||
<p>Показана накопленная память конфигурации ровера из последнего заезда. Для другой версии локации или конфигурации сохраняется отдельная память.</p>
|
<Description>Показана накопленная память конфигурации ровера из последнего заезда. Для другой версии локации или конфигурации сохраняется отдельная память.</Description>
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
{visible&&memory?createPortal(<svg className="ai-local-editor__markers" viewBox="0 0 1280 720" preserveAspectRatio="none" aria-label="Память проездов">
|
{visible&&memory?createPortal(<svg className="ai-local-editor__markers" viewBox="0 0 1280 720" preserveAspectRatio="none" aria-label="Память проездов">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useRef, useState, type RefObject } from "react";
|
import { useEffect, useRef, useState, type RefObject } from "react";
|
||||||
import { ColorField, ControlRow, RangeControl, Select, ToastStack, WorkspaceWindow } from "@nodedc/ui-react";
|
import { Description, ColorField, ControlRow, RangeControl, Select, ToastStack, WorkspaceWindow } from "@nodedc/ui-react";
|
||||||
import type { PlannerPreferences } from "../../core/simulation/plannerPreferences";
|
import type { PlannerPreferences } from "../../core/simulation/plannerPreferences";
|
||||||
import {PlannerCubeSettings} from "./PlannerCubeSettings";
|
import {PlannerCubeSettings} from "./PlannerCubeSettings";
|
||||||
import {PlannerToolbarSettings} from "./PlannerToolbarSettings";
|
import {PlannerToolbarSettings} from "./PlannerToolbarSettings";
|
||||||
@@ -79,7 +79,7 @@ export function PlannerSettings({ boundsRef, onClose }: { boundsRef: RefObject<H
|
|||||||
<ControlRow label="Цвет свечения"><ColorField label="Цвет свечения" value={value.waypoint.emissionColor} onChange={(v)=>set("waypoint","emissionColor",v)}/></ControlRow>
|
<ControlRow label="Цвет свечения"><ColorField label="Цвет свечения" value={value.waypoint.emissionColor} onChange={(v)=>set("waypoint","emissionColor",v)}/></ControlRow>
|
||||||
</> : <>
|
</> : <>
|
||||||
<strong>Сдвиг камеры</strong>
|
<strong>Сдвиг камеры</strong>
|
||||||
<p>Расстояние до поверхности под курсором. Чувствительность плавно меняется между двумя границами.</p>
|
<Description>Расстояние до поверхности под курсором. Чувствительность плавно меняется между двумя границами.</Description>
|
||||||
{range("navigation","nearDistance","Ближнее расстояние",.5,50,.5,"м")}
|
{range("navigation","nearDistance","Ближнее расстояние",.5,50,.5,"м")}
|
||||||
{range("navigation","nearPan","Чувствительность вблизи",.1,5,.1,"×")}
|
{range("navigation","nearPan","Чувствительность вблизи",.1,5,.1,"×")}
|
||||||
{range("navigation","farDistance","Дальнее расстояние",Math.max(2,value.navigation.nearDistance+1),500,1,"м")}
|
{range("navigation","farDistance","Дальнее расстояние",Math.max(2,value.navigation.nearDistance+1),500,1,"м")}
|
||||||
@@ -87,7 +87,7 @@ export function PlannerSettings({ boundsRef, onClose }: { boundsRef: RefObject<H
|
|||||||
<strong>Зум</strong>
|
<strong>Зум</strong>
|
||||||
{range("navigation","zoom","Скорость зума",.1,3,.1,"×")}
|
{range("navigation","zoom","Скорость зума",.1,3,.1,"×")}
|
||||||
<strong>Центр вращения</strong>
|
<strong>Центр вращения</strong>
|
||||||
<p>Шарик появляется в точке нажатия на время вращения.</p>
|
<Description>Шарик появляется в точке нажатия на время вращения.</Description>
|
||||||
{range("navigation","centroidPixels","Размер центра на экране",6,64,1,"px")}
|
{range("navigation","centroidPixels","Размер центра на экране",6,64,1,"px")}
|
||||||
<ControlRow label="Цвет центра"><ColorField label="Цвет центра" value={value.navigation.centroidColor} onChange={(v)=>set("navigation","centroidColor",v)}/></ControlRow>
|
<ControlRow label="Цвет центра"><ColorField label="Цвет центра" value={value.navigation.centroidColor} onChange={(v)=>set("navigation","centroidColor",v)}/></ControlRow>
|
||||||
{range("navigation","centroidOpacity","Непрозрачность центра",.1,1,.05,"")}
|
{range("navigation","centroidOpacity","Непрозрачность центра",.1,1,.05,"")}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Button, TextField, Window, WindowFooterActions } from "@nodedc/ui-react";
|
import { Description, Button, TextField, Window, WindowFooterActions } from "@nodedc/ui-react";
|
||||||
import type { AiRobot } from "../../core/simulation/aiPolygon";
|
import type { AiRobot } from "../../core/simulation/aiPolygon";
|
||||||
import { defaultRoverSettings, validRoverSettings, type RoverSettings } from "../../core/simulation/roverSettings";
|
import { defaultRoverSettings, validRoverSettings, type RoverSettings } from "../../core/simulation/roverSettings";
|
||||||
|
|
||||||
@@ -23,11 +23,11 @@ export function RoverSettingsWindow({robot,value,manual,onApply,onClose}:{
|
|||||||
{field("base_mass_kg","Масса ровера без груза, кг",10,1000,1)}
|
{field("base_mass_kg","Масса ровера без груза, кг",10,1000,1)}
|
||||||
{field("payload_mass_kg","Дополнительный груз, кг",0,500,1)}
|
{field("payload_mass_kg","Дополнительный груз, кг",0,500,1)}
|
||||||
{field("payload_height_m","Высота центра груза над грунтом, м",.1,3,.01)}
|
{field("payload_height_m","Высота центра груза над грунтом, м",.1,3,.01)}
|
||||||
<p>Общая масса: {Number.isFinite(draft.base_mass_kg+draft.payload_mass_kg)?draft.base_mass_kg+draft.payload_mass_kg:"—"} кг.</p>
|
<Description>Общая масса: {Number.isFinite(draft.base_mass_kg+draft.payload_mass_kg)?draft.base_mass_kg+draft.payload_mass_kg:"—"} кг.</Description>
|
||||||
<p>Груз расположен по центру ровера. Масса и высота влияют на центр тяжести и инерцию; мощность моторов остаётся прежней.</p>
|
<Description>Груз расположен по центру ровера. Масса и высота влияют на центр тяжести и инерцию; мощность моторов остаётся прежней.</Description>
|
||||||
{manual?<p>В ручном режиме учитываются скорость и общая масса. Высота груза применяется в заезде на Worker.</p>:null}
|
{manual?<Description>В ручном режиме учитываются скорость и общая масса. Высота груза применяется в заезде на Worker.</Description>:null}
|
||||||
<p>Изменения применяются к следующему заезду. Его результат сохраняет использованные настройки.</p>
|
<Description>Изменения применяются к следующему заезду. Его результат сохраняет использованные настройки.</Description>
|
||||||
{!valid?<p role="status">Допустимо: конечная скорость от 0.05 м/с, масса 10–1000 кг, груз 0–500 кг, высота 0.1–3 м.</p>:null}
|
{!valid?<Description role="status">Допустимо: конечная скорость от 0.05 м/с, масса 10–1000 кг, груз 0–500 кг, высота 0.1–3 м.</Description>:null}
|
||||||
</div>
|
</div>
|
||||||
</Window>;
|
</Window>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {
|
import { Description,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Button,
|
Button,
|
||||||
Icon,
|
Icon,
|
||||||
@@ -85,7 +85,7 @@ export function SimulationCatalog({
|
|||||||
<div className="simulation-catalog__empty">
|
<div className="simulation-catalog__empty">
|
||||||
<span><Icon name="globe" size={20} /></span>
|
<span><Icon name="globe" size={20} /></span>
|
||||||
<strong>Перетащите архивы в это окно</strong>
|
<strong>Перетащите архивы в это окно</strong>
|
||||||
<p>Каждый ZIP, RAR или 7z сразу станет отдельным проектом и встанет в очередь.</p>
|
<Description>Каждый ZIP, RAR или 7z сразу станет отдельным проектом и встанет в очередь.</Description>
|
||||||
<Button variant="primary" icon={<Icon name="plus" size={16} />} onClick={onCreate}>
|
<Button variant="primary" icon={<Icon name="plus" size={16} />} onClick={onCreate}>
|
||||||
Новый проект
|
Новый проект
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {useEffect,useRef,useState,type ReactNode} from 'react';
|
import {useEffect,useRef,useState,type ReactNode} from 'react';
|
||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
import {Button,Checker,DockHandle,Dropdown,GlassSurface,Icon,IconButton,Select,ToastStack} from '@nodedc/ui-react';
|
import { Description,Button,Checker,DockHandle,Dropdown,GlassSurface,Icon,IconButton,Select,ToastStack} from '@nodedc/ui-react';
|
||||||
import {withObservationTree,orderedObservationIDs,observationTree} from '../../core/fleet/observationLayout';
|
import {withObservationTree,orderedObservationIDs,observationTree} from '../../core/fleet/observationLayout';
|
||||||
import {useObservationPresets} from '../../core/fleet/useObservationPresets';
|
import {useObservationPresets} from '../../core/fleet/useObservationPresets';
|
||||||
import {observationArrangements,retainDormantObservationTree} from '../../core/fleet/observationPresets';
|
import {observationArrangements,retainDormantObservationTree} from '../../core/fleet/observationPresets';
|
||||||
@@ -48,7 +48,7 @@ export function SimulationObservationDeck({video,videoActions,toolbar,preview}:{
|
|||||||
</div></ObservationPanelHeader>
|
</div></ObservationPanelHeader>
|
||||||
<div className="observation-mount">{source.id==='video'?video:preview&&<AiInferencePreview preview={preview} layer={source.id}/>}</div>
|
<div className="observation-mount">{source.id==='video'?video:preview&&<AiInferencePreview preview={preview} layer={source.id}/>}</div>
|
||||||
</GlassSurface></div>,mounts.current.get(source.id)!,source.id))}
|
</GlassSurface></div>,mounts.current.get(source.id)!,source.id))}
|
||||||
</ObservationDeck>:<div className="observation-empty"><p>Все окна скрыты.</p><Button onClick={()=>show('video',true)}>Показать симуляцию</Button></div>}</div>
|
</ObservationDeck>:<div className="observation-empty"><Description>Все окна скрыты.</Description><Button onClick={()=>show('video',true)}>Показать симуляцию</Button></div>}</div>
|
||||||
{saving&&<ObservationLayoutSaveWindow onClose={()=>setSaving(false)} onSave={presets.save}/>}
|
{saving&&<ObservationLayoutSaveWindow onClose={()=>setSaving(false)} onSave={presets.save}/>}
|
||||||
{edited&&<ObservationLayoutSaveWindow key={edited.id} initialName={edited.name} onClose={()=>setEditing(null)} onSave={name=>presets.rename(edited.id,name)} onRemove={()=>presets.remove(edited.id)}/>}
|
{edited&&<ObservationLayoutSaveWindow key={edited.id} initialName={edited.name} onClose={()=>setEditing(null)} onSave={name=>presets.rename(edited.id,name)} onRemove={()=>presets.remove(edited.id)}/>}
|
||||||
<ToastStack items={presets.error?[{id:"layout-save",tone:"error",title:"Раскладка не сохранена",description:presets.error}]:[]} onDismiss={presets.clearError}/>
|
<ToastStack items={presets.error?[{id:"layout-save",tone:"error",title:"Раскладка не сохранена",description:presets.error}]:[]} onDismiss={presets.clearError}/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Button, LoadingRegion, Window } from "@nodedc/ui-react";
|
import { Description, Button, LoadingRegion, Window } from "@nodedc/ui-react";
|
||||||
import { fetchSimulationProjects, retrySimulationProject, type SimulationProject } from "../../core/simulation/projects";
|
import { fetchSimulationProjects, retrySimulationProject, type SimulationProject } from "../../core/simulation/projects";
|
||||||
import { SimulationProjectWindow } from "./SimulationProjectWindow";
|
import { SimulationProjectWindow } from "./SimulationProjectWindow";
|
||||||
|
|
||||||
@@ -38,14 +38,14 @@ export function SimulationSourceImport({open,onClose,onPly,onReady}: {
|
|||||||
<Button onClick={()=>{onClose();onPly();}}>Gaussian PLY</Button>
|
<Button onClick={()=>{onClose();onPly();}}>Gaussian PLY</Button>
|
||||||
<Button onClick={()=>{onClose();setArchive(true);}}>Архив или папка LCC</Button>
|
<Button onClick={()=>{onClose();setArchive(true);}}>Архив или папка LCC</Button>
|
||||||
</div>
|
</div>
|
||||||
{pending.map(p=><div key={p.projectId} className="ai-polygon__row"><p>{p.name}</p>
|
{pending.map(p=><div key={p.projectId} className="ai-polygon__row"><Description>{p.name}</Description>
|
||||||
<Button onClick={()=>{onClose();setError(null);setProject(p);}}>Подготовка локации</Button></div>)}
|
<Button onClick={()=>{onClose();setError(null);setProject(p);}}>Подготовка локации</Button></div>)}
|
||||||
{error?<p role="alert">{error}</p>:null}
|
{error?<Description role="alert">{error}</Description>:null}
|
||||||
</Window>
|
</Window>
|
||||||
<SimulationProjectWindow open={archive} project={null} onClose={()=>setArchive(false)} onSaved={p=>{setArchive(false);setProject(p);}} />
|
<SimulationProjectWindow open={archive} project={null} onClose={()=>setArchive(false)} onSaved={p=>{setArchive(false);setProject(p);}} />
|
||||||
{project?<Window open title={`Подготовка ${project.name}`} onClose={()=>setProject(null)}>
|
{project?<Window open title={`Подготовка ${project.name}`} onClose={()=>setProject(null)}>
|
||||||
<LoadingRegion loading={project.status!=='failed'&&!error} label="Подготовка локации">
|
<LoadingRegion loading={project.status!=='failed'&&!error} label="Подготовка локации">
|
||||||
<p>{error??project.error??'Локация появится в общей библиотеке после подготовки.'}</p>
|
<Description>{error??project.error??'Локация появится в общей библиотеке после подготовки.'}</Description>
|
||||||
{project.status==='failed'?<Button onClick={()=>void retrySimulationProject(project.projectId).then(setProject).catch(e=>setError(e.message))}>Повторить подготовку</Button>:null}
|
{project.status==='failed'?<Button onClick={()=>void retrySimulationProject(project.projectId).then(setProject).catch(e=>setError(e.message))}>Повторить подготовку</Button>:null}
|
||||||
</LoadingRegion>
|
</LoadingRegion>
|
||||||
</Window>:null}
|
</Window>:null}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
Icon,
|
Icon,
|
||||||
RangeControl,
|
RangeControl,
|
||||||
@@ -44,12 +44,12 @@ export function SimulationUgvSettingsPanel({
|
|||||||
<strong>Физика UGV</strong>
|
<strong>Физика UGV</strong>
|
||||||
<span>Дифференциальный привод</span>
|
<span>Дифференциальный привод</span>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<Description>
|
||||||
A/D без W/S разворачивают UGV вокруг собственного центра. Скорость и
|
A/D без W/S разворачивают UGV вокруг собственного центра. Скорость и
|
||||||
динамика применяются сразу. Мышь вращает камеру вокруг машины, колесо
|
динамика применяются сразу. Мышь вращает камеру вокруг машины, колесо
|
||||||
меняет дистанцию; после паузы камера плавно возвращается назад. Ползунок
|
меняет дистанцию; после паузы камера плавно возвращается назад. Ползунок
|
||||||
работает в штатном диапазоне, точное значение можно ввести вручную.
|
работает в штатном диапазоне, точное значение можно ввести вручную.
|
||||||
</p>
|
</Description>
|
||||||
<TextField
|
<TextField
|
||||||
label="Название пресета"
|
label="Название пресета"
|
||||||
value={value.presetName}
|
value={value.presetName}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, type ReactNode, type RefObject } from "react";
|
import { useState, type ReactNode, type RefObject } from "react";
|
||||||
import { Icon, IconButton, Select, ToastStack, Window } from "@nodedc/ui-react";
|
import { Description, Icon, IconButton, Select, ToastStack, Window } from "@nodedc/ui-react";
|
||||||
import { PlannerSettings } from "./PlannerSettings";
|
import { PlannerSettings } from "./PlannerSettings";
|
||||||
import { usePlannerPreferences } from "./usePlannerPreferences";
|
import { usePlannerPreferences } from "./usePlannerPreferences";
|
||||||
|
|
||||||
@@ -22,12 +22,12 @@ export function SimulationViewTools({expanded,toggle,semantic=false,planning=fal
|
|||||||
{settings?<PlannerSettings boundsRef={boundsRef} onClose={()=>setSettings(false)}/>:null}
|
{settings?<PlannerSettings boundsRef={boundsRef} onClose={()=>setSettings(false)}/>:null}
|
||||||
<Window open={help} onClose={()=>setHelp(false)} title="Управление сценой">
|
<Window open={help} onClose={()=>setHelp(false)} title="Управление сценой">
|
||||||
<div className="ai-polygon__form">{planning?<>
|
<div className="ai-polygon__form">{planning?<>
|
||||||
<p>{semantic?"При редактировании Ctrl + перетаскивание ЛКМ — вращение камеры; без Ctrl — выбранный инструмент. Вне редактирования ЛКМ вращает камеру без Ctrl.":"ЛКМ — вращение вокруг точки нажатия."} ПКМ или клик двумя пальцами с движением — сдвиг.</p>
|
<Description>{semantic?"При редактировании Ctrl + перетаскивание ЛКМ — вращение камеры; без Ctrl — выбранный инструмент. Вне редактирования ЛКМ вращает камеру без Ctrl.":"ЛКМ — вращение вокруг точки нажатия."} ПКМ или клик двумя пальцами с движением — сдвиг.</Description>
|
||||||
<p>{semantic?"При редактировании прокрутка двумя пальцами сдвигает вид; щипок или Ctrl + прокрутка — зум к курсору.":"Прокрутка — зум к курсору, в том числе в режиме добавления точек."}</p>
|
<Description>{semantic?"При редактировании прокрутка двумя пальцами сдвигает вид; щипок или Ctrl + прокрутка — зум к курсору.":"Прокрутка — зум к курсору, в том числе в режиме добавления точек."}</Description>
|
||||||
<p>WASD / стрелки — перемещение. Q / E — вниз / вверх. Shift — быстрее.</p>
|
<Description>WASD / стрелки — перемещение. Q / E — вниз / вверх. Shift — быстрее.</Description>
|
||||||
{semantic?<p>Клик по полосе выбирает элемент целиком, по её вершине — точку; рамка или Shift + клик выбирают несколько точек. Shift + перетаскивание пивота копирует целый элемент или продолжает выбранную точку. Escape отменяет действие, Ctrl/Cmd+Z — отменяет правку. Hold закрепляет тулбар.</p>:null}
|
{semantic?<Description>Клик по полосе выбирает элемент целиком, по её вершине — точку; рамка или Shift + клик выбирают несколько точек. Shift + перетаскивание пивота копирует целый элемент или продолжает выбранную точку. Escape отменяет действие, Ctrl/Cmd+Z — отменяет правку. Hold закрепляет тулбар.</Description>:null}
|
||||||
{routeEditing?<p>Waypoint по клику — установка точки на поверхности. Выберите точку и перемещайте её за стрелки X, Y, Z. Delete — удалить, Ctrl/Cmd+Z — отменить. Клик по пустому месту в обзоре снимает выделение.</p>:null}
|
{routeEditing?<Description>Waypoint по клику — установка точки на поверхности. Выберите точку и перемещайте её за стрелки X, Y, Z. Delete — удалить, Ctrl/Cmd+Z — отменить. Клик по пустому месту в обзоре снимает выделение.</Description>:null}
|
||||||
</>:<><p>WASD / стрелки — движение. Пробел — тормоз. R — к старту.</p><p>Мышь — обзор.</p></>}</div>
|
</>:<><Description>WASD / стрелки — движение. Пробел — тормоз. R — к старту.</Description><Description>Мышь — обзор.</Description></>}</div>
|
||||||
</Window>
|
</Window>
|
||||||
{error?<ToastStack items={[{id:"quality",tone:"error",title:error}]} onDismiss={()=>setError(null)}/>:null}
|
{error?<ToastStack items={[{id:"quality",tone:"error",title:error}]} onDismiss={()=>setError(null)}/>:null}
|
||||||
</>;
|
</>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useId, useRef, useState } from "react";
|
import { useEffect, useId, useRef, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Button,
|
Button,
|
||||||
GlassMaterialSurface,
|
GlassMaterialSurface,
|
||||||
@@ -356,9 +356,9 @@ export function SimulationViewport({
|
|||||||
<strong>Система координат</strong>
|
<strong>Система координат</strong>
|
||||||
<span>Мир сцены · Y вверх</span>
|
<span>Мир сцены · Y вверх</span>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<Description>
|
||||||
Коррекция слоёв не меняет координаты камеры, навигации и будущей физики.
|
Коррекция слоёв не меняет координаты камеры, навигации и будущей физики.
|
||||||
</p>
|
</Description>
|
||||||
<div className="simulation-viewport__settings-rotations">
|
<div className="simulation-viewport__settings-rotations">
|
||||||
<LayerRotationFields
|
<LayerRotationFields
|
||||||
label="Гауссовый слой"
|
label="Гауссовый слой"
|
||||||
@@ -453,7 +453,7 @@ export function SimulationViewport({
|
|||||||
<div className="simulation-viewport__state" role={state === "failed" ? "alert" : "status"}>
|
<div className="simulation-viewport__state" role={state === "failed" ? "alert" : "status"}>
|
||||||
{state === "failed" ? null : <ActivityIndicator label="Загрузка локации" />}
|
{state === "failed" ? null : <ActivityIndicator label="Загрузка локации" />}
|
||||||
<strong>{state === "failed" ? "Локация не открылась" : "Загружаем локацию"}</strong>
|
<strong>{state === "failed" ? "Локация не открылась" : "Загружаем локацию"}</strong>
|
||||||
<p>{error ?? "LOD-уровни загружаются по мере готовности runtime."}</p>
|
<Description>{error ?? "LOD-уровни загружаются по мере готовности runtime."}</Description>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Button, SettingsCard, TextField, WindowFooterActions } from "@nodedc/ui-react";
|
import { Description, Button, SettingsCard, TextField, WindowFooterActions } from "@nodedc/ui-react";
|
||||||
import { announceLabStorageChange, saveLabRetention, useLocalLabStorage } from "../../core/storage/localLabStorage";
|
import { announceLabStorageChange, saveLabRetention, useLocalLabStorage } from "../../core/storage/localLabStorage";
|
||||||
|
|
||||||
export function useLabStorageSettings(open: boolean) {
|
export function useLabStorageSettings(open: boolean) {
|
||||||
@@ -15,9 +15,9 @@ export function useLabStorageSettings(open: boolean) {
|
|||||||
description="Срок хранения готовых записей просмотра после последнего открытия. Закреплённые записи остаются на этом устройстве до снятия булавки.">
|
description="Срок хранения готовых записей просмотра после последнего открытия. Закреплённые записи остаются на этом устройстве до снятия булавки.">
|
||||||
<TextField label="Срок временного хранения, дней" type="number" min={1} max={365}
|
<TextField label="Срок временного хранения, дней" type="number" min={1} max={365}
|
||||||
value={days} disabled={busy || !data} onChange={event => { setDays(event.target.value); setSaved(false); }} />
|
value={days} disabled={busy || !data} onChange={event => { setDays(event.target.value); setSaved(false); }} />
|
||||||
<p>После снятия булавки срок начинается заново. История запусков и результаты на Worker сохраняются.</p>
|
<Description>После снятия булавки срок начинается заново. История запусков и результаты на Worker сохраняются.</Description>
|
||||||
<p>Правило применяется к учтённым записям просмотра AI Inference. Исходные записи, Gaussian-сцены и разметка сохраняются отдельно.</p>
|
<Description>Правило применяется к учтённым записям просмотра AI Inference. Исходные записи, Gaussian-сцены и разметка сохраняются отдельно.</Description>
|
||||||
{loadError || error ? <p role="alert">{error ?? loadError}</p> : saved ? <p role="status">Настройки сохранены.</p> : null}
|
{loadError || error ? <Description role="alert">{error ?? loadError}</Description> : saved ? <Description role="status">Настройки сохранены.</Description> : null}
|
||||||
</SettingsCard>;
|
</SettingsCard>;
|
||||||
const footer = <WindowFooterActions>
|
const footer = <WindowFooterActions>
|
||||||
<Button variant="secondary" disabled={busy || !data || days === String(data.retention_days)}
|
<Button variant="secondary" disabled={busy || !data || days === String(data.retention_days)}
|
||||||
|
|||||||
@@ -1,29 +1,35 @@
|
|||||||
import {useEffect,useRef,useState} from 'react';
|
import {useEffect,useRef,useState} from 'react';
|
||||||
import {Button,Description,Icon,Select,SettingsCard,TextAreaField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
import {Button,Description,Icon,Select,SettingsCard,TextAreaField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import {InstallerCard} from '../network/InstallerCard';
|
import {InstallerCard} from '../network/InstallerCard';
|
||||||
import {serverRequest,type Server} from '../../core/system/servers';
|
import {serverRequest,useServers,type Server} from '../../core/system/servers';
|
||||||
import {vpsRequest} from '../../core/fleet/vps';
|
import {vpsRequest} from '../../core/fleet/vps';
|
||||||
|
|
||||||
export function ServerServiceSetup({server,onClose,onSaved}:{server:Server;onClose:()=>void;onSaved:()=>void}) {
|
export function ServerServiceSetup({server:initialServer,fixedKind,onClose,onSaved}:{server?:Server;fixedKind?:'librespeed';onClose:()=>void;onSaved:()=>void}) {
|
||||||
const [kind,setKind]=useState<'wireguard'|'arnavi'>('wireguard'),[document,setDocument]=useState(''),[filename,setFilename]=useState('');
|
const [kind,setKind]=useState<'wireguard'|'arnavi'|'librespeed'>(fixedKind??'wireguard'),[document,setDocument]=useState(''),[filename,setFilename]=useState('');
|
||||||
|
const catalog=useServers();const [serverId,setServerId]=useState(initialServer?.id??'');
|
||||||
|
const server=initialServer??catalog.items?.find(s=>s.id===serverId);
|
||||||
|
const serviceName=kind==='librespeed'?'LibreSpeed':'WireGuard';
|
||||||
const [network,setNetwork]=useState(''),[interfaces,setInterfaces]=useState<{id:string;label:string}[]>([]);
|
const [network,setNetwork]=useState(''),[interfaces,setInterfaces]=useState<{id:string;label:string}[]>([]);
|
||||||
const [busy,setBusy]=useState(false),[error,setError]=useState('');const file=useRef<HTMLInputElement>(null);
|
const [busy,setBusy]=useState(false),[error,setError]=useState('');const file=useRef<HTMLInputElement>(null);
|
||||||
useEffect(()=>{let active=true;void vpsRequest<{items:{id:string;label:string}[]}>('/interfaces').then(r=>{if(active)setInterfaces(r.items);}).catch(()=>{});return()=>{active=false;};},[]);
|
useEffect(()=>{let active=true;void vpsRequest<{items:{id:string;label:string}[]}>('/interfaces').then(r=>{if(active)setInterfaces(r.items);}).catch(()=>{});return()=>{active=false;};},[]);
|
||||||
async function connect(){setBusy(true);setError('');try{
|
async function connect(){if(!server)return;setBusy(true);setError('');try{
|
||||||
await serverRequest(`/${server.id}/services`,'POST',{kind,document:document.trim(),expected_revision:server.revision,network_interface:network||null});
|
await serverRequest(`/${server.id}/services`,'POST',{kind,document:document.trim(),expected_revision:server.revision,network_interface:network||null});
|
||||||
setDocument('');onSaved();
|
setDocument('');onSaved();
|
||||||
}catch(e){setError(e instanceof Error?e.message:'Не удалось подключить службу.');}finally{setBusy(false);}}
|
}catch(e){setError(e instanceof Error?e.message:'Не удалось подключить службу.');}finally{setBusy(false);}}
|
||||||
return <><Window open title="Добавить службу" subtitle={`${server.name} · ${server.address}`} size="lg" closeOnEscape={!busy} closeOnBackdrop={false} onClose={()=>{if(!busy)onClose();}}
|
return <><Window open title="Добавить службу" subtitle={server?`${server.name} · ${server.address}`:'Выберите зарегистрированный VPS'} size="lg" closeOnEscape={!busy} closeOnBackdrop={false} onClose={()=>{if(!busy)onClose();}}
|
||||||
footer={<WindowFooterActions><Button disabled={busy} onClick={onClose}>Отмена</Button><Button loading={busy} disabled={busy||!document.trim()} onClick={()=>void connect()}>Подключить службу</Button></WindowFooterActions>}>
|
footer={<WindowFooterActions><Button disabled={busy} onClick={onClose}>Отмена</Button><Button loading={busy} disabled={busy||!server||!document.trim()} onClick={()=>void connect()}>Подключить службу</Button></WindowFooterActions>}>
|
||||||
<div className="system-catalog-form">
|
<div className="system-catalog-form">
|
||||||
<Select label="Служба" value={kind} disabled={busy} options={[{value:'wireguard',label:'WireGuard'},{value:'arnavi',label:'ARNavi'}]} onChange={value=>{setKind(value as typeof kind);setDocument('');setFilename('');setError('');}}/>
|
{!initialServer&&<Select label="VPS" value={serverId} disabled={busy} options={[{value:'',label:'Выберите VPS'},...(catalog.items??[]).map(s=>({value:s.id,label:`${s.name} · ${s.address}`}))]} onChange={id=>{setServerId(id);setDocument('');setFilename('');}}/>}
|
||||||
<InstallerCard key={kind} connectionInstruction="Вернитесь в это окно и подключите установленную службу с выданным приглашением." kind={kind==='wireguard'?'vps-wireguard':'vps-arnavi'}/>
|
{!initialServer&&catalog.items?.length===0&&<Description>Сначала добавьте VPS в разделе «Система → VPS».</Description>}
|
||||||
|
{catalog.error&&!initialServer&&<Description>{catalog.error}</Description>}
|
||||||
|
<Select label="Служба" value={kind} disabled={busy||!!fixedKind} options={[{value:'wireguard',label:'WireGuard'},{value:'arnavi',label:'ARNavi'},{value:'librespeed',label:'LibreSpeed'}]} onChange={value=>{setKind(value as typeof kind);setDocument('');setFilename('');setError('');}}/>
|
||||||
|
<InstallerCard key={kind} connectionInstruction={kind==='librespeed'?undefined:"Вернитесь в это окно и подключите установленную службу с выданным приглашением."} kind={kind==='librespeed'?'vps-librespeed':kind==='wireguard'?'vps-wireguard':'vps-arnavi'}/>
|
||||||
<SettingsCard title="Подключение установленной службы" description="Запустите установщик на выбранном VPS. Затем передайте выданное им приглашение — Mission Core проверит сервер и сохранит подключение.">
|
<SettingsCard title="Подключение установленной службы" description="Запустите установщик на выбранном VPS. Затем передайте выданное им приглашение — Mission Core проверит сервер и сохранит подключение.">
|
||||||
{kind==='wireguard'?<>
|
{kind!=='arnavi'?<>
|
||||||
<input ref={file} type="file" accept=".json,application/json" hidden onChange={event=>{const chosen=event.target.files?.[0];event.target.value='';if(!chosen)return;setDocument('');setFilename('');void (async()=>{if(chosen.size>16384)throw Error('Выберите файл приглашения WireGuard (до 16 КБ).');setDocument(await chosen.text());setFilename(chosen.name);})().catch(e=>setError(e.message));}}/>
|
<input ref={file} type="file" accept=".json,application/json" hidden onChange={event=>{const chosen=event.target.files?.[0];event.target.value='';if(!chosen)return;setDocument('');setFilename('');void (async()=>{if(chosen.size>16384)throw Error(`Выберите файл приглашения ${serviceName} (до 16 КБ).`);setDocument(await chosen.text());setFilename(chosen.name);})().catch(e=>setError(e.message));}}/>
|
||||||
<Button icon={<Icon name="upload"/>} disabled={busy} onClick={()=>file.current?.click()}>Выбрать приглашение WireGuard</Button>
|
<Button icon={<Icon name="upload"/>} disabled={busy} onClick={()=>file.current?.click()}>Выбрать приглашение {serviceName}</Button>
|
||||||
{filename&&<Description>{filename}</Description>}
|
{filename&&<Description>{filename}</Description>}
|
||||||
<Description>Файл на VPS: /var/lib/ndc-wireguard-vps/mission-core-wireguard.json. Скопируйте его по защищённому соединению (например, SFTP). Приглашение действует 24 часа; новое выпускается командой connection того же установщика. Экспорт .conf из клиента WireGuard не подходит.</Description>
|
<Description>Файл на VPS: {kind==='librespeed'?'/var/lib/ndc-librespeed-vps/mission-core-librespeed.json':'/var/lib/ndc-wireguard-vps/mission-core-wireguard.json'}. Скопируйте его по защищённому соединению (например, SFTP). Приглашение действует 24 часа; новое выпускается командой connection того же установщика. {kind==='wireguard'?'Экспорт .conf из клиента WireGuard не подходит.':''}</Description>
|
||||||
</>:<TextAreaField label="Ключ подключения ARNavi" value={document} disabled={busy} rows={4} onChange={e=>setDocument(e.target.value)} hint="Ключ находится на VPS в /opt/nodedc-mission-vps/connect.key. Действует 24 часа и используется один раз."/>}
|
</>:<TextAreaField label="Ключ подключения ARNavi" value={document} disabled={busy} rows={4} onChange={e=>setDocument(e.target.value)} hint="Ключ находится на VPS в /opt/nodedc-mission-vps/connect.key. Действует 24 часа и используется один раз."/>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
{interfaces.length>0&&<Select label="Подключение к VPS" disabled={busy} value={network} options={[{value:'',label:'Через текущую сеть'},...interfaces.map(i=>({value:i.id,label:`Напрямую · ${i.label}`}))]} onChange={setNetwork}/>}
|
{interfaces.length>0&&<Select label="Подключение к VPS" disabled={busy} value={network} options={[{value:'',label:'Через текущую сеть'},...interfaces.map(i=>({value:i.id,label:`Напрямую · ${i.label}`}))]} onChange={setNetwork}/>}
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ export function ImportNetworkProfile({onImported, disabled = false}: {onImported
|
|||||||
Импортировать подключение к серверу
|
Импортировать подключение к серверу
|
||||||
</Button>
|
</Button>
|
||||||
<Description>Файл mission-core-wireguard.json выдаёт установщик NODE.DC на вашем VPS. Получите его у администратора этого сервера и выберите здесь. Приглашение действует 24 часа; затем администратор выпускает новое. Экспорт туннеля из приложения WireGuard (.conf) не подходит.</Description>
|
<Description>Файл mission-core-wireguard.json выдаёт установщик NODE.DC на вашем VPS. Получите его у администратора этого сервера и выберите здесь. Приглашение действует 24 часа; затем администратор выпускает новое. Экспорт туннеля из приложения WireGuard (.conf) не подходит.</Description>
|
||||||
{error && <p role="alert"><StatusBadge tone="warning">{error}</StatusBadge></p>}
|
{error && <Description role="alert"><StatusBadge tone="warning">{error}</StatusBadge></Description>}
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export function WorkerConnectionSettings({open, mode, contour, onClose, onChange
|
|||||||
&& !catalog.available_profile_ids.includes(path.profile_id))
|
&& !catalog.available_profile_ids.includes(path.profile_id))
|
||||||
&& <Description>Выбранная сеть сейчас недоступна. Подключите её в VPN-клиенте.</Description>}
|
&& <Description>Выбранная сеть сейчас недоступна. Подключите её в VPN-клиенте.</Description>}
|
||||||
{check && <><StatusBadge tone="success">Устройство подтверждено · {check.identity.hostname}</StatusBadge>
|
{check && <><StatusBadge tone="success">Устройство подтверждено · {check.identity.hostname}</StatusBadge>
|
||||||
{check.active && check.channels.map(x => <p key={x.id}><StatusBadge tone={x.connected ? "success" : "warning"}>{x.label} · {x.connected ? "соединение установлено" : "ожидает подключения"}</StatusBadge></p>)}
|
{check.active && check.channels.map(x => <Description key={x.id}><StatusBadge tone={x.connected ? "success" : "warning"}>{x.label} · {x.connected ? "соединение установлено" : "ожидает подключения"}</StatusBadge></Description>)}
|
||||||
{check.active && <Description>Проверка подтверждает соединения. Свежие показатели и состояние сервисов отображаются в «Модулях».</Description>}
|
{check.active && <Description>Проверка подтверждает соединения. Свежие показатели и состояние сервисов отображаются в «Модулях».</Description>}
|
||||||
{check.active && check.channels.length === 0 && <Description>Рабочие каналы ещё не установлены.</Description>}</>}
|
{check.active && check.channels.length === 0 && <Description>Рабочие каналы ещё не установлены.</Description>}</>}
|
||||||
</SettingsCard>}
|
</SettingsCard>}
|
||||||
@@ -138,7 +138,7 @@ export function WorkerConnectionSettings({open, mode, contour, onClose, onChange
|
|||||||
{busy ? "Проверяем…" : "Проверить и добавить"}</Button>
|
{busy ? "Проверяем…" : "Проверить и добавить"}</Button>
|
||||||
</SettingsCard>}
|
</SettingsCard>}
|
||||||
{busy && <Description>Проверяем подключение…</Description>}
|
{busy && <Description>Проверяем подключение…</Description>}
|
||||||
{error && <p role="alert"><StatusBadge tone="warning">{error}</StatusBadge></p>}
|
{error && <Description role="alert"><StatusBadge tone="warning">{error}</StatusBadge></Description>}
|
||||||
{discoveryError && <Description role="alert">{discoveryError}</Description>}
|
{discoveryError && <Description role="alert">{discoveryError}</Description>}
|
||||||
{catalog?.notice && catalog.notice !== catalog.tailscale_client?.message && <Description>{catalog.notice}</Description>}
|
{catalog?.notice && catalog.notice !== catalog.tailscale_client?.message && <Description>{catalog.notice}</Description>}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import {Button, ConfirmationModal, Window, WindowFooterActions, type ApplicationPanelUtilityAction} from "@nodedc/ui-react";
|
import { Description,Button, ConfirmationModal, Window, WindowFooterActions, type ApplicationPanelUtilityAction} from "@nodedc/ui-react";
|
||||||
import {connectionRequest} from "../../core/system/workerConnections";
|
import {connectionRequest} from "../../core/system/workerConnections";
|
||||||
import type {ComputeContour} from "../../core/system/computeContours";
|
import type {ComputeContour} from "../../core/system/computeContours";
|
||||||
|
|
||||||
@@ -21,8 +21,8 @@ export function useWorkerPower(contour: ComputeContour | null) {
|
|||||||
const window = <>
|
const window = <>
|
||||||
<ConfirmationModal open={pending !== null} title="Выключить воркер?" danger
|
<ConfirmationModal open={pending !== null} title="Выключить воркер?" danger
|
||||||
confirmLabel="Да, выключить" pendingLabel="Передаём команду…" onClose={() => {if (!busy) setPending(null);}}
|
confirmLabel="Да, выключить" pendingLabel="Передаём команду…" onClose={() => {if (!busy) setPending(null);}}
|
||||||
description={<><p>Воркер «{pending?.name}» завершит работу. Выполняемые на нём задачи будут прерваны. Для включения потребуется доступ к компьютеру.</p>
|
description={<><Description>Воркер «{pending?.name}» завершит работу. Выполняемые на нём задачи будут прерваны. Для включения потребуется доступ к компьютеру.</Description>
|
||||||
{error && <p role="alert">{error}</p>}</>}
|
{error && <Description role="alert">{error}</Description>}</>}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
if (!pending || busy) return;
|
if (!pending || busy) return;
|
||||||
setBusy(true); setError(null);
|
setBusy(true); setError(null);
|
||||||
@@ -35,7 +35,7 @@ export function useWorkerPower(contour: ComputeContour | null) {
|
|||||||
}}/>
|
}}/>
|
||||||
<Window open={message !== null} title="Питание воркера" size="sm" onClose={() => setMessage(null)}
|
<Window open={message !== null} title="Питание воркера" size="sm" onClose={() => setMessage(null)}
|
||||||
footer={<WindowFooterActions><Button onClick={() => setMessage(null)}>Понятно</Button></WindowFooterActions>}>
|
footer={<WindowFooterActions><Button onClick={() => setMessage(null)}>Понятно</Button></WindowFooterActions>}>
|
||||||
<p role="status">{message}</p>
|
<Description role="status">{message}</Description>
|
||||||
</Window>
|
</Window>
|
||||||
</>;
|
</>;
|
||||||
return {action, window};
|
return {action, window};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export type BatteryPanelAppearance={height:number;radius:number;labelSize:number
|
|||||||
export type BatteryIndicatorAppearance={offset:number;width:number;height:number;radius:number;mode:'ranges'|'mono';color:string;lowColor:string;middleColor:string;highColor:string;lowUntil:number;middleUntil:number};
|
export type BatteryIndicatorAppearance={offset:number;width:number;height:number;radius:number;mode:'ranges'|'mono';color:string;lowColor:string;middleColor:string;highColor:string;lowUntil:number;middleUntil:number};
|
||||||
export type BatteryAppearance={schema:'missioncore.battery-ui/v1';markings:CellMarkingAppearance;panels:BatteryPanelAppearance;indicator:BatteryIndicatorAppearance};
|
export type BatteryAppearance={schema:'missioncore.battery-ui/v1';markings:CellMarkingAppearance;panels:BatteryPanelAppearance;indicator:BatteryIndicatorAppearance};
|
||||||
export const batteryAppearanceKey=(id:string)=>`missioncore.battery-ui/v1:${id}`;
|
export const batteryAppearanceKey=(id:string)=>`missioncore.battery-ui/v1:${id}`;
|
||||||
export function defaultBatteryAppearance():BatteryAppearance{return {schema:'missioncore.battery-ui/v1',markings:{color:'#ffffff',size:100},indicator:{offset:0,width:115,height:46,radius:23,mode:'ranges',color:'#f1f1ef',lowColor:'#ff7474',middleColor:'#ffd166',highColor:'#b5ff5a',lowUntil:15,middleUntil:30},panels:{height:76,radius:24,labelSize:12,valueSize:18,textColor:'#f1f1ef',glass:{...defaultGlassMaterial,tintOpacity:52,blur:18}}};}
|
export function defaultBatteryAppearance():BatteryAppearance{return {schema:'missioncore.battery-ui/v1',markings:{color:'#ffffff',size:100},indicator:{offset:0,width:115,height:46,radius:23,mode:'ranges',color:'#f1f1ef',lowColor:'#ff7474',middleColor:'#ffd166',highColor:'#b5ff5a',lowUntil:15,middleUntil:30},panels:{height:76,radius:24,labelSize:12,valueSize:13,textColor:'#f1f1ef',glass:{...defaultGlassMaterial,tintOpacity:52,blur:18}}};}
|
||||||
const object=(v:unknown):Record<string,unknown>=>v!==null&&typeof v==='object'?v as Record<string,unknown>:{};
|
const object=(v:unknown):Record<string,unknown>=>v!==null&&typeof v==='object'?v as Record<string,unknown>:{};
|
||||||
const number=(v:unknown,fallback:number,min:number,max:number)=>typeof v==='number'&&Number.isFinite(v)?Math.min(max,Math.max(min,v)):fallback;
|
const number=(v:unknown,fallback:number,min:number,max:number)=>typeof v==='number'&&Number.isFinite(v)?Math.min(max,Math.max(min,v)):fallback;
|
||||||
const color=(v:unknown,fallback:string)=>typeof v==='string'&&/^#[0-9a-f]{6}$/i.test(v)?v.toLowerCase():fallback;
|
const color=(v:unknown,fallback:string)=>typeof v==='string'&&/^#[0-9a-f]{6}$/i.test(v)?v.toLowerCase():fallback;
|
||||||
@@ -12,7 +12,7 @@ export function parseBatteryAppearance(raw:unknown):BatteryAppearance{
|
|||||||
const source=object(raw);if(source.schema!=='missioncore.battery-ui/v1')throw new Error('Это не профиль интерфейса батареи.');
|
const source=object(raw);if(source.schema!=='missioncore.battery-ui/v1')throw new Error('Это не профиль интерфейса батареи.');
|
||||||
const d=defaultBatteryAppearance(),m=object(source.markings),p=object(source.panels),g=object(p.glass),i=object(source.indicator);
|
const d=defaultBatteryAppearance(),m=object(source.markings),p=object(source.panels),g=object(p.glass),i=object(source.indicator);
|
||||||
const lowUntil=number(i.lowUntil,15,0,99),middleUntil=number(i.middleUntil,30,lowUntil+1,100);
|
const lowUntil=number(i.lowUntil,15,0,99),middleUntil=number(i.middleUntil,30,lowUntil+1,100);
|
||||||
return {schema:d.schema,indicator:{offset:number(i.offset,0,0,320),width:number(i.width,115,32,320),height:number(i.height,46,12,96),radius:number(i.radius,23,0,48),mode:i.mode==='mono'?'mono':'ranges',color:color(i.color,d.indicator.color),lowColor:color(i.lowColor,d.indicator.lowColor),middleColor:color(i.middleColor,d.indicator.middleColor),highColor:color(i.highColor,d.indicator.highColor),lowUntil,middleUntil},markings:{color:color(m.color,d.markings.color),size:number(m.size,100,50,160)},panels:{height:number(p.height,76,56,160),radius:number(p.radius,24,0,48),labelSize:number(p.labelSize,12,10,20),valueSize:number(p.valueSize,18,12,30),textColor:color(p.textColor,d.panels.textColor),glass:{...d.panels.glass,tintHex:color(g.tintHex,d.panels.glass.tintHex),tintOpacity:number(g.tintOpacity,52,0,100),blur:number(g.blur,18,0,60)}}};
|
return {schema:d.schema,indicator:{offset:number(i.offset,0,0,320),width:number(i.width,115,32,320),height:number(i.height,46,12,96),radius:number(i.radius,23,0,48),mode:i.mode==='mono'?'mono':'ranges',color:color(i.color,d.indicator.color),lowColor:color(i.lowColor,d.indicator.lowColor),middleColor:color(i.middleColor,d.indicator.middleColor),highColor:color(i.highColor,d.indicator.highColor),lowUntil,middleUntil},markings:{color:color(m.color,d.markings.color),size:number(m.size,100,50,160)},panels:{height:number(p.height,76,56,160),radius:number(p.radius,24,0,48),labelSize:number(p.labelSize,12,10,20),valueSize:number(p.valueSize,13,12,30),textColor:color(p.textColor,d.panels.textColor),glass:{...d.panels.glass,tintHex:color(g.tintHex,d.panels.glass.tintHex),tintOpacity:number(g.tintOpacity,52,0,100),blur:number(g.blur,18,0,60)}}};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function batteryIndicatorColor(value:BatteryIndicatorAppearance,soc:number|null):string|undefined{
|
export function batteryIndicatorColor(value:BatteryIndicatorAppearance,soc:number|null):string|undefined{
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ import {fleetRequest} from './useFleet';
|
|||||||
|
|
||||||
export function routerTransport(vehicleID:string):RouterTransport{
|
export function routerTransport(vehicleID:string):RouterTransport{
|
||||||
const base=`/${encodeURIComponent(vehicleID)}/routers`;
|
const base=`/${encodeURIComponent(vehicleID)}/routers`;
|
||||||
return {control:value=>fleetRequest(base+'/control','POST',value),read:()=>fleetRequest(base),authorize:value=>fleetRequest(base+'/access','POST',value),operation:id=>fleetRequest(base+'/access/'+encodeURIComponent(id))};
|
return {inspect:value=>fleetRequest(base+'/inspect','POST',value),control:value=>fleetRequest(base+'/control','POST',value),read:()=>fleetRequest(base),authorize:value=>fleetRequest(base+'/access','POST',value),operation:id=>fleetRequest(base+'/access/'+encodeURIComponent(id))};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {useCallback, useEffect, useState} from 'react';
|
|||||||
import type {VPSHost} from '../fleet/vps';
|
import type {VPSHost} from '../fleet/vps';
|
||||||
import {startSequentialPolling} from './sequentialPolling';
|
import {startSequentialPolling} from './sequentialPolling';
|
||||||
|
|
||||||
export type ServerService = {kind:'arnavi'|'wireguard';id:string;name:string;endpoint:string;state:string;last_seen:number|null;details:VPSHost|{id:string;name:string;endpoint:string;boards:number;last_verified:number|null;state:string}};
|
export type ServerService = {kind:'arnavi'|'wireguard'|'librespeed';id:string;name:string;endpoint:string;state:string;last_seen:number|null;details:VPSHost|{id:string;name:string;endpoint:string;boards:number;last_verified:number|null;state:string}};
|
||||||
export type Server = {id:string;name:string;address:string;revision:number;services:ServerService[]};
|
export type Server = {id:string;name:string;address:string;revision:number;services:ServerService[]};
|
||||||
export type ServerRemovalPlan = {confirmation:string;name:string;blocked:string[];services:string[];vehicle_connections:number;worker_connections:number};
|
export type ServerRemovalPlan = {confirmation:string;name:string;blocked:string[];services:string[];vehicle_connections:number;worker_connections:number};
|
||||||
export async function serverRequest<T>(path='', method='GET', body?:unknown, signal?:AbortSignal):Promise<T> {
|
export async function serverRequest<T>(path='', method='GET', body?:unknown, signal?:AbortSignal):Promise<T> {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
.ai-polygon__telemetry-row--local { justify-content: flex-start; flex-wrap: wrap; }
|
.ai-polygon__telemetry-row--local { justify-content: flex-start; flex-wrap: wrap; }
|
||||||
.ai-polygon__section, .ai-polygon__run, .ai-polygon__form { display: grid; gap: .75rem; }
|
.ai-polygon__section, .ai-polygon__run, .ai-polygon__form { display: grid; gap: .75rem; }
|
||||||
.ai-polygon h2, .ai-polygon h3, .ai-polygon p { margin: 0; }
|
.ai-polygon h2, .ai-polygon h3, .ai-polygon p { margin: 0; }
|
||||||
.ai-polygon h2 { font-size: var(--nodedc-font-size-title); }
|
.ai-polygon h2 { font-size: var(--nodedc-font-size-md); }
|
||||||
.ai-polygon h3, .ai-polygon strong { font-size: var(--nodedc-font-size-md); }
|
.ai-polygon h3, .ai-polygon strong { font-size: var(--nodedc-font-size-md); }
|
||||||
.ai-polygon p, .ai-polygon span, .ai-polygon a { font-size: var(--nodedc-font-size-sm); }
|
.ai-polygon p, .ai-polygon span, .ai-polygon a { font-size: var(--nodedc-font-size-sm); }
|
||||||
.ai-polygon p { color: var(--nodedc-text-muted); line-height: 1.5; }
|
.ai-polygon p { color: var(--nodedc-text-muted); line-height: 1.5; }
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
.artifact-health-lead h2 {
|
.artifact-health-lead h2 {
|
||||||
margin-top: 0.4rem;
|
margin-top: 0.4rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.42rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
.artifact-health-details p,
|
.artifact-health-details p,
|
||||||
.artifact-health-state p {
|
.artifact-health-state p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.66rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
.artifact-health-state h3 {
|
.artifact-health-state h3 {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.artifact-health-notice {
|
.artifact-health-notice {
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
.artifact-health-metrics strong {
|
.artifact-health-metrics strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.18rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 720;
|
font-weight: 720;
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
.artifact-health-details h3 {
|
.artifact-health-details h3 {
|
||||||
margin-top: 0.36rem;
|
margin-top: 0.36rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ body,
|
|||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: var(--nodedc-font-family);
|
font-family: var(--nodedc-font-family);
|
||||||
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
#root[data-nodedc-theme="dark"],
|
#root[data-nodedc-theme="dark"],
|
||||||
@@ -169,7 +170,7 @@ body {
|
|||||||
.panel-heading h3 {
|
.panel-heading h3 {
|
||||||
margin: 0.42rem 0 0;
|
margin: 0.42rem 0 0;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.22rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 730;
|
font-weight: 730;
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
@@ -195,7 +196,7 @@ body {
|
|||||||
.workspace-lead h2 {
|
.workspace-lead h2 {
|
||||||
margin: 0.5rem 0 0.6rem;
|
margin: 0.5rem 0 0.6rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: clamp(1.7rem, 3vw, 3rem);
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 690;
|
font-weight: 690;
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@@ -205,7 +206,7 @@ body {
|
|||||||
max-width: 50rem;
|
max-width: 50rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.78rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +257,7 @@ body {
|
|||||||
|
|
||||||
.metric-card__reading strong {
|
.metric-card__reading strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: clamp(1.4rem, 2vw, 2.2rem);
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@@ -265,7 +266,7 @@ body {
|
|||||||
.metric-card__reading span,
|
.metric-card__reading span,
|
||||||
.metric-card p {
|
.metric-card p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.64rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.metric-card p {
|
.metric-card p {
|
||||||
@@ -319,7 +320,7 @@ body {
|
|||||||
.modal-contract-note p {
|
.modal-contract-note p {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +358,7 @@ body {
|
|||||||
.layer-inspector-intro p {
|
.layer-inspector-intro p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.69rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,12 +61,12 @@
|
|||||||
.device-model-card header h3 {
|
.device-model-card header h3 {
|
||||||
margin-top: 0.12rem;
|
margin-top: 0.12rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-model-card > p {
|
.device-model-card > p {
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.67rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
max-width: 58rem;
|
max-width: 58rem;
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.56rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
.l34-annotation-save-form p {
|
.l34-annotation-save-form p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.65rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
.laboratory-evidence-report h2 {
|
.laboratory-evidence-report h2 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.02rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-evidence-report h3 {
|
.laboratory-evidence-report h3 {
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
.laboratory-evidence-report__header p {
|
.laboratory-evidence-report__header p {
|
||||||
margin-top: 0.32rem;
|
margin-top: 0.32rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-evidence-report__identity {
|
.laboratory-evidence-report__identity {
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
margin: 0.34rem 0 !important;
|
margin: 0.34rem 0 !important;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.58rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-evidence-report__artifact-list dl {
|
.laboratory-evidence-report__artifact-list dl {
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
.laboratory-evidence-report__notice p {
|
.laboratory-evidence-report__notice p {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,14 +49,14 @@
|
|||||||
.laboratory-selector h2 {
|
.laboratory-selector h2 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-selector p {
|
.laboratory-selector p {
|
||||||
max-width: 60rem;
|
max-width: 60rem;
|
||||||
margin-top: 0.35rem;
|
margin-top: 0.35rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.64rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
.laboratory-result-summary h2 {
|
.laboratory-result-summary h2 {
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
max-width: 66rem;
|
max-width: 66rem;
|
||||||
margin-top: 0.65rem;
|
margin-top: 0.65rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.63rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
.laboratory-result-pending p {
|
.laboratory-result-pending p {
|
||||||
max-width: 34rem;
|
max-width: 34rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-result-summary {
|
.laboratory-result-summary {
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-result-metrics strong {
|
.laboratory-result-metrics strong {
|
||||||
font-size: 0.9rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-frame-review {
|
.laboratory-frame-review {
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
.laboratory-frame-review h2 {
|
.laboratory-frame-review h2 {
|
||||||
margin: 0.3rem 0 0;
|
margin: 0.3rem 0 0;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-frame-review__picker {
|
.laboratory-frame-review__picker {
|
||||||
@@ -415,7 +415,7 @@
|
|||||||
|
|
||||||
.laboratory-frame-review__detail > div > strong {
|
.laboratory-frame-review__detail > div > strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.9rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-frame-review__detail .laboratory-frame-review__conflicts {
|
.laboratory-frame-review__detail .laboratory-frame-review__conflicts {
|
||||||
@@ -517,14 +517,14 @@
|
|||||||
.e30-review-workspace h3 {
|
.e30-review-workspace h3 {
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.e30-review-workspace p {
|
.e30-review-workspace p {
|
||||||
max-width: 62rem;
|
max-width: 62rem;
|
||||||
margin-top: 0.35rem;
|
margin-top: 0.35rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,7 +636,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.e30-review-workspace__case h3 {
|
.e30-review-workspace__case h3 {
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.e30-review-workspace__state {
|
.e30-review-workspace__state {
|
||||||
|
|||||||
@@ -416,7 +416,7 @@
|
|||||||
place-items: center;
|
place-items: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.laboratory-metric-evidence-scene__legend {
|
.laboratory-metric-evidence-scene__legend {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
.mission-map__overlay-head strong {
|
.mission-map__overlay-head strong {
|
||||||
color: var(--nodedc-map-glass-text);
|
color: var(--nodedc-map-glass-text);
|
||||||
font-size: 0.92rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mission-map__layers .section-eyebrow {
|
.mission-map__layers .section-eyebrow {
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
.mission-map__blocking strong {
|
.mission-map__blocking strong {
|
||||||
color: var(--nodedc-map-glass-text);
|
color: var(--nodedc-map-glass-text);
|
||||||
font-size: 0.9rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mission-map__blocking > span {
|
.mission-map__blocking > span {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
.mission-planner__expanded .mission-route-preview svg { min-height: 140px; }
|
.mission-planner__expanded .mission-route-preview svg { min-height: 140px; }
|
||||||
.mission-route-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
|
.mission-route-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
|
||||||
.mission-route-preview svg { width: 100%; flex: 1; min-height: 250px; }
|
.mission-route-preview svg { width: 100%; flex: 1; min-height: 250px; }
|
||||||
.mission-route-preview p { margin: 0; line-height: 1.5; color: var(--nodedc-text-muted); font-size: var(--nodedc-font-size-xs); }
|
.mission-route-preview p { margin: 0; line-height: 1.5; color: var(--nodedc-text-muted); font-size: var(--nodedc-font-size-sm); }
|
||||||
.mission-route-preview__reference { stroke: var(--nodedc-text-muted); opacity: .35; stroke-width: 2; }
|
.mission-route-preview__reference { stroke: var(--nodedc-text-muted); opacity: .35; stroke-width: 2; }
|
||||||
.mission-route-preview__selected { stroke: var(--nodedc-text-primary); stroke-width: 2; }
|
.mission-route-preview__selected { stroke: var(--nodedc-text-primary); stroke-width: 2; }
|
||||||
.mission-route-preview__cursor { fill: var(--nodedc-text-primary); }
|
.mission-route-preview__cursor { fill: var(--nodedc-text-primary); }
|
||||||
|
|||||||
@@ -293,14 +293,14 @@
|
|||||||
.observation-session-archive__head h2 {
|
.observation-session-archive__head h2 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.observation-session-archive__head p {
|
.observation-session-archive__head p {
|
||||||
max-width: 50rem;
|
max-width: 50rem;
|
||||||
margin-top: 0.35rem;
|
margin-top: 0.35rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
.observatory-catalog-bar h3,
|
.observatory-catalog-bar h3,
|
||||||
.observatory-session-summary h3,
|
.observatory-session-summary h3,
|
||||||
.observatory-evidence h3 {
|
.observatory-evidence h3 {
|
||||||
font-size: var(--nodedc-font-size-lg);
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.02em;
|
letter-spacing: -0.02em;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
.session-overview__facts dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 8px 0; }
|
.session-overview__facts dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 8px 0; }
|
||||||
.session-overview__facts dt { color: var(--nodedc-text-muted); }
|
.session-overview__facts dt { color: var(--nodedc-text-muted); }
|
||||||
.session-overview__facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
|
.session-overview__facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
|
||||||
.session-overview__facts p { color: var(--nodedc-text-muted); font-size: var(--nodedc-font-size-xs); line-height: 1.5; }
|
.session-overview__facts p { color: var(--nodedc-text-muted); font-size: var(--nodedc-font-size-sm); line-height: 1.5; }
|
||||||
.session-overview__chart { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
.session-overview__chart { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
||||||
.session-overview__chart svg { width: 100%; flex: 1; min-height: 0; overflow: visible; }
|
.session-overview__chart svg { width: 100%; flex: 1; min-height: 0; overflow: visible; }
|
||||||
.session-overview__chart text { fill: var(--nodedc-text-muted); font-size: 12px; }
|
.session-overview__chart text { fill: var(--nodedc-text-muted); font-size: 12px; }
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
.simulation-workspace__scene-head h2 {
|
.simulation-workspace__scene-head h2 {
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.18rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
max-width: 46rem;
|
max-width: 46rem;
|
||||||
margin-top: 0.38rem;
|
margin-top: 0.38rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.66rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
.simulation-catalog__summary strong {
|
.simulation-catalog__summary strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.15rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simulation-catalog__table-wrap {
|
.simulation-catalog__table-wrap {
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
|
|
||||||
.simulation-catalog__drop-overlay strong {
|
.simulation-catalog__drop-overlay strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.86rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simulation-catalog__drop-overlay span {
|
.simulation-catalog__drop-overlay span {
|
||||||
@@ -563,7 +563,7 @@
|
|||||||
.simulation-viewport__settings span,
|
.simulation-viewport__settings span,
|
||||||
.simulation-viewport__settings p {
|
.simulation-viewport__settings p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.56rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,7 +736,7 @@
|
|||||||
.simulation-viewport__state p {
|
.simulation-viewport__state p {
|
||||||
max-width: 34rem;
|
max-width: 34rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simulation-viewport__notice {
|
.simulation-viewport__notice {
|
||||||
@@ -789,7 +789,7 @@
|
|||||||
.simulation-workspace__processing p {
|
.simulation-workspace__processing p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
.compute-contour-settings__empty {
|
.compute-contour-settings__empty {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.65rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,11 +110,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.system-workspace__lead h2 {
|
.system-workspace__lead h2 {
|
||||||
font-size: 1.42rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-section-heading h3 {
|
.system-section-heading h3 {
|
||||||
font-size: 1.02rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-workspace__lead p,
|
.system-workspace__lead p,
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin: 0.42rem 0 0;
|
margin: 0.42rem 0 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.48;
|
line-height: 1.48;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
.system-telemetry-series strong,
|
.system-telemetry-series strong,
|
||||||
.network-stat-card strong {
|
.network-stat-card strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.14rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 720;
|
font-weight: 720;
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
.worker-runtime-card h3 {
|
.worker-runtime-card h3 {
|
||||||
margin: 0.38rem 0 0.18rem;
|
margin: 0.38rem 0 0.18rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.9rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
.feature-group > header h3 {
|
.feature-group > header h3 {
|
||||||
margin: 0.48rem 0 0.45rem;
|
margin: 0.48rem 0 0.45rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.08rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 710;
|
font-weight: 710;
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
max-width: 25rem;
|
max-width: 25rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.48;
|
line-height: 1.48;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
.feature-row p {
|
.feature-row p {
|
||||||
margin-top: 0.18rem;
|
margin-top: 0.18rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.64rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
.polygon-live-heading h2 {
|
.polygon-live-heading h2 {
|
||||||
margin-top: 0.32rem;
|
margin-top: 0.32rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.25rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
max-width: 42rem;
|
max-width: 42rem;
|
||||||
margin-top: 0.42rem;
|
margin-top: 0.42rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.66rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@
|
|||||||
.polygon-live-error {
|
.polygon-live-error {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.56rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,14 +386,14 @@
|
|||||||
|
|
||||||
.polygon-run-message h2 {
|
.polygon-run-message h2 {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.35rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-run-message p {
|
.polygon-run-message p {
|
||||||
max-width: 38rem;
|
max-width: 38rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.72rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@
|
|||||||
.polygon-run-metrics strong {
|
.polygon-run-metrics strong {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 680;
|
font-weight: 680;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -467,7 +467,7 @@
|
|||||||
.polygon-run-limitations h3 {
|
.polygon-run-limitations h3 {
|
||||||
margin-top: 0.4rem;
|
margin-top: 0.4rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.94rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
.polygon-run-safety-boundary p {
|
.polygon-run-safety-boundary p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.59rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -739,7 +739,7 @@
|
|||||||
.polygon-run-artifacts p,
|
.polygon-run-artifacts p,
|
||||||
.polygon-run-limitations li {
|
.polygon-run-limitations li {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.56rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-run-artifacts p {
|
.polygon-run-artifacts p {
|
||||||
@@ -780,7 +780,7 @@
|
|||||||
.polygon-qualification__heading h3 {
|
.polygon-qualification__heading h3 {
|
||||||
margin-top: 0.35rem;
|
margin-top: 0.35rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.15rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.035em;
|
letter-spacing: -0.035em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -788,7 +788,7 @@
|
|||||||
max-width: 46rem;
|
max-width: 46rem;
|
||||||
margin-top: 0.45rem;
|
margin-top: 0.45rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,7 +836,7 @@
|
|||||||
|
|
||||||
.polygon-qualification__providers dd {
|
.polygon-qualification__providers dd {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.88rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1072,14 +1072,14 @@
|
|||||||
.polygon-run-input h3 {
|
.polygon-run-input h3 {
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.94rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-run-input p {
|
.polygon-run-input p {
|
||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin-top: 0.32rem;
|
margin-top: 0.32rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1091,14 +1091,14 @@
|
|||||||
.polygon-review-lead h2 {
|
.polygon-review-lead h2 {
|
||||||
margin-top: 0.32rem;
|
margin-top: 0.32rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.35rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.04em;
|
letter-spacing: -0.04em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-review-lead p {
|
.polygon-review-lead p {
|
||||||
margin-top: 0.32rem;
|
margin-top: 0.32rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.66rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-review-lead > div:last-child {
|
.polygon-review-lead > div:last-child {
|
||||||
@@ -1147,7 +1147,7 @@
|
|||||||
.dataset-sequence-review__truth h2 {
|
.dataset-sequence-review__truth h2 {
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1155,7 +1155,7 @@
|
|||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
margin-top: 0.38rem;
|
margin-top: 0.38rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.63rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1183,7 +1183,7 @@
|
|||||||
.dataset-sequence-review__truth dd {
|
.dataset-sequence-review__truth dd {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 670;
|
font-weight: 670;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1227,7 +1227,7 @@
|
|||||||
|
|
||||||
.rellis-review__metrics strong {
|
.rellis-review__metrics strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rellis-review__policy {
|
.rellis-review__policy {
|
||||||
@@ -1246,14 +1246,14 @@
|
|||||||
.rellis-review__policy h3 {
|
.rellis-review__policy h3 {
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.95rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rellis-review__policy p {
|
.rellis-review__policy p {
|
||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1413,7 +1413,7 @@
|
|||||||
|
|
||||||
.polygon-review-frame-metrics strong {
|
.polygon-review-frame-metrics strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.02rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 680;
|
font-weight: 680;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1525,14 +1525,14 @@
|
|||||||
.dataset-fragment-analysis h3 {
|
.dataset-fragment-analysis h3 {
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-fragment-analysis p {
|
.dataset-fragment-analysis p {
|
||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1545,7 +1545,7 @@
|
|||||||
|
|
||||||
.dataset-fragment-analysis__verdict strong {
|
.dataset-fragment-analysis__verdict strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.35rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-fragment-analysis__verdict span,
|
.dataset-fragment-analysis__verdict span,
|
||||||
@@ -1644,7 +1644,7 @@
|
|||||||
|
|
||||||
.dataset-fragment-risks strong {
|
.dataset-fragment-risks strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.rellis-review__decision {
|
.rellis-review__decision {
|
||||||
@@ -1706,13 +1706,13 @@
|
|||||||
.polygon-review-summary h3 {
|
.polygon-review-summary h3 {
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.94rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-review-summary > p {
|
.polygon-review-summary > p {
|
||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1802,7 +1802,7 @@
|
|||||||
gap: 0.45rem;
|
gap: 0.45rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.54rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-review-analysis__content p i {
|
.polygon-review-analysis__content p i {
|
||||||
@@ -1837,14 +1837,14 @@
|
|||||||
|
|
||||||
.polygon-review-unavailable h3 {
|
.polygon-review-unavailable h3 {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-review-unavailable p,
|
.polygon-review-unavailable p,
|
||||||
.polygon-review-unavailable small {
|
.polygon-review-unavailable small {
|
||||||
max-width: 44rem;
|
max-width: 44rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1876,7 +1876,7 @@
|
|||||||
gap: 0.65rem;
|
gap: 0.65rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.54rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.polygon-run-technical__content dd {
|
.polygon-run-technical__content dd {
|
||||||
@@ -1935,7 +1935,7 @@
|
|||||||
|
|
||||||
.capability-summary strong {
|
.capability-summary strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.25rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1960,7 +1960,7 @@
|
|||||||
|
|
||||||
.lidar-device-context__identity strong {
|
.lidar-device-context__identity strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-device-context__identity small {
|
.lidar-device-context__identity small {
|
||||||
@@ -1983,7 +1983,7 @@
|
|||||||
.lidar-device-context__verdict p {
|
.lidar-device-context__verdict p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2062,14 +2062,14 @@
|
|||||||
.dataset-purpose h2 {
|
.dataset-purpose h2 {
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.15rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-purpose p {
|
.dataset-purpose p {
|
||||||
max-width: 54rem;
|
max-width: 54rem;
|
||||||
margin-top: 0.45rem;
|
margin-top: 0.45rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.72rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2111,7 +2111,7 @@
|
|||||||
|
|
||||||
.dataset-state p {
|
.dataset-state p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.72rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-library {
|
.dataset-library {
|
||||||
@@ -2131,7 +2131,7 @@
|
|||||||
.dataset-library h2 {
|
.dataset-library h2 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-library__entries {
|
.dataset-library__entries {
|
||||||
@@ -2168,14 +2168,14 @@
|
|||||||
.contour-health-summary h2 {
|
.contour-health-summary h2 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contour-health-summary p {
|
.contour-health-summary p {
|
||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
margin-top: 0.35rem;
|
margin-top: 0.35rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2213,7 +2213,7 @@
|
|||||||
|
|
||||||
.contour-health-kpis strong {
|
.contour-health-kpis strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.15rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contour-node-grid {
|
.contour-node-grid {
|
||||||
@@ -2241,7 +2241,7 @@
|
|||||||
.contour-node h3 {
|
.contour-node h3 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.95rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.contour-node dl {
|
.contour-node dl {
|
||||||
@@ -2398,7 +2398,7 @@
|
|||||||
border-radius: 0.8rem;
|
border-radius: 0.8rem;
|
||||||
background: color-mix(in srgb, var(--nodedc-accent) 13%, transparent);
|
background: color-mix(in srgb, var(--nodedc-accent) 13%, transparent);
|
||||||
color: var(--nodedc-accent);
|
color: var(--nodedc-accent);
|
||||||
font-size: 1rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2411,14 +2411,14 @@
|
|||||||
.dataset-entry h3 {
|
.dataset-entry h3 {
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-entry__identity p {
|
.dataset-entry__identity p {
|
||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin-top: 0.45rem;
|
margin-top: 0.45rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.68rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2466,7 +2466,7 @@
|
|||||||
|
|
||||||
.dataset-entry footer p {
|
.dataset-entry footer p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.64rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2510,7 +2510,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
color: var(--nodedc-text-secondary);
|
color: var(--nodedc-text-secondary);
|
||||||
font-size: 0.58rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-preview {
|
.dataset-preview {
|
||||||
@@ -2531,7 +2531,7 @@
|
|||||||
.dataset-preview h2 {
|
.dataset-preview h2 {
|
||||||
margin-top: 0.22rem;
|
margin-top: 0.22rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.92rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataset-preview .lidar-ground-scene {
|
.dataset-preview .lidar-ground-scene {
|
||||||
@@ -2665,7 +2665,7 @@
|
|||||||
.dataset-contract p,
|
.dataset-contract p,
|
||||||
.dataset-contract li {
|
.dataset-contract li {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.6rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2706,7 +2706,7 @@
|
|||||||
.lidar-quality-message p {
|
.lidar-quality-message p {
|
||||||
max-width: 46rem;
|
max-width: 46rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.76rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2851,7 +2851,7 @@
|
|||||||
margin: 0.28rem 0 0;
|
margin: 0.28rem 0 0;
|
||||||
max-width: 49rem;
|
max-width: 49rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.64rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3074,7 +3074,7 @@
|
|||||||
.lidar-local-surface__heading h3 {
|
.lidar-local-surface__heading h3 {
|
||||||
margin-top: 0.22rem;
|
margin-top: 0.22rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.92rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-local-surface__heading p,
|
.lidar-local-surface__heading p,
|
||||||
@@ -3082,7 +3082,7 @@
|
|||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin-top: 0.28rem;
|
margin-top: 0.28rem;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3240,7 +3240,7 @@
|
|||||||
.lidar-local-surface__review > footer,
|
.lidar-local-surface__review > footer,
|
||||||
.lidar-local-surface__review > p {
|
.lidar-local-surface__review > p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.56rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-local-surface__review > header strong {
|
.lidar-local-surface__review > header strong {
|
||||||
@@ -3416,7 +3416,7 @@
|
|||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3558,13 +3558,13 @@
|
|||||||
.lidar-ground-footer,
|
.lidar-ground-footer,
|
||||||
.lidar-ground-empty {
|
.lidar-ground-empty {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.62rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-ground-metrics strong {
|
.lidar-ground-metrics strong {
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 1.15rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3622,7 +3622,7 @@
|
|||||||
.lidar-ground-review h3 {
|
.lidar-ground-review h3 {
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
color: var(--nodedc-text-primary);
|
color: var(--nodedc-text-primary);
|
||||||
font-size: 0.95rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-ground-review p,
|
.lidar-ground-review p,
|
||||||
@@ -3630,7 +3630,7 @@
|
|||||||
.lidar-ground-scene__toolbar,
|
.lidar-ground-scene__toolbar,
|
||||||
.lidar-ground-legend {
|
.lidar-ground-legend {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.61rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3698,7 +3698,7 @@
|
|||||||
height: 1.75rem;
|
height: 1.75rem;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 0.82rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lidar-ground-frame-control button:disabled {
|
.lidar-ground-frame-control button:disabled {
|
||||||
@@ -4097,7 +4097,7 @@
|
|||||||
|
|
||||||
.map-inspector h3 {
|
.map-inspector h3 {
|
||||||
margin: 0.52rem 0 1rem;
|
margin: 0.52rem 0 1rem;
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-summary-list {
|
.layer-summary-list {
|
||||||
@@ -4141,7 +4141,7 @@
|
|||||||
|
|
||||||
.timeline-panel__head h3 {
|
.timeline-panel__head h3 {
|
||||||
margin: 0.48rem 0 0;
|
margin: 0.48rem 0 0;
|
||||||
font-size: 1.05rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-panel__controls {
|
.timeline-panel__controls {
|
||||||
@@ -4264,7 +4264,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mission-readiness strong {
|
.mission-readiness strong {
|
||||||
font-size: 4rem;
|
font-size: var(--nodedc-font-size-md);
|
||||||
font-weight: 580;
|
font-weight: 580;
|
||||||
letter-spacing: -0.08em;
|
letter-spacing: -0.08em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@@ -4273,7 +4273,7 @@
|
|||||||
.mission-readiness span,
|
.mission-readiness span,
|
||||||
.mission-summary p {
|
.mission-summary p {
|
||||||
color: var(--nodedc-text-muted);
|
color: var(--nodedc-text-muted);
|
||||||
font-size: 0.66rem;
|
font-size: var(--nodedc-font-size-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mission-summary p {
|
.mission-summary p {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {useEffect,useState} from 'react';
|
import {useEffect,useState} from 'react';
|
||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
import {workerConnectionStatus} from '../core/system/workerConnectionStatus';
|
import {workerConnectionStatus} from '../core/system/workerConnectionStatus';
|
||||||
import {IconButton,Icon,StatusBadge} from '@nodedc/ui-react';
|
import { Description,IconButton,Icon,StatusBadge} from '@nodedc/ui-react';
|
||||||
import type {MissionRuntimeState} from '../core/runtime/contracts';
|
import type {MissionRuntimeState} from '../core/runtime/contracts';
|
||||||
import {boardAvailable,contourSummary,readContourSnapshot,type ContourSnapshot} from '../core/system/contourHealth';
|
import {boardAvailable,contourSummary,readContourSnapshot,type ContourSnapshot} from '../core/system/contourHealth';
|
||||||
import {startSequentialPolling} from '../core/system/sequentialPolling';
|
import {startSequentialPolling} from '../core/system/sequentialPolling';
|
||||||
@@ -49,7 +49,7 @@ export function ContourHealthWorkspace({state,headerToolsHost}:{state:MissionRun
|
|||||||
return <div className="contour-health-dashboard">
|
return <div className="contour-health-dashboard">
|
||||||
{headerToolsHost?createPortal(refresh,headerToolsHost):refresh}
|
{headerToolsHost?createPortal(refresh,headerToolsHost):refresh}
|
||||||
<section className="contour-health-summary">
|
<section className="contour-health-summary">
|
||||||
<div><h2>Узлы и связь</h2><p>Mission Core, зарегистрированные вычислители и бортовые компьютеры аппаратов.</p></div>
|
<div><h2>Узлы и связь</h2><Description>Mission Core, зарегистрированные вычислители и бортовые компьютеры аппаратов.</Description></div>
|
||||||
<div className="contour-health-summary__status"><StatusBadge tone={loading?'warning':summary.tone}>{loading?'Проверка состояния':summary.label}</StatusBadge></div>
|
<div className="contour-health-summary__status"><StatusBadge tone={loading?'warning':summary.tone}>{loading?'Проверка состояния':summary.label}</StatusBadge></div>
|
||||||
</section>
|
</section>
|
||||||
<section className="contour-health-kpis" aria-label="Сводка состояния контура">
|
<section className="contour-health-kpis" aria-label="Сводка состояния контура">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
GlassSurface,
|
GlassSurface,
|
||||||
StatusBadge,
|
StatusBadge,
|
||||||
@@ -179,12 +179,12 @@ export function DatasetGatewayWorkspace() {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ЗАЧЕМ ЭТО НУЖНО</span>
|
<span className="section-eyebrow">ЗАЧЕМ ЭТО НУЖНО</span>
|
||||||
<h2>Независимая проверка алгоритмов</h2>
|
<h2>Независимая проверка алгоритмов</h2>
|
||||||
<p>
|
<Description>
|
||||||
Каждый источник остаётся отдельным: собственные sensor domain,
|
Каждый источник остаётся отдельным: собственные sensor domain,
|
||||||
разметка, лицензия и результаты. Совпадение результата на GOOSE и
|
разметка, лицензия и результаты. Совпадение результата на GOOSE и
|
||||||
RELLIS снижает риск подгонки под один датасет, но не заменяет replay
|
RELLIS снижает риск подгонки под один датасет, но не заменяет replay
|
||||||
реального сенсора и closed-loop симуляцию.
|
реального сенсора и closed-loop симуляцию.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<ol aria-label="Как использовать датасет">
|
<ol aria-label="Как использовать датасет">
|
||||||
<li><span>01</span>Выбрать источник</li>
|
<li><span>01</span>Выбрать источник</li>
|
||||||
@@ -198,13 +198,13 @@ export function DatasetGatewayWorkspace() {
|
|||||||
<GlassSurface className="dataset-state" padding="lg">
|
<GlassSurface className="dataset-state" padding="lg">
|
||||||
<StatusBadge tone="accent">Проверяем каталог</StatusBadge>
|
<StatusBadge tone="accent">Проверяем каталог</StatusBadge>
|
||||||
<h2>Читаем допущенные источники</h2>
|
<h2>Читаем допущенные источники</h2>
|
||||||
<p>Ни один большой архив не загружается автоматически.</p>
|
<Description>Ни один большой архив не загружается автоматически.</Description>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
) : error ? (
|
) : error ? (
|
||||||
<GlassSurface className="dataset-state" padding="lg">
|
<GlassSurface className="dataset-state" padding="lg">
|
||||||
<StatusBadge tone="danger">Каталог недоступен</StatusBadge>
|
<StatusBadge tone="danger">Каталог недоступен</StatusBadge>
|
||||||
<h2>Датасеты не открыты</h2>
|
<h2>Датасеты не открыты</h2>
|
||||||
<p>{error}</p>
|
<Description>{error}</Description>
|
||||||
<Button
|
<Button
|
||||||
size="compact"
|
size="compact"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
@@ -249,7 +249,7 @@ export function DatasetGatewayWorkspace() {
|
|||||||
{source.sourceKind === "rellis" ? " · RESEARCH" : ""}
|
{source.sourceKind === "rellis" ? " · RESEARCH" : ""}
|
||||||
</span>
|
</span>
|
||||||
<h3>{source.displayName}</h3>
|
<h3>{source.displayName}</h3>
|
||||||
<p>{sourceDescription(source)}</p>
|
<Description>{sourceDescription(source)}</Description>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<dl>
|
<dl>
|
||||||
@@ -278,15 +278,15 @@ export function DatasetGatewayWorkspace() {
|
|||||||
aria-label={`Загрузка ${source.displayName}`}
|
aria-label={`Загрузка ${source.displayName}`}
|
||||||
>
|
>
|
||||||
<span style={{ width: `${downloadProgress * 100}%` }} />
|
<span style={{ width: `${downloadProgress * 100}%` }} />
|
||||||
<p>
|
<Description>
|
||||||
{formatBytes(source.archive.bytesTransferred)}
|
{formatBytes(source.archive.bytesTransferred)}
|
||||||
{" из "}
|
{" из "}
|
||||||
{formatBytes(source.archive.totalBytes)}
|
{formatBytes(source.archive.totalBytes)}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<footer>
|
<footer>
|
||||||
<p>{sourceFooter(source, catalog.storage.admitted)}</p>
|
<Description>{sourceFooter(source, catalog.storage.admitted)}</Description>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
size="compact"
|
size="compact"
|
||||||
@@ -334,7 +334,7 @@ export function DatasetGatewayWorkspace() {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="warning">Review недоступен</StatusBadge>
|
<StatusBadge tone="warning">Review недоступен</StatusBadge>
|
||||||
<h3>GOOSE принят, но анализ не опубликован</h3>
|
<h3>GOOSE принят, но анализ не опубликован</h3>
|
||||||
<p>{runError ?? "Нет совместимой версии покадрового анализа."}</p>
|
<Description>{runError ?? "Нет совместимой версии покадрового анализа."}</Description>
|
||||||
</section>
|
</section>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -389,15 +389,15 @@ export function DatasetGatewayWorkspace() {
|
|||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h3>Storage gate</h3>
|
<h3>Storage gate</h3>
|
||||||
<p>{catalog.storage.requiredWindowsRoot}</p>
|
<Description>{catalog.storage.requiredWindowsRoot}</Description>
|
||||||
<p>{catalog.storage.requiredWslRoot}</p>
|
<Description>{catalog.storage.requiredWslRoot}</Description>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h3>Граница реального сенсора</h3>
|
<h3>Граница реального сенсора</h3>
|
||||||
<p>
|
<Description>
|
||||||
Текущий MQTT-вход — vendor-mapped increment, а не native scan.
|
Текущий MQTT-вход — vendor-mapped increment, а не native scan.
|
||||||
Отсутствующие per-point time и ring/line не восстанавливаются.
|
Отсутствующие per-point time и ring/line не восстанавливаются.
|
||||||
</p>
|
</Description>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, GlassSurface, Icon, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Button, GlassSurface, Icon, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import { useDevicePluginHost } from "../core/device-plugins/DevicePluginHost";
|
import { useDevicePluginHost } from "../core/device-plugins/DevicePluginHost";
|
||||||
import type { RegisteredDeviceModel } from "../core/device-plugins/contracts";
|
import type { RegisteredDeviceModel } from "../core/device-plugins/contracts";
|
||||||
@@ -25,7 +25,7 @@ function ModelCard({
|
|||||||
{model.verified ? "Проверено" : "Экспериментально"}
|
{model.verified ? "Проверено" : "Экспериментально"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
</header>
|
</header>
|
||||||
<p>{model.description}</p>
|
<Description>{model.description}</Description>
|
||||||
<dl>
|
<dl>
|
||||||
<div><dt>Категория</dt><dd>{model.category}</dd></div>
|
<div><dt>Категория</dt><dd>{model.category}</dd></div>
|
||||||
<div><dt>Плагин</dt><dd>{plugin.manifest.metadata.displayName} · v{plugin.manifest.metadata.version}</dd></div>
|
<div><dt>Плагин</dt><dd>{plugin.manifest.metadata.displayName} · v{plugin.manifest.metadata.version}</dd></div>
|
||||||
@@ -63,10 +63,10 @@ export function DeviceWorkspace({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ЛОКАЛЬНОЕ УСТРОЙСТВО · ШАГ 01</span>
|
<span className="section-eyebrow">ЛОКАЛЬНОЕ УСТРОЙСТВО · ШАГ 01</span>
|
||||||
<h2>Выберите модель устройства</h2>
|
<h2>Выберите модель устройства</h2>
|
||||||
<p>
|
<Description>
|
||||||
Mission Core покажет только сценарий выбранного плагина. До выбора модели нет
|
Mission Core покажет только сценарий выбранного плагина. До выбора модели нет
|
||||||
поиска оборудования, сетевых реквизитов, управления потоком или фиктивных метрик.
|
поиска оборудования, сетевых реквизитов, управления потоком или фиктивных метрик.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div className="workspace-lead__status">
|
<div className="workspace-lead__status">
|
||||||
<StatusBadge tone="neutral">Модель не выбрана</StatusBadge>
|
<StatusBadge tone="neutral">Модель не выбрана</StatusBadge>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
ConfirmationModal,
|
ConfirmationModal,
|
||||||
Select,
|
Select,
|
||||||
@@ -156,7 +156,7 @@ export function E30HumanReviewPanel({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ТРЕБУЕТСЯ РЕШЕНИЕ</span>
|
<span className="section-eyebrow">ТРЕБУЕТСЯ РЕШЕНИЕ</span>
|
||||||
<h3>{reviewPrompt.question}</h3>
|
<h3>{reviewPrompt.question}</h3>
|
||||||
<p>{reviewPrompt.focus}</p>
|
<Description>{reviewPrompt.focus}</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone="warning">
|
<StatusBadge tone="warning">
|
||||||
0 / {generation.summary.humanExceptionCount}
|
0 / {generation.summary.humanExceptionCount}
|
||||||
@@ -191,7 +191,7 @@ export function E30HumanReviewPanel({
|
|||||||
<h3>
|
<h3>
|
||||||
{finalized ? "Проверка зафиксирована" : reviewPrompt.question}
|
{finalized ? "Проверка зафиксирована" : reviewPrompt.question}
|
||||||
</h3>
|
</h3>
|
||||||
{!finalized ? <p>{reviewPrompt.focus}</p> : null}
|
{!finalized ? <Description>{reviewPrompt.focus}</Description> : null}
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={finalized ? "success" : "accent"}>
|
<StatusBadge tone={finalized ? "success" : "accent"}>
|
||||||
{review.reviewedItemCount} / {review.itemCount}
|
{review.reviewedItemCount} / {review.itemCount}
|
||||||
@@ -199,10 +199,10 @@ export function E30HumanReviewPanel({
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
{finalized ? (
|
{finalized ? (
|
||||||
<p>
|
<Description>
|
||||||
Все спорные кадры получили отдельное человеческое решение.
|
Все спорные кадры получили отдельное человеческое решение.
|
||||||
Исходные доказательства сохранены без изменений.
|
Исходные доказательства сохранены без изменений.
|
||||||
</p>
|
</Description>
|
||||||
) : item ? (
|
) : item ? (
|
||||||
<>
|
<>
|
||||||
<div className="e30-human-review__form">
|
<div className="e30-human-review__form">
|
||||||
@@ -268,10 +268,10 @@ export function E30HumanReviewPanel({
|
|||||||
open={finalizeOpen}
|
open={finalizeOpen}
|
||||||
title="Зафиксировать проверку?"
|
title="Зафиксировать проверку?"
|
||||||
description={(
|
description={(
|
||||||
<p>
|
<Description>
|
||||||
Будет создан неизменяемый набор из {review.itemCount} решений.
|
Будет создан неизменяемый набор из {review.itemCount} решений.
|
||||||
После фиксации их нельзя будет изменить.
|
После фиксации их нельзя будет изменить.
|
||||||
</p>
|
</Description>
|
||||||
)}
|
)}
|
||||||
confirmLabel="Зафиксировать"
|
confirmLabel="Зафиксировать"
|
||||||
pendingLabel="Фиксируем…"
|
pendingLabel="Фиксируем…"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
GlassSurface,
|
GlassSurface,
|
||||||
Icon,
|
Icon,
|
||||||
@@ -192,10 +192,10 @@ export function E30ReviewWorkspace({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">CAMERA-BACKED REVIEW SUBSTRATE</span>
|
<span className="section-eyebrow">CAMERA-BACKED REVIEW SUBSTRATE</span>
|
||||||
<h2>A2 evidence · A3 engineering audit</h2>
|
<h2>A2 evidence · A3 engineering audit</h2>
|
||||||
<p>
|
<Description>
|
||||||
Точный camera frame, LiDAR-проекция и синхронный 3D сохраняют A2
|
Точный camera frame, LiDAR-проекция и синхронный 3D сохраняют A2
|
||||||
неизменяемым. A3 выпускает отдельные решения с явным provenance.
|
неизменяемым. A3 выпускает отдельные решения с явным provenance.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={result.cameraEvidenceAvailable ? "accent" : "warning"}>
|
<StatusBadge tone={result.cameraEvidenceAvailable ? "accent" : "warning"}>
|
||||||
{result.cameraEvidenceAvailable
|
{result.cameraEvidenceAvailable
|
||||||
@@ -289,9 +289,9 @@ export function E30ReviewWorkspace({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">{detail.reviewKey}</span>
|
<span className="section-eyebrow">{detail.reviewKey}</span>
|
||||||
<h3>{itemTitle(detail)}</h3>
|
<h3>{itemTitle(detail)}</h3>
|
||||||
<p>
|
<Description>
|
||||||
{detail.snapshot.geometryReason ?? "Независимый geometry-only слой"}
|
{detail.snapshot.geometryReason ?? "Независимый geometry-only слой"}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={detail.stratum === "conflict" ? "danger" : "neutral"}>
|
<StatusBadge tone={detail.stratum === "conflict" ? "danger" : "neutral"}>
|
||||||
{FILTER_LABELS[detail.stratum]}
|
{FILTER_LABELS[detail.stratum]}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
type CSSProperties,
|
type CSSProperties,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { StatusBadge } from "@nodedc/ui-react";
|
import { Description, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchGroundReview,
|
fetchGroundReview,
|
||||||
@@ -385,7 +385,7 @@ export function GooseDatasetReview({ runId }: GooseDatasetReviewProps) {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="danger">Источник недоступен</StatusBadge>
|
<StatusBadge tone="danger">Источник недоступен</StatusBadge>
|
||||||
<h3>Не удалось открыть GOOSE</h3>
|
<h3>Не удалось открыть GOOSE</h3>
|
||||||
<p>{error}</p>
|
<Description>{error}</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,7 @@ export function GooseDatasetReview({ runId }: GooseDatasetReviewProps) {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="accent">Читаем индекс</StatusBadge>
|
<StatusBadge tone="accent">Читаем индекс</StatusBadge>
|
||||||
<h3>Открываем фрагменты GOOSE</h3>
|
<h3>Открываем фрагменты GOOSE</h3>
|
||||||
<p>Загружаем только bounded preview, исходный архив остаётся на worker.</p>
|
<Description>Загружаем только bounded preview, исходный архив остаётся на worker.</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -406,12 +406,12 @@ export function GooseDatasetReview({ runId }: GooseDatasetReviewProps) {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">СОДЕРЖИМОЕ ДАТАСЕТА</span>
|
<span className="section-eyebrow">СОДЕРЖИМОЕ ДАТАСЕТА</span>
|
||||||
<h2>8 отдельных фрагментов исходных записей</h2>
|
<h2>8 отдельных фрагментов исходных записей</h2>
|
||||||
<p>
|
<Description>
|
||||||
Validation ZIP содержит {review.frameCount} разреженных размеченных
|
Validation ZIP содержит {review.frameCount} разреженных размеченных
|
||||||
LiDAR-оборотов. Каждый фрагмент относится к отдельному эпизоду съёмки.
|
LiDAR-оборотов. Каждый фрагмент относится к отдельному эпизоду съёмки.
|
||||||
Play ниже — ускоренный просмотр доступных сканов выбранного фрагмента,
|
Play ниже — ускоренный просмотр доступных сканов выбранного фрагмента,
|
||||||
а не воспроизведение движения машины в реальном времени.
|
а не воспроизведение движения машины в реальном времени.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<dl>
|
<dl>
|
||||||
<div><dt>Фрагментов</dt><dd>{sequences.length}</dd></div>
|
<div><dt>Фрагментов</dt><dd>{sequences.length}</dd></div>
|
||||||
@@ -578,11 +578,11 @@ export function GooseDatasetReview({ runId }: GooseDatasetReviewProps) {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">РЕЗУЛЬТАТЫ ЭТОГО ФРАГМЕНТА</span>
|
<span className="section-eyebrow">РЕЗУЛЬТАТЫ ЭТОГО ФРАГМЕНТА</span>
|
||||||
<h3>Что изменилось после Patchwork++</h3>
|
<h3>Что изменилось после Patchwork++</h3>
|
||||||
<p>
|
<Description>
|
||||||
Средние значения рассчитаны только по{" "}
|
Средние значения рассчитаны только по{" "}
|
||||||
{selectedSequence.frames.length} сканам выбранного фрагмента.
|
{selectedSequence.frames.length} сканам выбранного фрагмента.
|
||||||
Они не смешиваются с остальными частями датасета.
|
Они не смешиваются с остальными частями датасета.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div className="dataset-fragment-analysis__verdict">
|
<div className="dataset-fragment-analysis__verdict">
|
||||||
<strong>{formatDelta(sequenceAnalysis.groundIou.delta)}</strong>
|
<strong>{formatDelta(sequenceAnalysis.groundIou.delta)}</strong>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { StatusBadge } from "@nodedc/ui-react";
|
import { Description, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchLidarLocalSurfaceFrame,
|
fetchLidarLocalSurfaceFrame,
|
||||||
@@ -243,11 +243,11 @@ export function LidarLocalSurfacePanel({
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">РЕЗУЛЬТАТ ОБРАБОТКИ · L2.6</span>
|
<span className="section-eyebrow">РЕЗУЛЬТАТ ОБРАБОТКИ · L2.6</span>
|
||||||
<h3>Поверхность и наблюдаемые препятствия</h3>
|
<h3>Поверхность и наблюдаемые препятствия</h3>
|
||||||
<p>
|
<Description>
|
||||||
Основной результат выбранного интервала. Поверхность строится по
|
Основной результат выбранного интервала. Поверхность строится по
|
||||||
предыдущему TTL-окну и проверяется на следующем кадре; текущий кадр
|
предыдущему TTL-окну и проверяется на следующем кадре; текущий кадр
|
||||||
и фиксированная высота в prediction input не используются.
|
и фиксированная высота в prediction input не используются.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge
|
<StatusBadge
|
||||||
tone={
|
tone={
|
||||||
@@ -435,11 +435,11 @@ export function LidarLocalSurfacePanel({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<Description>
|
||||||
{surfaceView === "prediction-residual"
|
{surfaceView === "prediction-residual"
|
||||||
? "Полупрозрачная плоскость построена только по предыдущему TTL-окну. Крупные точки — нижние cell-наблюдения текущего кадра: оранжевое выше, пурпурное ниже; это объяснение residual, не разметка препятствий."
|
? "Полупрозрачная плоскость построена только по предыдущему TTL-окну. Крупные точки — нижние cell-наблюдения текущего кадра: оранжевое выше, пурпурное ниже; это объяснение residual, не разметка препятствий."
|
||||||
: "Жёлтый слой — геометрический кандидат, не распознанный бордюр и не ground truth. Пустота остаётся unknown; движение этим слоем не разрешается."}
|
: "Жёлтый слой — геометрический кандидат, не распознанный бордюр и не ground truth. Пустота остаётся unknown; движение этим слоем не разрешается."}
|
||||||
</p>
|
</Description>
|
||||||
</aside>
|
</aside>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
@@ -448,10 +448,10 @@ export function LidarLocalSurfacePanel({
|
|||||||
<div className="lidar-local-surface__diagnostics">
|
<div className="lidar-local-surface__diagnostics">
|
||||||
<header>
|
<header>
|
||||||
<span className="section-eyebrow">ДИАГНОСТИКА ЗАПИСИ</span>
|
<span className="section-eyebrow">ДИАГНОСТИКА ЗАПИСИ</span>
|
||||||
<p>
|
<Description>
|
||||||
График и очередь ниже помогают выбрать кадр для разбора, но не
|
График и очередь ниже помогают выбрать кадр для разбора, но не
|
||||||
заменяют визуальную проверку результата выше.
|
заменяют визуальную проверку результата выше.
|
||||||
</p>
|
</Description>
|
||||||
</header>
|
</header>
|
||||||
<LidarLocalSurfaceTimeline
|
<LidarLocalSurfaceTimeline
|
||||||
timeline={timeline}
|
timeline={timeline}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Description } from '@nodedc/ui-react';
|
||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -334,7 +335,7 @@ export function LidarLocalSurfaceReviewQueue({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<p>В этой группе нет кадров.</p>
|
<Description>В этой группе нет кадров.</Description>
|
||||||
)}
|
)}
|
||||||
<footer>
|
<footer>
|
||||||
Хвост: p95 ≥ {formatMeters(review.criteria.predictionTailResidualP95M)} м.
|
Хвост: p95 ≥ {formatMeters(review.criteria.predictionTailResidualP95M)} м.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
GlassSurface,
|
GlassSurface,
|
||||||
StatusBadge,
|
StatusBadge,
|
||||||
@@ -222,13 +222,13 @@ export function LidarQualityWorkspace({
|
|||||||
<GlassSurface className="lidar-quality-message" padding="lg">
|
<GlassSurface className="lidar-quality-message" padding="lg">
|
||||||
<StatusBadge tone="accent">Проверка evidence</StatusBadge>
|
<StatusBadge tone="accent">Проверка evidence</StatusBadge>
|
||||||
<h2>Читаем LiDAR replay и quality report</h2>
|
<h2>Читаем LiDAR replay и quality report</h2>
|
||||||
<p>Интерфейс покажет pack только после проверки manifest, hashes и equivalence gate.</p>
|
<Description>Интерфейс покажет pack только после проверки manifest, hashes и equivalence gate.</Description>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
) : error ? (
|
) : error ? (
|
||||||
<GlassSurface className="lidar-quality-message" padding="lg">
|
<GlassSurface className="lidar-quality-message" padding="lg">
|
||||||
<StatusBadge tone="danger">Данные недоступны</StatusBadge>
|
<StatusBadge tone="danger">Данные недоступны</StatusBadge>
|
||||||
<h2>LiDAR quality report не открыт</h2>
|
<h2>LiDAR quality report не открыт</h2>
|
||||||
<p>{error}</p>
|
<Description>{error}</Description>
|
||||||
<Button
|
<Button
|
||||||
size="compact"
|
size="compact"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
@@ -243,10 +243,10 @@ export function LidarQualityWorkspace({
|
|||||||
{catalog?.configured ? "Каталог пуст" : "Storage не настроен"}
|
{catalog?.configured ? "Каталог пуст" : "Storage не настроен"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<h2>Lossless LiDAR replay пока не опубликован</h2>
|
<h2>Lossless LiDAR replay пока не опубликован</h2>
|
||||||
<p>
|
<Description>
|
||||||
После подготовки первого v2 pack здесь появятся field retention, cadence,
|
После подготовки первого v2 pack здесь появятся field retention, cadence,
|
||||||
intensity, pose coverage и readiness следующих стадий.
|
intensity, pose coverage и readiness следующих стадий.
|
||||||
</p>
|
</Description>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -261,10 +261,10 @@ export function LidarQualityWorkspace({
|
|||||||
</div>
|
</div>
|
||||||
<div className="lidar-device-context__verdict">
|
<div className="lidar-device-context__verdict">
|
||||||
<StatusBadge tone="warning">Диагностическая запись</StatusBadge>
|
<StatusBadge tone="warning">Диагностическая запись</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
Данные воспроизводятся и доступны для визуального разбора.
|
Данные воспроизводятся и доступны для визуального разбора.
|
||||||
Физическая точность сенсора этой записью не аттестована.
|
Физическая точность сенсора этой записью не аттестована.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
size="compact"
|
size="compact"
|
||||||
@@ -289,11 +289,11 @@ export function LidarQualityWorkspace({
|
|||||||
? `Исходная сцена: ${selectedFieldWindow?.label ?? fieldReview.displayName}`
|
? `Исходная сцена: ${selectedFieldWindow?.label ?? fieldReview.displayName}`
|
||||||
: `Кадр ${groundFrameIndex + 1} из ${groundBenchmark?.frames ?? 0}`}
|
: `Кадр ${groundFrameIndex + 1} из ${groundBenchmark?.frames ?? 0}`}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<Description>
|
||||||
{fieldReview
|
{fieldReview
|
||||||
? "Накопленное облако LiDAR и кадр камеры — контекст выбранного интервала. Результат обработки L2.6 расположен ниже."
|
? "Накопленное облако LiDAR и кадр камеры — контекст выбранного интервала. Результат обработки L2.6 расположен ниже."
|
||||||
: "Полевая запись на этом хосте не подключена. Показываем доступную запись выбранного LiDAR без подмешивания публичных датасетов."}
|
: "Полевая запись на этом хосте не подключена. Показываем доступную запись выбранного LiDAR без подмешивания публичных датасетов."}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={fieldError ? "danger" : "warning"}>
|
<StatusBadge tone={fieldError ? "danger" : "warning"}>
|
||||||
{fieldError ? "Облако недоступно" : "Только собственные данные"}
|
{fieldError ? "Облако недоступно" : "Только собственные данные"}
|
||||||
@@ -453,13 +453,13 @@ export function LidarQualityWorkspace({
|
|||||||
|
|
||||||
<div className="lidar-field-review__explanation">
|
<div className="lidar-field-review__explanation">
|
||||||
<StatusBadge tone="warning">Не accuracy</StatusBadge>
|
<StatusBadge tone="warning">Не accuracy</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
Маски вычислены отдельно на каждом исходном скане и только
|
Маски вычислены отдельно на каждом исходном скане и только
|
||||||
затем сведены в map frame. Это legacy E10 vendor-map
|
затем сведены в map frame. Это legacy E10 vendor-map
|
||||||
derivative без intensity и независимой ground-разметки,
|
derivative без intensity и независимой ground-разметки,
|
||||||
поэтому результат предназначен для визуального разбора, а
|
поэтому результат предназначен для визуального разбора, а
|
||||||
не для production-gate.
|
не для production-gate.
|
||||||
</p>
|
</Description>
|
||||||
<div className="lidar-ground-legend">
|
<div className="lidar-ground-legend">
|
||||||
<span><i data-color="shared" />Ground у обоих</span>
|
<span><i data-color="shared" />Ground у обоих</span>
|
||||||
<span><i data-color="current" />Только current</span>
|
<span><i data-color="current" />Только current</span>
|
||||||
@@ -546,7 +546,7 @@ export function LidarQualityWorkspace({
|
|||||||
<StatusBadge tone={groundFrameError ? "danger" : "accent"}>
|
<StatusBadge tone={groundFrameError ? "danger" : "accent"}>
|
||||||
{groundFrameError ? "Кадр недоступен" : "Загрузка"}
|
{groundFrameError ? "Кадр недоступен" : "Загрузка"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<p>{groundFrameError ?? "Читаем облако LiDAR…"}</p>
|
<Description>{groundFrameError ?? "Читаем облако LiDAR…"}</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<footer>
|
<footer>
|
||||||
@@ -559,12 +559,12 @@ export function LidarQualityWorkspace({
|
|||||||
<StatusBadge tone={fieldError ? "danger" : "accent"}>
|
<StatusBadge tone={fieldError ? "danger" : "accent"}>
|
||||||
{fieldError ? "Ошибка загрузки" : "Проверка evidence"}
|
{fieldError ? "Ошибка загрузки" : "Проверка evidence"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
{fieldError
|
{fieldError
|
||||||
?? (fieldLoading
|
?? (fieldLoading
|
||||||
? "Читаем RAVNOVES00 field-review артефакт…"
|
? "Читаем RAVNOVES00 field-review артефакт…"
|
||||||
: "Field-review артефакт ещё не опубликован.")}
|
: "Field-review артефакт ещё не опубликован.")}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
@@ -747,11 +747,11 @@ export function LidarQualityWorkspace({
|
|||||||
ТЕХНИЧЕСКИЙ CONTRACT SLICE · VIEWER_LIVE
|
ТЕХНИЧЕСКИЙ CONTRACT SLICE · VIEWER_LIVE
|
||||||
</span>
|
</span>
|
||||||
<h3>Indoor-проверка point-aligned контракта</h3>
|
<h3>Indoor-проверка point-aligned контракта</h3>
|
||||||
<p>
|
<Description>
|
||||||
Этот короткий indoor-срез подтверждает выравнивание XYZ
|
Этот короткий indoor-срез подтверждает выравнивание XYZ
|
||||||
и масок, но не является полевой оценкой качества. Для
|
и масок, но не является полевой оценкой качества. Для
|
||||||
улицы используйте RAVNOVES00 выше.
|
улицы используйте RAVNOVES00 выше.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div className="lidar-ground-frame-status">
|
<div className="lidar-ground-frame-status">
|
||||||
<strong>
|
<strong>
|
||||||
@@ -836,7 +836,7 @@ export function LidarQualityWorkspace({
|
|||||||
<StatusBadge tone={groundFrameError ? "danger" : "accent"}>
|
<StatusBadge tone={groundFrameError ? "danger" : "accent"}>
|
||||||
{groundFrameError ? "Frame недоступен" : "Читаем frame"}
|
{groundFrameError ? "Frame недоступен" : "Читаем frame"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<p>{groundFrameError ?? "Проверяем point alignment и masks."}</p>
|
<Description>{groundFrameError ?? "Проверяем point alignment и masks."}</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="lidar-ground-legend">
|
<div className="lidar-ground-legend">
|
||||||
@@ -851,10 +851,10 @@ export function LidarQualityWorkspace({
|
|||||||
<StatusBadge tone="danger">
|
<StatusBadge tone="danger">
|
||||||
Входной контракт не принят
|
Входной контракт не принят
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
Firmware 3.0.2 подтверждает внутренний MID-360 raw feed,
|
Firmware 3.0.2 подтверждает внутренний MID-360 raw feed,
|
||||||
но текущий MQTT остаётся прореженным LIO/map-продуктом.
|
но текущий MQTT остаётся прореженным LIO/map-продуктом.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<StatusBadge tone="warning">
|
<StatusBadge tone="warning">
|
||||||
@@ -862,21 +862,21 @@ export function LidarQualityWorkspace({
|
|||||||
? "Высота применена диагностически"
|
? "Высота применена диагностически"
|
||||||
: "Высота не принята"}
|
: "Высота не принята"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
{groundNormalization?.heightEvidence === "operator-estimated"
|
{groundNormalization?.heightEvidence === "operator-estimated"
|
||||||
? `Ручной замер ${formatNumber(
|
? `Ручной замер ${formatNumber(
|
||||||
groundNormalization.sensorHeightM,
|
groundNormalization.sensorHeightM,
|
||||||
2,
|
2,
|
||||||
)} м сдвигает optical origin, но не заменяет runtime calibration.`
|
)} м сдвигает optical origin, но не заменяет runtime calibration.`
|
||||||
: "Нужна привязка optical origin к map и штатной установке."}
|
: "Нужна привязка optical origin к map и штатной установке."}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<StatusBadge tone="warning">Разметка не принята</StatusBadge>
|
<StatusBadge tone="warning">Разметка не принята</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
Ground IoU и recall появятся только после human review;
|
Ground IoU и recall появятся только после human review;
|
||||||
визуальное расхождение само по себе не является accuracy.
|
визуальное расхождение само по себе не является accuracy.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer className="lidar-ground-footer">
|
<footer className="lidar-ground-footer">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { lazy, Suspense, useEffect, useRef, useState } from "react";
|
import { lazy, Suspense, useEffect, useRef, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
GlassSurface,
|
GlassSurface,
|
||||||
StatusBadge,
|
StatusBadge,
|
||||||
@@ -190,10 +190,10 @@ export function PolygonLivePanel() {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ПОЛИГОН / LIVE</span>
|
<span className="section-eyebrow">ПОЛИГОН / LIVE</span>
|
||||||
<h2>Stock Ackermann Rover</h2>
|
<h2>Stock Ackermann Rover</h2>
|
||||||
<p>
|
<Description>
|
||||||
Провайдеры симуляции исполняются на отдельном worker; браузер показывает
|
Провайдеры симуляции исполняются на отдельном worker; браузер показывает
|
||||||
канонический срез ENU/FLU.
|
канонический срез ENU/FLU.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<StatusBadge
|
<StatusBadge
|
||||||
@@ -302,11 +302,11 @@ export function PolygonLivePanel() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="polygon-live-boundary">
|
<div className="polygon-live-boundary">
|
||||||
<StatusBadge tone="success">Virtual only</StatusBadge>
|
<StatusBadge tone="success">Virtual only</StatusBadge>
|
||||||
<p>
|
<Description>
|
||||||
Команды проходят только через заявленный controller provider
|
Команды проходят только через заявленный controller provider
|
||||||
{controllerProvider ? ` ${controllerProvider.providerId}` : ""}. Физического
|
{controllerProvider ? ` ${controllerProvider.providerId}` : ""}. Физического
|
||||||
actuator authority нет; live-поза остаётся диагностической.
|
actuator authority нет; live-поза остаётся диагностической.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
{error && <p className="polygon-live-error">{error}</p>}
|
{error && <p className="polygon-live-error">{error}</p>}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { StatusBadge } from "@nodedc/ui-react";
|
import { Description, StatusBadge } from "@nodedc/ui-react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchDatasetNativeScanPreview,
|
fetchDatasetNativeScanPreview,
|
||||||
@@ -112,7 +112,7 @@ function RellisSmokeReview() {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="danger">Smoke preview недоступен</StatusBadge>
|
<StatusBadge tone="danger">Smoke preview недоступен</StatusBadge>
|
||||||
<h3>RELLIS-3D не открыт</h3>
|
<h3>RELLIS-3D не открыт</h3>
|
||||||
<p>{error}</p>
|
<Description>{error}</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ function RellisSmokeReview() {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="accent">Проверяем пример</StatusBadge>
|
<StatusBadge tone="accent">Проверяем пример</StatusBadge>
|
||||||
<h3>Открываем официальный RELLIS scan</h3>
|
<h3>Открываем официальный RELLIS scan</h3>
|
||||||
<p>Исходные dataset bytes не переносятся в браузер.</p>
|
<Description>Исходные dataset bytes не переносятся в браузер.</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -162,13 +162,13 @@ function RellisSmokeReview() {
|
|||||||
? "Официальный Ouster scan читается без конвертации формата"
|
? "Официальный Ouster scan читается без конвертации формата"
|
||||||
: "Полный официальный release принят на worker D"}
|
: "Полный официальный release принят на worker D"}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<Description>
|
||||||
Frame {preview.frameId}: исходные XYZI и point-wise labels остались
|
Frame {preview.frameId}: исходные XYZI и point-wise labels остались
|
||||||
выровнены. {preview.compatibilitySmokeOnly
|
выровнены. {preview.compatibilitySmokeOnly
|
||||||
? "Это проверка reader, осей, цветов и ground-policy — ещё не сравнение алгоритмов."
|
? "Это проверка reader, осей, цветов и ground-policy — ещё не сравнение алгоритмов."
|
||||||
: "Scan входит в официальный validation split; результат алгоритмов публикуется отдельным квалификационным run."}
|
: "Scan входит в официальный validation split; результат алгоритмов публикуется отдельным квалификационным run."}
|
||||||
{" "}Это не основание для навигации.
|
{" "}Это не основание для навигации.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<dl>
|
<dl>
|
||||||
<div>
|
<div>
|
||||||
@@ -245,11 +245,11 @@ function RellisSmokeReview() {
|
|||||||
<header>
|
<header>
|
||||||
<span className="section-eyebrow">GROUND TARGET POLICY V1</span>
|
<span className="section-eyebrow">GROUND TARGET POLICY V1</span>
|
||||||
<h3>Что именно будет оцениваться</h3>
|
<h3>Что именно будет оцениваться</h3>
|
||||||
<p>
|
<Description>
|
||||||
Mapping принадлежит Mission Core и версионируется отдельно от
|
Mapping принадлежит Mission Core и версионируется отдельно от
|
||||||
ontology датасета. Вода, лужи, void, sky и неопределённый object не
|
ontology датасета. Вода, лужи, void, sky и неопределённый object не
|
||||||
засчитываются ни как ground, ни как obstacle.
|
засчитываются ни как ground, ни как obstacle.
|
||||||
</p>
|
</Description>
|
||||||
</header>
|
</header>
|
||||||
<div>
|
<div>
|
||||||
<article>
|
<article>
|
||||||
@@ -416,7 +416,7 @@ function RellisQualifiedReview({ runId }: { runId: string }) {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="danger">Review недоступен</StatusBadge>
|
<StatusBadge tone="danger">Review недоступен</StatusBadge>
|
||||||
<h3>RELLIS-3D не открыт</h3>
|
<h3>RELLIS-3D не открыт</h3>
|
||||||
<p>{error}</p>
|
<Description>{error}</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -425,7 +425,7 @@ function RellisQualifiedReview({ runId }: { runId: string }) {
|
|||||||
<section className="polygon-review-unavailable">
|
<section className="polygon-review-unavailable">
|
||||||
<StatusBadge tone="accent">Читаем индекс</StatusBadge>
|
<StatusBadge tone="accent">Читаем индекс</StatusBadge>
|
||||||
<h3>Открываем RELLIS validation</h3>
|
<h3>Открываем RELLIS validation</h3>
|
||||||
<p>Исходные архивы остаются на worker D; в браузер идёт bounded preview.</p>
|
<Description>Исходные архивы остаются на worker D; в браузер идёт bounded preview.</Description>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -449,11 +449,11 @@ function RellisQualifiedReview({ runId }: { runId: string }) {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">RELLIS · FULL VALIDATION</span>
|
<span className="section-eyebrow">RELLIS · FULL VALIDATION</span>
|
||||||
<h2>Две validation-последовательности Ouster OS1 с покадровым сравнением</h2>
|
<h2>Две validation-последовательности Ouster OS1 с покадровым сравнением</h2>
|
||||||
<p>
|
<Description>
|
||||||
Все {review.frameCount.toLocaleString("ru-RU")} validation-сканов
|
Все {review.frameCount.toLocaleString("ru-RU")} validation-сканов
|
||||||
выровнены с labels и pose index. Высота Patchwork++ определена только
|
выровнены с labels и pose index. Высота Patchwork++ определена только
|
||||||
на train split; validation labels использованы исключительно для оценки.
|
на train split; validation labels использованы исключительно для оценки.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<dl>
|
<dl>
|
||||||
<div><dt>Последовательностей</dt><dd>{sequences.length}</dd></div>
|
<div><dt>Последовательностей</dt><dd>{sequences.length}</dd></div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { PlanningSpatialWorkspace } from "./missions/PlanningSpatialWorkspace";
|
|||||||
import { MissionPlannerWorkspace } from "./missions/MissionPlannerWorkspace";
|
import { MissionPlannerWorkspace } from "./missions/MissionPlannerWorkspace";
|
||||||
import { VehiclesWorkspace } from "./fleet/VehiclesWorkspace";
|
import { VehiclesWorkspace } from "./fleet/VehiclesWorkspace";
|
||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import { Button, GlassSurface, Icon, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Button, GlassSurface, Icon, StatusBadge } from "@nodedc/ui-react";
|
||||||
import {
|
import {
|
||||||
ObservationMedia,
|
ObservationMedia,
|
||||||
observationSourceStatusLabel,
|
observationSourceStatusLabel,
|
||||||
@@ -46,7 +46,7 @@ function FeatureInventory({ definition }: { definition: WorkspaceDefinition }) {
|
|||||||
<header>
|
<header>
|
||||||
<span className="section-eyebrow">ФУНКЦИОНАЛЬНЫЙ БЛОК</span>
|
<span className="section-eyebrow">ФУНКЦИОНАЛЬНЫЙ БЛОК</span>
|
||||||
<h3>{group.title}</h3>
|
<h3>{group.title}</h3>
|
||||||
<p>{group.description}</p>
|
<Description>{group.description}</Description>
|
||||||
</header>
|
</header>
|
||||||
<div className="feature-list">
|
<div className="feature-list">
|
||||||
{group.capabilities.map((capability) => (
|
{group.capabilities.map((capability) => (
|
||||||
@@ -54,7 +54,7 @@ function FeatureInventory({ definition }: { definition: WorkspaceDefinition }) {
|
|||||||
<span className="feature-row__mark" aria-hidden="true" />
|
<span className="feature-row__mark" aria-hidden="true" />
|
||||||
<div>
|
<div>
|
||||||
<strong>{capability.label}</strong>
|
<strong>{capability.label}</strong>
|
||||||
<p>{capability.description}</p>
|
<Description>{capability.description}</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={statusTone(capability.status)}>
|
<StatusBadge tone={statusTone(capability.status)}>
|
||||||
{capabilityStatusLabel[capability.status]}
|
{capabilityStatusLabel[capability.status]}
|
||||||
@@ -73,7 +73,7 @@ function WorkspaceLead({ definition, note }: { definition: WorkspaceDefinition;
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">{definition.eyebrow}</span>
|
<span className="section-eyebrow">{definition.eyebrow}</span>
|
||||||
<h2>{definition.title}</h2>
|
<h2>{definition.title}</h2>
|
||||||
<p>{definition.description}</p>
|
<Description>{definition.description}</Description>
|
||||||
</div>
|
</div>
|
||||||
{note ? <span className="workspace-lead__note">{note}</span> : null}
|
{note ? <span className="workspace-lead__note">{note}</span> : null}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import {
|
import { Description,
|
||||||
Button,
|
Button,
|
||||||
GlassSurface,
|
GlassSurface,
|
||||||
StatusBadge,
|
StatusBadge,
|
||||||
@@ -104,10 +104,10 @@ export function ArtifactHealthWorkspace() {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ДАННЫЕ / ЗДОРОВЬЕ АРТЕФАКТОВ</span>
|
<span className="section-eyebrow">ДАННЫЕ / ЗДОРОВЬЕ АРТЕФАКТОВ</span>
|
||||||
<h2>Живой контур хранения</h2>
|
<h2>Живой контур хранения</h2>
|
||||||
<p>
|
<Description>
|
||||||
Метаданные локальных артефактов и последний точный content-аудит
|
Метаданные локальных артефактов и последний точный content-аудит
|
||||||
без изменения или автоматического удаления данных.
|
без изменения или автоматического удаления данных.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<GlassSurface className="artifact-health-state" padding="lg">
|
<GlassSurface className="artifact-health-state" padding="lg">
|
||||||
@@ -115,7 +115,7 @@ export function ArtifactHealthWorkspace() {
|
|||||||
{error ? "Срез недоступен" : "Сканируем метаданные"}
|
{error ? "Срез недоступен" : "Сканируем метаданные"}
|
||||||
</StatusBadge>
|
</StatusBadge>
|
||||||
<h3>{error ?? "Собираем файловый инвентарь"}</h3>
|
<h3>{error ?? "Собираем файловый инвентарь"}</h3>
|
||||||
<p>Содержимое больших файлов не читается и повторно не хешируется.</p>
|
<Description>Содержимое больших файлов не читается и повторно не хешируется.</Description>
|
||||||
{error ? (
|
{error ? (
|
||||||
<Button
|
<Button
|
||||||
size="compact"
|
size="compact"
|
||||||
@@ -142,10 +142,10 @@ export function ArtifactHealthWorkspace() {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">ДАННЫЕ / ЗДОРОВЬЕ АРТЕФАКТОВ</span>
|
<span className="section-eyebrow">ДАННЫЕ / ЗДОРОВЬЕ АРТЕФАКТОВ</span>
|
||||||
<h2>Живой контур хранения</h2>
|
<h2>Живой контур хранения</h2>
|
||||||
<p>
|
<Description>
|
||||||
Текущий объём runtime, рост между замерами и доказанное дублирование.
|
Текущий объём runtime, рост между замерами и доказанное дублирование.
|
||||||
Контур остаётся только наблюдающим.
|
Контур остаётся только наблюдающим.
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={health.overall_state === "live" ? "success" : "warning"}>
|
<StatusBadge tone={health.overall_state === "live" ? "success" : "warning"}>
|
||||||
{health.overall_state === "live" ? "Стабильно" : "Требует оптимизации"}
|
{health.overall_state === "live" ? "Стабильно" : "Требует оптимизации"}
|
||||||
@@ -187,10 +187,10 @@ export function ArtifactHealthWorkspace() {
|
|||||||
<div>
|
<div>
|
||||||
<span className="section-eyebrow">LIVE INVENTORY</span>
|
<span className="section-eyebrow">LIVE INVENTORY</span>
|
||||||
<h3>Распределение runtime</h3>
|
<h3>Распределение runtime</h3>
|
||||||
<p>
|
<Description>
|
||||||
Метаданные обновлены {formatTimestamp(health.inventory.scanned_at_utc)}
|
Метаданные обновлены {formatTimestamp(health.inventory.scanned_at_utc)}
|
||||||
{" · "}{Math.round(health.inventory.scan_duration_ms)} мс
|
{" · "}{Math.round(health.inventory.scan_duration_ms)} мс
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
<StatusBadge tone={health.inventory.state === "live" ? "success" : "warning"}>
|
<StatusBadge tone={health.inventory.state === "live" ? "success" : "warning"}>
|
||||||
{health.inventory.state === "live" ? "Live" : "Частичный срез"}
|
{health.inventory.state === "live" ? "Live" : "Частичный срез"}
|
||||||
@@ -233,9 +233,9 @@ export function ArtifactHealthWorkspace() {
|
|||||||
<div><dt>Дата аудита</dt><dd>{formatTimestamp(health.exact_audit.audited_at_utc)}</dd></div>
|
<div><dt>Дата аудита</dt><dd>{formatTimestamp(health.exact_audit.audited_at_utc)}</dd></div>
|
||||||
</dl>
|
</dl>
|
||||||
{health.exact_audit.changed_roots.length ? (
|
{health.exact_audit.changed_roots.length ? (
|
||||||
<p>Изменены корни: {health.exact_audit.changed_roots.join(", ")}.</p>
|
<Description>Изменены корни: {health.exact_audit.changed_roots.join(", ")}.</Description>
|
||||||
) : (
|
) : (
|
||||||
<p>Все 14 измеренных корней совпадают с точным аудитом по числу файлов и байтам.</p>
|
<Description>Все 14 измеренных корней совпадают с точным аудитом по числу файлов и байтам.</Description>
|
||||||
)}
|
)}
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
|
|
||||||
@@ -255,10 +255,10 @@ export function ArtifactHealthWorkspace() {
|
|||||||
</header>
|
</header>
|
||||||
{referencesIndexed ? (
|
{referencesIndexed ? (
|
||||||
<>
|
<>
|
||||||
<p>
|
<Description>
|
||||||
Логические пути сведены к проверяемым SHA-256-ссылкам. Исходные
|
Логические пути сведены к проверяемым SHA-256-ссылкам. Исходные
|
||||||
файлы не изменены, физическое освобождение места не выполнялось.
|
файлы не изменены, физическое освобождение места не выполнялось.
|
||||||
</p>
|
</Description>
|
||||||
<dl>
|
<dl>
|
||||||
<div>
|
<div>
|
||||||
<dt>Логических путей</dt>
|
<dt>Логических путей</dt>
|
||||||
@@ -280,10 +280,10 @@ export function ArtifactHealthWorkspace() {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<p>
|
<Description>
|
||||||
Content-addressed ссылки ещё не включены. Исходные файлы
|
Content-addressed ссылки ещё не включены. Исходные файлы
|
||||||
остаются только наблюдаемыми, автоматическое удаление запрещено.
|
остаются только наблюдаемыми, автоматическое удаление запрещено.
|
||||||
</p>
|
</Description>
|
||||||
<dl>
|
<dl>
|
||||||
<div><dt>Режим</dt><dd>Наблюдение</dd></div>
|
<div><dt>Режим</dt><dd>Наблюдение</dd></div>
|
||||||
<div><dt>Удаление</dt><dd>Запрещено</dd></div>
|
<div><dt>Удаление</dt><dd>Запрещено</dd></div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {useBoardNetwork} from '../../core/fleet/useBoardNetwork';
|
|||||||
import {useBoardNetworkStatus} from '../../core/fleet/useBoardNetworkStatus';
|
import {useBoardNetworkStatus} from '../../core/fleet/useBoardNetworkStatus';
|
||||||
import {BoardNetworkSettings} from './BoardNetworkSettings';
|
import {BoardNetworkSettings} from './BoardNetworkSettings';
|
||||||
import {BoardNetworkStatus} from './BoardNetworkStatus';
|
import {BoardNetworkStatus} from './BoardNetworkStatus';
|
||||||
import {Button,Icon,IconButton,ResourceRow,StatusBadge,FeatureSettingsWindow,WindowFooterActions} from '@nodedc/ui-react';
|
import { Description,Button,Icon,IconButton,ResourceRow,StatusBadge,FeatureSettingsWindow,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import type {Vehicle} from '../../core/fleet/useFleet';
|
import type {Vehicle} from '../../core/fleet/useFleet';
|
||||||
|
|
||||||
export const boardStatus=(item:Vehicle,available=true)=>item.enrollment==='pending'?'Подтверждаем привязку':item.enrollment==='revoked'?'Не привязан':item.enrollment==='failed'?'Привязка не завершена':item.connectivity==='online'?(available?'В сети':'Не в сети'):'Не в сети';
|
export const boardStatus=(item:Vehicle,available=true)=>item.enrollment==='pending'?'Подтверждаем привязку':item.enrollment==='revoked'?'Не привязан':item.enrollment==='failed'?'Привязка не завершена':item.connectivity==='online'?(available?'В сети':'Не в сети'):'Не в сети';
|
||||||
@@ -25,7 +25,7 @@ export function BoardComputerSettings({vehicle,enabled,onClose,onRevoke}:{vehicl
|
|||||||
footer={<WindowFooterActions><Button variant="secondary" onClick={onClose}>Закрыть</Button>{section==='network'&&<Button variant="primary" disabled={!network.canSave} onClick={()=>void network.save()}>{network.applying?'Применяем…':'Сохранить'}</Button>}</WindowFooterActions>}>
|
footer={<WindowFooterActions><Button variant="secondary" onClick={onClose}>Закрыть</Button>{section==='network'&&<Button variant="primary" disabled={!network.canSave} onClick={()=>void network.save()}>{network.applying?'Применяем…':'Сохранить'}</Button>}</WindowFooterActions>}>
|
||||||
{section==='network'?<BoardNetworkSettings network={network}/>:section==='interfaces'?<BoardNetworkStatus status={interfaces}/>:
|
{section==='network'?<BoardNetworkSettings network={network}/>:section==='interfaces'?<BoardNetworkStatus status={interfaces}/>:
|
||||||
<div className="fleet-form"><StatusBadge tone={enabled?'success':vehicle.enrollment==='pending'?'warning':'neutral'}>{boardStatus(vehicle,enabled)}</StatusBadge>
|
<div className="fleet-form"><StatusBadge tone={enabled?'success':vehicle.enrollment==='pending'?'warning':'neutral'}>{boardStatus(vehicle,enabled)}</StatusBadge>
|
||||||
{vehicle.notice&&<p role="status">{vehicle.notice}</p>}
|
{vehicle.notice&&<Description role="status">{vehicle.notice}</Description>}
|
||||||
<dl className="fleet-facts"><div><dt>Идентификатор БК</dt><dd>{vehicle.node_id}</dd></div><div><dt>Последняя связь</dt><dd>{vehicle.last_seen?new Date(vehicle.last_seen*1000).toLocaleString('ru-RU'):'Соединение ещё не получено'}</dd></div>
|
<dl className="fleet-facts"><div><dt>Идентификатор БК</dt><dd>{vehicle.node_id}</dd></div><div><dt>Последняя связь</dt><dd>{vehicle.last_seen?new Date(vehicle.last_seen*1000).toLocaleString('ru-RU'):'Соединение ещё не получено'}</dd></div>
|
||||||
{vehicle.host&&<><div><dt>Имя БК в системе</dt><dd>{vehicle.host.hostname}</dd></div><div><dt>Операционная система</dt><dd>{vehicle.host.os}</dd></div><div><dt>Архитектура</dt><dd>{vehicle.host.architecture}</dd></div><div><dt>Процессоры</dt><dd>{vehicle.host.cpus}</dd></div><div><dt>Память</dt><dd>{vehicle.host.memory_kib?`${(vehicle.host.memory_kib/1048576).toFixed(1)} ГиБ`:'Нет сведений'}</dd></div></>}
|
{vehicle.host&&<><div><dt>Имя БК в системе</dt><dd>{vehicle.host.hostname}</dd></div><div><dt>Операционная система</dt><dd>{vehicle.host.os}</dd></div><div><dt>Архитектура</dt><dd>{vehicle.host.architecture}</dd></div><div><dt>Процессоры</dt><dd>{vehicle.host.cpus}</dd></div><div><dt>Память</dt><dd>{vehicle.host.memory_kib?`${(vehicle.host.memory_kib/1048576).toFixed(1)} ГиБ`:'Нет сведений'}</dd></div></>}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import {LoadingRegion,ResourceList,ResourceRow,Select,SettingsCard,StatusBadge,ToastStack} from '@nodedc/ui-react';
|
import { Description,LoadingRegion,ResourceList,ResourceRow,Select,SettingsCard,StatusBadge,ToastStack} from '@nodedc/ui-react';
|
||||||
import {WorkspaceBackButton} from '../../components/WorkspaceBackButton';
|
import {WorkspaceBackButton} from '../../components/WorkspaceBackButton';
|
||||||
import {useBoardMonitor,monitorValue,type BoardMonitor} from '../../core/fleet/boardMonitor';
|
import {useBoardMonitor,monitorValue,type BoardMonitor} from '../../core/fleet/boardMonitor';
|
||||||
import './board-monitor.css';
|
import './board-monitor.css';
|
||||||
@@ -15,17 +15,17 @@ export function BoardMonitorReadout({name,value,error,loading}:{name:string;valu
|
|||||||
const metrics=Object.entries(definitions).filter(([,item])=>item.group===group);
|
const metrics=Object.entries(definitions).filter(([,item])=>item.group===group);
|
||||||
return <>
|
return <>
|
||||||
<SettingsCard title="Мониторинг системы БК" description={name} actions={<StatusBadge tone={value?.fresh&&!error?'success':'neutral'}>{value?.fresh&&!error?'Данные поступают':'Нет свежих данных'}</StatusBadge>}>
|
<SettingsCard title="Мониторинг системы БК" description={name} actions={<StatusBadge tone={value?.fresh&&!error?'success':'neutral'}>{value?.fresh&&!error?'Данные поступают':'Нет свежих данных'}</StatusBadge>}>
|
||||||
{latest&&<p>Измерено на БК: {time(latest.at)}.</p>}
|
{latest&&<Description>Измерено на БК: {time(latest.at)}.</Description>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
<LoadingRegion loading={loading&&!value} label="Получение мониторинга БК"><div className="board-monitor-readings">
|
<LoadingRegion loading={loading&&!value} label="Получение мониторинга БК"><div className="board-monitor-readings">
|
||||||
{!value?.available?<SettingsCard align="center" title={loading?'Ожидание показателей':error?'Мониторинг БК недоступен':'Нет текущих измерений'} description={error?'Обновление повторяется автоматически.':'Показатели появятся после получения свежих данных с борта.'}/>:<>
|
{!value?.available?<SettingsCard align="center" title={loading?'Ожидание показателей':error?'Мониторинг БК недоступен':'Нет текущих измерений'} description={error?'Обновление повторяется автоматически.':'Показатели появятся после получения свежих данных с борта.'}/>:<>
|
||||||
<SettingsCard title="Текущие показатели" description={latest?time(latest.at):undefined}>
|
<SettingsCard title="Текущие показатели" description={latest?time(latest.at):undefined}>
|
||||||
{!!groups.length&&<div className="board-monitor-controls"><Select label="Ресурс" value={group} options={groups.map(label=>({value:label,label}))} onChange={setGroup}/></div>}
|
{!!groups.length&&<div className="board-monitor-controls"><Select label="Ресурс" value={group} options={groups.map(label=>({value:label,label}))} onChange={setGroup}/></div>}
|
||||||
<ResourceList aria-label="Показатели системы">{metrics.map(([key,item])=><li key={key}><ResourceRow title={`${item.resource} · ${item.label}`} description={latest?.values[key]==null?item.reason??'Счётчик недоступен':undefined} metadata={monitorValue(latest?.values[key],item.unit)}/></li>)}</ResourceList>
|
<ResourceList aria-label="Показатели системы">{metrics.map(([key,item])=><li key={key}><ResourceRow title={`${item.resource} · ${item.label}`} description={latest?.values[key]==null?item.reason??'Счётчик недоступен':undefined} metadata={monitorValue(latest?.values[key],item.unit)}/></li>)}</ResourceList>
|
||||||
{!metrics.length&&<p>Измерения для этого ресурса не поступили.</p>}
|
{!metrics.length&&<Description>Измерения для этого ресурса не поступили.</Description>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
<SettingsCard title="События последнего измерения">
|
<SettingsCard title="События последнего измерения">
|
||||||
{value.events.length?<ResourceList aria-label="События БК">{value.events.map((event,index)=><li key={`${event.at}-${index}`}><ResourceRow title={eventLabels[event.code]??'Событие системы'} description={time(event.at)}/></li>)}</ResourceList>:<p>Событий не получено.</p>}
|
{value.events.length?<ResourceList aria-label="События БК">{value.events.map((event,index)=><li key={`${event.at}-${index}`}><ResourceRow title={eventLabels[event.code]??'Событие системы'} description={time(event.at)}/></li>)}</ResourceList>:<Description>Событий не получено.</Description>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
</>}
|
</>}
|
||||||
</div></LoadingRegion>
|
</div></LoadingRegion>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useRef} from 'react';
|
import {useRef} from 'react';
|
||||||
import {Button,Icon,Select,SettingsCard,StatusBadge} from '@nodedc/ui-react';
|
import { Description,Button,Icon,Select,SettingsCard,StatusBadge} from '@nodedc/ui-react';
|
||||||
import {useBoardNetwork,type NetworkProvider} from '../../core/fleet/useBoardNetwork';
|
import {useBoardNetwork,type NetworkProvider} from '../../core/fleet/useBoardNetwork';
|
||||||
import {InstallerCard} from './equipment/InstallerCard';
|
import {InstallerCard} from './equipment/InstallerCard';
|
||||||
export function BoardNetworkSettings({network}:{network:ReturnType<typeof useBoardNetwork>}){
|
export function BoardNetworkSettings({network}:{network:ReturnType<typeof useBoardNetwork>}){
|
||||||
@@ -12,12 +12,12 @@ export function BoardNetworkSettings({network}:{network:ReturnType<typeof useBoa
|
|||||||
return <div className="fleet-form">
|
return <div className="fleet-form">
|
||||||
<SettingsCard title="Связь с Core" description="Профиль связи этого бортового компьютера с Mission Core. Вычислительный Worker сохраняет своё подключение." actions={<StatusBadge tone={applying?'warning':value?.available?'success':'neutral'}>{label}</StatusBadge>}>
|
<SettingsCard title="Связь с Core" description="Профиль связи этого бортового компьютера с Mission Core. Вычислительный Worker сохраняет своё подключение." actions={<StatusBadge tone={applying?'warning':value?.available?'success':'neutral'}>{label}</StatusBadge>}>
|
||||||
<Select label="Способ подключения" value={provider} options={[{value:'tailscale',label:'Tailscale'},{value:'netbird',label:'NetBird · WireGuard'},{value:'wireguard',label:'WireGuard · VPS'}]} onChange={v=>network.setProvider(v as NetworkProvider)} disabled={busy||applying}/>
|
<Select label="Способ подключения" value={provider} options={[{value:'tailscale',label:'Tailscale'},{value:'netbird',label:'NetBird · WireGuard'},{value:'wireguard',label:'WireGuard · VPS'}]} onChange={v=>network.setProvider(v as NetworkProvider)} disabled={busy||applying}/>
|
||||||
{provider==='tailscale'?<p>{current?.tailscale_endpoint?`Сохранённое подключение: ${current.tailscale_endpoint}`:current?'Подключите Tailscale в приложении Node.':'Параметры появятся после получения настроек БК.'}</p>:provider==='netbird'?<p>{current?.netbird_endpoint?`Борт подключён к ${current.netbird?.server_url}. Новый канал будет проверен перед сохранением.`:'Подключите Core и борт к одному серверу NetBird. На борту: Система → Частная сеть.'}</p>:<>
|
{provider==='tailscale'?<Description>{current?.tailscale_endpoint?`Сохранённое подключение: ${current.tailscale_endpoint}`:current?'Подключите Tailscale в приложении Node.':'Параметры появятся после получения настроек БК.'}</Description>:provider==='netbird'?<Description>{current?.netbird_endpoint?`Борт подключён к ${current.netbird?.server_url}. Новый канал будет проверен перед сохранением.`:'Подключите Core и борт к одному серверу NetBird. На борту: Система → Частная сеть.'}</Description>:<>
|
||||||
<Select label="Общий профиль VPS" value={profileId} options={[{value:'',label:'Выберите профиль'},...(value?.profiles??[]).filter(p=>p.state==='ready').map(p=>({value:p.id,label:p.name,description:`Подключено бортов: ${p.boards} · ${p.endpoint}`}))]} onChange={network.setProfileId} disabled={busy||applying}/>
|
<Select label="Общий профиль VPS" value={profileId} options={[{value:'',label:'Выберите профиль'},...(value?.profiles??[]).filter(p=>p.state==='ready').map(p=>({value:p.id,label:p.name,description:`Подключено бортов: ${p.boards} · ${p.endpoint}`}))]} onChange={network.setProfileId} disabled={busy||applying}/>
|
||||||
{selected&&<StatusBadge tone={selected.state==='ready'?'success':'warning'}>{selected.state==='ready'?`VPS подключён · Подключено бортов: ${selected.boards}`:'Подключение VPS не завершено'}</StatusBadge>}
|
{selected&&<StatusBadge tone={selected.state==='ready'?'success':'warning'}>{selected.state==='ready'?`VPS подключён · Подключено бортов: ${selected.boards}`:'Подключение VPS не завершено'}</StatusBadge>}
|
||||||
<p>Один профиль используется всем парком. У каждого борта будет отдельное защищённое подключение.</p>
|
<Description>Один профиль используется всем парком. У каждого борта будет отдельное защищённое подключение.</Description>
|
||||||
</>}
|
</>}
|
||||||
{!value?.available&&<p>Для изменения настроек нужен доступный БК с актуальной версией Node.</p>}
|
{!value?.available&&<Description>Для изменения настроек нужен доступный БК с актуальной версией Node.</Description>}
|
||||||
{(error||value?.operation?.error||current?.error)&&<StatusBadge tone="danger">{error||value?.operation?.error||current?.error}</StatusBadge>}
|
{(error||value?.operation?.error||current?.error)&&<StatusBadge tone="danger">{error||value?.operation?.error||current?.error}</StatusBadge>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
{provider==='wireguard'&&<>
|
{provider==='wireguard'&&<>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import {Button,ConfirmationModal,Icon,IconButton,Window,WindowFooterActions} from '@nodedc/ui-react';
|
import { Description,Button,ConfirmationModal,Icon,IconButton,Window,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import {useBoardPower} from '../../core/fleet/useBoardPower';
|
import {useBoardPower} from '../../core/fleet/useBoardPower';
|
||||||
|
|
||||||
export function BoardPowerAction({vehicleId,name,enabled}:{vehicleId:string;name:string;enabled:boolean}) {
|
export function BoardPowerAction({vehicleId,name,enabled}:{vehicleId:string;name:string;enabled:boolean}) {
|
||||||
@@ -11,7 +11,7 @@ export function BoardPowerAction({vehicleId,name,enabled}:{vehicleId:string;name
|
|||||||
<IconButton label="Выключить бортовой компьютер" title={available?'Выключить бортовой компьютер':power.value?.operation?.message||power.value?.reason||'Проверяем связь с бортом…'} disabled={!available} onClick={()=>setEpoch(power.value?.epoch||null)}><Icon name="power"/></IconButton>
|
<IconButton label="Выключить бортовой компьютер" title={available?'Выключить бортовой компьютер':power.value?.operation?.message||power.value?.reason||'Проверяем связь с бортом…'} disabled={!available} onClick={()=>setEpoch(power.value?.epoch||null)}><Icon name="power"/></IconButton>
|
||||||
<ConfirmationModal open={epoch!==null} title="Выключить бортовой компьютер?" danger confirmLabel="Да, выключить" pendingLabel="Передаём команду…" onClose={()=>{if(!power.busy)setEpoch(null);}}
|
<ConfirmationModal open={epoch!==null} title="Выключить бортовой компьютер?" danger confirmLabel="Да, выключить" pendingLabel="Передаём команду…" onClose={()=>{if(!power.busy)setEpoch(null);}}
|
||||||
onConfirm={async()=>{if(epoch&&await power.shutdown(epoch)){setEpoch(null);setReceiptOpen(true);}}}
|
onConfirm={async()=>{if(epoch&&await power.shutdown(epoch)){setEpoch(null);setReceiptOpen(true);}}}
|
||||||
description={<><p>Вы уверены, что хотите выключить бортовой компьютер «{name}»?</p><p>Связь с бортом и его устройствами будет потеряна. Для включения потребуется доступ к компьютеру.</p>{power.error&&<p role="alert">{power.error}</p>}</>}/>
|
description={<><Description>Вы уверены, что хотите выключить бортовой компьютер «{name}»?</Description><Description>Связь с бортом и его устройствами будет потеряна. Для включения потребуется доступ к компьютеру.</Description>{power.error&&<Description role="alert">{power.error}</Description>}</>}/>
|
||||||
<Window open={receiptOpen} size="sm" title="Выключение бортового компьютера" onClose={()=>setReceiptOpen(false)} footer={<WindowFooterActions><Button onClick={()=>setReceiptOpen(false)}>Понятно</Button></WindowFooterActions>}><p role="status">{power.value?.operation?.message||'Проверяем состояние команды…'}</p></Window>
|
<Window open={receiptOpen} size="sm" title="Выключение бортового компьютера" onClose={()=>setReceiptOpen(false)} footer={<WindowFooterActions><Button onClick={()=>setReceiptOpen(false)}>Понятно</Button></WindowFooterActions>}><Description role="status">{power.value?.operation?.message||'Проверяем состояние команды…'}</Description></Window>
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useId,useState,type FormEvent} from 'react';
|
import {useId,useState,type FormEvent} from 'react';
|
||||||
import {Button,Select,SettingsCard,TextAreaField,TextField,StatusBadge} from '@nodedc/ui-react';
|
import { Description,Button,Select,SettingsCard,TextAreaField,TextField,StatusBadge} from '@nodedc/ui-react';
|
||||||
import {fleetRequest,type FleetPreview,type Vehicle} from '../../core/fleet/useFleet';
|
import {fleetRequest,type FleetPreview,type Vehicle} from '../../core/fleet/useFleet';
|
||||||
import type {SensorEnrollmentProps} from '../../../../../packages/sensor-ui/src/extensions';
|
import type {SensorEnrollmentProps} from '../../../../../packages/sensor-ui/src/extensions';
|
||||||
import {InstallerCard} from './equipment/InstallerCard';
|
import {InstallerCard} from './equipment/InstallerCard';
|
||||||
@@ -37,6 +37,6 @@ export function NodeInvitationForm({vehicle,onClose,onComplete,renderWindow}:{ve
|
|||||||
{vehicle&&<SettingsCard title={vehicle.name} description={replacing?'Новый БК заменит текущий. Аппарат, его название и раскладки сохранятся; прежняя привязка будет отозвана.':'Подключите БК к этому аппарату по приглашению Mission Core Node.'}/>}
|
{vehicle&&<SettingsCard title={vehicle.name} description={replacing?'Новый БК заменит текущий. Аппарат, его название и раскладки сохранятся; прежняя привязка будет отозвана.':'Подключите БК к этому аппарату по приглашению Mission Core Node.'}/>}
|
||||||
{preview?<SettingsCard title={preview.name} description="Идентичность БК проверена по приглашению"><dl className="fleet-facts"><div><dt>Идентификатор БК</dt><dd>{preview.node_id}</dd></div><div><dt>Система</dt><dd>{preview.host.os} · {preview.host.architecture}</dd></div><div><dt>Адрес БК</dt><dd>{preview.endpoint}</dd></div></dl><Button disabled={pending} onClick={()=>setPreview(null)}>Другое приглашение</Button></SettingsCard>:<TextAreaField label="Код приглашения из Node" value={code} rows={5} maxLength={4096} spellCheck={false} autoComplete="off" disabled={pending} onChange={e=>setCode(e.target.value)}/>}
|
{preview?<SettingsCard title={preview.name} description="Идентичность БК проверена по приглашению"><dl className="fleet-facts"><div><dt>Идентификатор БК</dt><dd>{preview.node_id}</dd></div><div><dt>Система</dt><dd>{preview.host.os} · {preview.host.architecture}</dd></div><div><dt>Адрес БК</dt><dd>{preview.endpoint}</dd></div></dl><Button disabled={pending} onClick={()=>setPreview(null)}>Другое приглашение</Button></SettingsCard>:<TextAreaField label="Код приглашения из Node" value={code} rows={5} maxLength={4096} spellCheck={false} autoComplete="off" disabled={pending} onChange={e=>setCode(e.target.value)}/>}
|
||||||
{pending&&<StatusBadge tone="warning">{preview?'Подключение БК':'Проверка приглашения БК'}</StatusBadge>}
|
{pending&&<StatusBadge tone="warning">{preview?'Подключение БК':'Проверка приглашения БК'}</StatusBadge>}
|
||||||
{error&&<p role="alert">{error}</p>}
|
{error&&<Description role="alert">{error}</Description>}
|
||||||
</form>});
|
</form>});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import {useEffect,useSyncExternalStore} from 'react';
|
import {useEffect,useSyncExternalStore} from 'react';
|
||||||
import {Button,LoadingRegion} from '@nodedc/ui-react';
|
import { Description,Button,LoadingRegion} from '@nodedc/ui-react';
|
||||||
import type {BoardLayoutStore} from '../../../../../packages/sensor-ui/src/boardLayout';
|
import type {BoardLayoutStore} from '../../../../../packages/sensor-ui/src/boardLayout';
|
||||||
import type {SensorBoardContent} from '../../../../../packages/sensor-ui/src/SensorWorkspace';
|
import type {SensorBoardContent} from '../../../../../packages/sensor-ui/src/SensorWorkspace';
|
||||||
import type {Vehicle} from '../../core/fleet/useFleet';
|
import type {Vehicle} from '../../core/fleet/useFleet';
|
||||||
import {BoardComputerRow} from './BoardComputer';
|
import {BoardComputerRow} from './BoardComputer';
|
||||||
|
import {VehicleRouter} from './router/VehicleRouter';
|
||||||
import {IndependentEquipment} from './equipment/IndependentEquipment';
|
import {IndependentEquipment} from './equipment/IndependentEquipment';
|
||||||
|
|
||||||
export function VehicleEquipment({vehicle,enabled,layout,content,actionsTarget,onAddComputer,onSettings,onMonitor}:{vehicle:Vehicle;enabled:boolean;layout:BoardLayoutStore;content:SensorBoardContent;actionsTarget?:HTMLElement|null;onAddComputer:()=>void;onSettings:()=>void;onMonitor:()=>void}){
|
export function VehicleEquipment({vehicle,enabled,layout,content,actionsTarget,onAddComputer,onSettings,onMonitor}:{vehicle:Vehicle;enabled:boolean;layout:BoardLayoutStore;content:SensorBoardContent;actionsTarget?:HTMLElement|null;onAddComputer:()=>void;onSettings:()=>void;onMonitor:()=>void}){
|
||||||
@@ -12,10 +13,10 @@ export function VehicleEquipment({vehicle,enabled,layout,content,actionsTarget,o
|
|||||||
const computerOpen=state.value.open_sections.includes('computer');
|
const computerOpen=state.value.open_sections.includes('computer');
|
||||||
const toggleComputer=()=>layout.change(computerOpen?state.value.open_sections.filter(id=>id!=='computer'):[...state.value.open_sections,'computer']);
|
const toggleComputer=()=>layout.change(computerOpen?state.value.open_sections.filter(id=>id!=='computer'):[...state.value.open_sections,'computer']);
|
||||||
return <div className="sensor-content">
|
return <div className="sensor-content">
|
||||||
{state.error&&<div role="alert"><p>{state.error}</p><Button onClick={()=>void layout.load()}>Повторить</Button></div>}
|
{state.error&&<div role="alert"><Description>{state.error}</Description><Button onClick={()=>void layout.load()}>Повторить</Button></div>}
|
||||||
<LoadingRegion aggregate loading={!state.ready&&!state.error} label="Загрузка оборудования аппарата">
|
<LoadingRegion aggregate loading={!state.ready&&!state.error} label="Загрузка оборудования аппарата">
|
||||||
<IndependentEquipment key={vehicle.id} vehicle={vehicle} actionsTarget={actionsTarget} onComputer={onAddComputer} onRefresh={()=>void content.refresh()} computer={<div><BoardComputerRow vehicle={vehicle} enabled={enabled} showingSavedDevices={content.showingSavedDevices} open={computerOpen} onToggle={toggleComputer} onSettings={onSettings} onMonitor={onMonitor} onAdd={content.canAddDevice?content.addDevice:undefined}/>
|
<IndependentEquipment key={vehicle.id} vehicle={vehicle} actionsTarget={actionsTarget} onComputer={onAddComputer} onRefresh={()=>void content.refresh()} computer={<div><BoardComputerRow vehicle={vehicle} enabled={enabled} showingSavedDevices={content.showingSavedDevices} open={computerOpen} onToggle={toggleComputer} onSettings={onSettings} onMonitor={onMonitor} onAdd={content.canAddDevice?content.addDevice:undefined}/>
|
||||||
{computerOpen&&<div className="fleet-computer-devices">{content.devices}</div>}
|
{computerOpen&&<div className="fleet-computer-devices">{content.devices}<VehicleRouter vehicleID={vehicle.id}/></div>}
|
||||||
</div>}/>
|
</div>}/>
|
||||||
</LoadingRegion>
|
</LoadingRegion>
|
||||||
</div>;
|
</div>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useEffect,useState} from 'react';
|
import {useEffect,useState} from 'react';
|
||||||
import {Button,SettingsCard,TextField} from '@nodedc/ui-react';
|
import { Description,Button,SettingsCard,TextField} from '@nodedc/ui-react';
|
||||||
import {fleetRequest,type Vehicle} from '../../core/fleet/useFleet';
|
import {fleetRequest,type Vehicle} from '../../core/fleet/useFleet';
|
||||||
|
|
||||||
export function VehicleIdentitySettings({vehicle,onUpdated}:{vehicle:Vehicle;onUpdated:(vehicle:Vehicle)=>void}){
|
export function VehicleIdentitySettings({vehicle,onUpdated}:{vehicle:Vehicle;onUpdated:(vehicle:Vehicle)=>void}){
|
||||||
@@ -21,7 +21,7 @@ export function VehicleIdentitySettings({vehicle,onUpdated}:{vehicle:Vehicle;onU
|
|||||||
<form className="fleet-form" onSubmit={event=>{event.preventDefault();void save();}}>
|
<form className="fleet-form" onSubmit={event=>{event.preventDefault();void save();}}>
|
||||||
<TextField label="Название аппарата" value={name} maxLength={80} autoComplete="off" disabled={saving} onChange={event=>{setName(event.target.value);setMessage('');}}/>
|
<TextField label="Название аппарата" value={name} maxLength={80} autoComplete="off" disabled={saving} onChange={event=>{setName(event.target.value);setMessage('');}}/>
|
||||||
<div className="sensor-actions"><Button type="submit" disabled={!dirty||!name.trim()||saving}>{saving?'Сохранение…':'Сохранить'}</Button>{dirty&&<Button type="button" variant="secondary" disabled={saving} onClick={reset}>Отмена</Button>}</div>
|
<div className="sensor-actions"><Button type="submit" disabled={!dirty||!name.trim()||saving}>{saving?'Сохранение…':'Сохранить'}</Button>{dirty&&<Button type="button" variant="secondary" disabled={saving} onClick={reset}>Отмена</Button>}</div>
|
||||||
{error&&<p role="alert">{error}</p>}{message&&<p role="status">{message}</p>}
|
{error&&<Description role="alert">{error}</Description>}{message&&<Description role="status">{message}</Description>}
|
||||||
</form>
|
</form>
|
||||||
</SettingsCard>;
|
</SettingsCard>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Button,Icon,IconButton,ResourceList,ResourceRow,SettingsCard,StatusBadge} from '@nodedc/ui-react';
|
import { Description,Button,Icon,IconButton,ResourceList,ResourceRow,SettingsCard,StatusBadge} from '@nodedc/ui-react';
|
||||||
import {commandPending,commandDate,commandDuration,commandReason,commandReceipt,commandEntryStatus,commandStatus,commandTone,type CommandEntry} from '../../../core/fleet/commandRuntime';
|
import {commandPending,commandDate,commandDuration,commandReason,commandReceipt,commandEntryStatus,commandStatus,commandTone,type CommandEntry} from '../../../core/fleet/commandRuntime';
|
||||||
import {useCommandAttempts} from '../../../core/fleet/useCommandAttempts';
|
import {useCommandAttempts} from '../../../core/fleet/useCommandAttempts';
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ export function CommandHistory({identifier,items,selected,onSelect,onCancel,onRe
|
|||||||
function CommandDetails({identifier,current}:{identifier:string;current:CommandEntry}){
|
function CommandDetails({identifier,current}:{identifier:string;current:CommandEntry}){
|
||||||
const attempts=useCommandAttempts(identifier,current);
|
const attempts=useCommandAttempts(identifier,current);
|
||||||
return <SettingsCard title={current.description.label??'Операция B2'} description={`ID ${current.id} · ПО ${current.firmware??'неизвестно'}`}>
|
return <SettingsCard title={current.description.label??'Операция B2'} description={`ID ${current.id} · ПО ${current.firmware??'неизвестно'}`}>
|
||||||
{current.description.wire&&<p><code>{current.description.wire}</code></p>}
|
{current.description.wire&&<Description><code>{current.description.wire}</code></Description>}
|
||||||
<dl className="fleet-facts">
|
<dl className="fleet-facts">
|
||||||
<div><dt>Принято Core</dt><dd>{commandDate(current.created_at)}</dd></div>
|
<div><dt>Принято Core</dt><dd>{commandDate(current.created_at)}</dd></div>
|
||||||
{current.durable?<><div><dt>Попыток</dt><dd>{current.attempt_count??0}</dd></div>{current.attempt_expires_at!==undefined&&<div><dt>Срок текущей попытки</dt><dd>{commandDate(current.attempt_expires_at)}</dd></div>}</>:<><div><dt>Срок отправки из Core</dt><dd>{commandDate(current.queue_deadline)}</dd></div><div><dt>Срок ожидания ответа</dt><dd>{commandDate(current.expires_at)}</dd></div></>}
|
{current.durable?<><div><dt>Попыток</dt><dd>{current.attempt_count??0}</dd></div>{current.attempt_expires_at!==undefined&&<div><dt>Срок текущей попытки</dt><dd>{commandDate(current.attempt_expires_at)}</dd></div>}</>:<><div><dt>Срок отправки из Core</dt><dd>{commandDate(current.queue_deadline)}</dd></div><div><dt>Срок ожидания ответа</dt><dd>{commandDate(current.expires_at)}</dd></div></>}
|
||||||
@@ -20,12 +20,12 @@ function CommandDetails({identifier,current}:{identifier:string;current:CommandE
|
|||||||
<div><dt>До ответа</dt><dd>{commandDuration(current.roundtrip_seconds)}</dd></div>
|
<div><dt>До ответа</dt><dd>{commandDuration(current.roundtrip_seconds)}</dd></div>
|
||||||
{current.reconnected_at!==undefined&&<div><dt>Возвращение на связь</dt><dd>{commandDate(current.reconnected_at)}</dd></div>}
|
{current.reconnected_at!==undefined&&<div><dt>Возвращение на связь</dt><dd>{commandDate(current.reconnected_at)}</dd></div>}
|
||||||
</dl>
|
</dl>
|
||||||
{commandReason(current)&&<p>{commandReason(current)}</p>}
|
{commandReason(current)&&<Description>{commandReason(current)}</Description>}
|
||||||
<p>{current.description.confirmation}</p>
|
<Description>{current.description.confirmation}</Description>
|
||||||
{current.stop_requested&&<p>Новые попытки остановлены или ожидают остановки на VPS. Уже переданная попытка может завершиться.</p>}
|
{current.stop_requested&&<Description>Новые попытки остановлены или ожидают остановки на VPS. Уже переданная попытка может завершиться.</Description>}
|
||||||
{current.durable&&<>
|
{current.durable&&<>
|
||||||
<ResourceList aria-label="Попытки доставки">{attempts.items.map(item=><li key={item.id}><ResourceRow title={`Попытка ${item.number}${item.phase==='inspect'?' · проверка состояния':''}`} description={`Отправлено: ${commandDate(item.dispatched_at)} · Ответ: ${commandDate(item.received_at)} · ${commandDuration(item.roundtrip_seconds)}`} status={<StatusBadge tone={commandTone(item.state)}>{commandStatus(item.state)}</StatusBadge>} metadata={item.device_code!==undefined?commandReceipt({...current,device_code:item.device_code}):undefined}/></li>)}</ResourceList>
|
<ResourceList aria-label="Попытки доставки">{attempts.items.map(item=><li key={item.id}><ResourceRow title={`Попытка ${item.number}${item.phase==='inspect'?' · проверка состояния':''}`} description={`Отправлено: ${commandDate(item.dispatched_at)} · Ответ: ${commandDate(item.received_at)} · ${commandDuration(item.roundtrip_seconds)}`} status={<StatusBadge tone={commandTone(item.state)}>{commandStatus(item.state)}</StatusBadge>} metadata={item.device_code!==undefined?commandReceipt({...current,device_code:item.device_code}):undefined}/></li>)}</ResourceList>
|
||||||
{attempts.error&&<><p>{attempts.error}</p><Button onClick={attempts.refresh}>Повторить чтение попыток</Button></>}
|
{attempts.error&&<><Description>{attempts.error}</Description><Button onClick={attempts.refresh}>Повторить чтение попыток</Button></>}
|
||||||
{attempts.next_before!==null&&<Button loading={attempts.working} onClick={()=>void attempts.more()}>Предыдущие попытки</Button>}
|
{attempts.next_before!==null&&<Button loading={attempts.working} onClick={()=>void attempts.more()}>Предыдущие попытки</Button>}
|
||||||
</>}
|
</>}
|
||||||
<ResourceList aria-label="Этапы операции">{[...current.events].sort((a,b)=>(a.occurred_at??a.observed_at)-(b.occurred_at??b.observed_at)).map((event,index)=><li key={index}><ResourceRow title={`${commandStatus(event.state)}${event.attempt?` ${event.attempt}`:''}`} description={event.stage?({preflight:'Чтение настроек',write:'Запись',verify:'Проверка',restart:'Ожидание после перезапуска'} as Record<string,string>)[event.stage]:undefined} metadata={`${commandDate(event.occurred_at??event.observed_at)}${event.historical?' · восстановлено из истории':''}`}/></li>)}</ResourceList>
|
<ResourceList aria-label="Этапы операции">{[...current.events].sort((a,b)=>(a.occurred_at??a.observed_at)-(b.occurred_at??b.observed_at)).map((event,index)=><li key={index}><ResourceRow title={`${commandStatus(event.state)}${event.attempt?` ${event.attempt}`:''}`} description={event.stage?({preflight:'Чтение настроек',write:'Запись',verify:'Проверка',restart:'Ожидание после перезапуска'} as Record<string,string>)[event.stage]:undefined} metadata={`${commandDate(event.occurred_at??event.observed_at)}${event.historical?' · восстановлено из истории':''}`}/></li>)}</ResourceList>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import {Button,LoadingRegion,Select,SettingsCard,StatusBadge,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
import { Description,Button,LoadingRegion,Select,SettingsCard,StatusBadge,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import {commandPending} from '../../../core/fleet/commandRuntime';
|
import {commandPending} from '../../../core/fleet/commandRuntime';
|
||||||
import {useCommandRuntime} from '../../../core/fleet/useCommandRuntime';
|
import {useCommandRuntime} from '../../../core/fleet/useCommandRuntime';
|
||||||
import {telemetryLabel,type TrackerTelemetry} from '../../../core/fleet/vps';
|
import {telemetryLabel,type TrackerTelemetry} from '../../../core/fleet/vps';
|
||||||
@@ -19,13 +19,13 @@ export function EquipmentCommandWindow({device,telemetry,onClose}:{device:Indepe
|
|||||||
{data&&<>
|
{data&&<>
|
||||||
<SettingsCard title="Отправить команду" description={`B2 · ПО ${data.device.observed.firmware}`}>
|
<SettingsCard title="Отправить команду" description={`B2 · ПО ${data.device.observed.firmware}`}>
|
||||||
<Select label="Команда" value={runtime.intent?.preset_id??preset} options={data.catalog.map(value=>({value:value.id,label:value.label,disabled:!!value.unavailable}))} disabled={runtime.working||!!runtime.intent} onChange={setPreset}/>
|
<Select label="Команда" value={runtime.intent?.preset_id??preset} options={data.catalog.map(value=>({value:value.id,label:value.label,disabled:!!value.unavailable}))} disabled={runtime.working||!!runtime.intent} onChange={setPreset}/>
|
||||||
{runtime.intent?.repeat_of&&<p>Повтор: {runtime.items.find(item=>item.id===runtime.intent?.repeat_of)?.description.label??'операция из журнала'}. Уточните отправку, чтобы получить результат принятия команды.</p>}
|
{runtime.intent?.repeat_of&&<Description>Повтор: {runtime.items.find(item=>item.id===runtime.intent?.repeat_of)?.description.label??'операция из журнала'}. Уточните отправку, чтобы получить результат принятия команды.</Description>}
|
||||||
{chosen&&!runtime.intent?.repeat_of&&<><dl className="fleet-facts"><div><dt>{chosen.encoding} · тело</dt><dd><code>{chosen.wire}</code></dd></div></dl><p>{chosen.confirmation} {data.durable_kinds?.includes(chosen.command.kind)?(chosen.command.kind==='pulse-output'?'Задание ждёт отправки до отмены. После отправки импульс автоматически не повторяется при неизвестном результате.':chosen.command.kind==='set-output'?'Задание ждёт связи и отправки до отмены. При неподтверждённой доставке повторяется установка того же состояния.':'Задание сохраняется до результата или остановки повторов. При потере связи VPS уточняет результат и повторяет неподтверждённые попытки.'):`Ожидание отправки: до ${chosen.queue_seconds} с. Отправленная команда автоматически не повторяется.`}{chosen.encoding.includes('FC')&&' Пароль скрыт.'}</p>{chosen.unavailable&&<p>{chosen.unavailable}</p>}</>}
|
{chosen&&!runtime.intent?.repeat_of&&<><dl className="fleet-facts"><div><dt>{chosen.encoding} · тело</dt><dd><code>{chosen.wire}</code></dd></div></dl><Description>{chosen.confirmation} {data.durable_kinds?.includes(chosen.command.kind)?(chosen.command.kind==='pulse-output'?'Задание ждёт отправки до отмены. После отправки импульс автоматически не повторяется при неизвестном результате.':chosen.command.kind==='set-output'?'Задание ждёт связи и отправки до отмены. При неподтверждённой доставке повторяется установка того же состояния.':'Задание сохраняется до результата или остановки повторов. При потере связи VPS уточняет результат и повторяет неподтверждённые попытки.'):`Ожидание отправки: до ${chosen.queue_seconds} с. Отправленная команда автоматически не повторяется.`}{chosen.encoding.includes('FC')&&' Пароль скрыт.'}</Description>{chosen.unavailable&&<Description>{chosen.unavailable}</Description>}</>}
|
||||||
<WindowFooterActions><Button loading={runtime.activity==='send'} disabled={runtime.working||(!runtime.intent&&(!chosen||!!chosen.unavailable||(data.capacity!==null&&pending>=data.capacity)))} onClick={()=>void runtime.send(preset)}>{runtime.intent?'Уточнить отправку':'Отправить'}</Button></WindowFooterActions>
|
<WindowFooterActions><Button loading={runtime.activity==='send'} disabled={runtime.working||(!runtime.intent&&(!chosen||!!chosen.unavailable||(data.capacity!==null&&pending>=data.capacity)))} onClick={()=>void runtime.send(preset)}>{runtime.intent?'Уточнить отправку':'Отправить'}</Button></WindowFooterActions>
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
<SettingsCard title="Журнал операций" description={`Незавершённых: ${pending}${data.capacity===null?' · Задания сохранены':` · Вместимость очереди: ${data.capacity}`}`}>
|
<SettingsCard title="Журнал операций" description={`Незавершённых: ${pending}${data.capacity===null?' · Задания сохранены':` · Вместимость очереди: ${data.capacity}`}`}>
|
||||||
<Select label="Показать операции" value={filter} onChange={setFilter} options={[{value:'all',label:'Все операции'},{value:'active',label:'В очереди и выполняются'},{value:'finished',label:'Завершённые'}]}/>
|
<Select label="Показать операции" value={filter} onChange={setFilter} options={[{value:'all',label:'Все операции'},{value:'active',label:'В очереди и выполняются'},{value:'finished',label:'Завершённые'}]}/>
|
||||||
{!items.length&&<p>{runtime.items.length?'В загруженной части истории таких операций нет.':'Команд пока нет.'}</p>}
|
{!items.length&&<Description>{runtime.items.length?'В загруженной части истории таких операций нет.':'Команд пока нет.'}</Description>}
|
||||||
<CommandHistory identifier={device.id} items={items} selected={selected} onSelect={setSelected} onCancel={id=>void runtime.cancel(id)} onRepeat={id=>void runtime.repeat(id)} working={runtime.working||!!runtime.intent} cancelling={runtime.activity}/>
|
<CommandHistory identifier={device.id} items={items} selected={selected} onSelect={setSelected} onCancel={id=>void runtime.cancel(id)} onRepeat={id=>void runtime.repeat(id)} working={runtime.working||!!runtime.intent} cancelling={runtime.activity}/>
|
||||||
{runtime.before!==null&&<WindowFooterActions><Button loading={runtime.activity==='more'} disabled={runtime.working} onClick={()=>void runtime.more()}>Загрузить предыдущие</Button></WindowFooterActions>}
|
{runtime.before!==null&&<WindowFooterActions><Button loading={runtime.activity==='more'} disabled={runtime.working} onClick={()=>void runtime.more()}>Загрузить предыдущие</Button></WindowFooterActions>}
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import {Button,Select,SettingsCard,StatusBadge,TextField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
import { Description,Button,Select,SettingsCard,StatusBadge,TextField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import {equipmentRequest,type EquipmentCandidate,type EquipmentModel,type EquipmentProfile,type IndependentDevice} from '../../../core/fleet/equipment';
|
import {equipmentRequest,type EquipmentCandidate,type EquipmentModel,type EquipmentProfile,type IndependentDevice} from '../../../core/fleet/equipment';
|
||||||
import {NodeInvitationForm} from '../NodeInvitationForm';
|
import {NodeInvitationForm} from '../NodeInvitationForm';
|
||||||
import {VPSHostSettings} from './VPSHostSettings';
|
import {VPSHostSettings} from './VPSHostSettings';
|
||||||
@@ -22,7 +22,7 @@ export function EquipmentConnect({vehicle,vehicles,models,profiles,hosts,onCompu
|
|||||||
<Select label="Профиль настроек" value={profile} options={[{value:'',label:'Прочитать настройки трекера'},...profiles.filter(p=>p.model_id===type).map(p=>({value:p.id,label:`${p.name} · ${new Date(p.created_at*1000).toLocaleString('ru-RU')}`}))]} onChange={setProfile} disabled={busy}/>
|
<Select label="Профиль настроек" value={profile} options={[{value:'',label:'Прочитать настройки трекера'},...profiles.filter(p=>p.model_id===type).map(p=>({value:p.id,label:`${p.name} · ${new Date(p.created_at*1000).toLocaleString('ru-RU')}`}))]} onChange={setProfile} disabled={busy}/>
|
||||||
{selectedProfile&&<SettingsCard title={selectedProfile.name} description={selectedProfile.settings.endpoint?`${selectedProfile.settings.endpoint.host}:${selectedProfile.settings.endpoint.port} · сервер ${selectedProfile.settings.endpoint.slot}`:'Адрес сервера сохраняется из трекера'}/>}
|
{selectedProfile&&<SettingsCard title={selectedProfile.name} description={selectedProfile.settings.endpoint?`${selectedProfile.settings.endpoint.host}:${selectedProfile.settings.endpoint.port} · сервер ${selectedProfile.settings.endpoint.slot}`:'Адрес сервера сохраняется из трекера'}/>}
|
||||||
<SettingsCard title="USB на этом Mac" description="Подключите один трекер кабелем с передачей данных. Проверка считает модель, идентификатор и настройки."><Button loading={busy} disabled={busy} onClick={()=>void inspect()}>{candidate?'Прочитать повторно':'Проверить USB'}</Button></SettingsCard>
|
<SettingsCard title="USB на этом Mac" description="Подключите один трекер кабелем с передачей данных. Проверка считает модель, идентификатор и настройки."><Button loading={busy} disabled={busy} onClick={()=>void inspect()}>{candidate?'Прочитать повторно':'Проверить USB'}</Button></SettingsCard>
|
||||||
{candidate&&<SettingsCard title={`${candidate.observed.model} · ${candidate.observed.device_id}`} description={`IMEI …${candidate.observed.imei_suffix} · ПО ${candidate.observed.firmware}`}><StatusBadge tone="success">Настройки прочитаны</StatusBadge><p>Устройство будет добавлено в реестр. Передача на ваш сервер ещё не подтверждена; выбранный профиль будет сохранён для настройки.</p></SettingsCard>}
|
{candidate&&<SettingsCard title={`${candidate.observed.model} · ${candidate.observed.device_id}`} description={`IMEI …${candidate.observed.imei_suffix} · ПО ${candidate.observed.firmware}`}><StatusBadge tone="success">Настройки прочитаны</StatusBadge><Description>Устройство будет добавлено в реестр. Передача на ваш сервер ещё не подтверждена; выбранный профиль будет сохранён для настройки.</Description></SettingsCard>}
|
||||||
</>}
|
</>}
|
||||||
</div>
|
</div>
|
||||||
})}<ToastStack items={error?[{id:'equipment-connect',title:error,tone:'error',durationMs:null}]:[]} onDismiss={()=>setError('')}/></>;
|
})}<ToastStack items={error?[{id:'equipment-connect',title:error,tone:'error',durationMs:null}]:[]} onDismiss={()=>setError('')}/></>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useEffect,useRef,useState} from 'react';
|
import {useEffect,useRef,useState} from 'react';
|
||||||
import {Button,Icon,LoadingRegion,Select,SettingsCard,StatusBadge,ToastStack} from '@nodedc/ui-react';
|
import { Description,Button,Icon,LoadingRegion,Select,SettingsCard,StatusBadge,ToastStack} from '@nodedc/ui-react';
|
||||||
import type {IndependentDevice} from '../../../core/fleet/equipment';
|
import type {IndependentDevice} from '../../../core/fleet/equipment';
|
||||||
import {downloadFirmware,readFirmware,uploadFirmware,type FirmwareCatalog} from '../../../core/fleet/firmware';
|
import {downloadFirmware,readFirmware,uploadFirmware,type FirmwareCatalog} from '../../../core/fleet/firmware';
|
||||||
|
|
||||||
@@ -22,21 +22,21 @@ export function EquipmentFirmware({device}:{device:IndependentDevice}){
|
|||||||
return <>
|
return <>
|
||||||
<SettingsCard title="Прошивка трекера" description="Последняя считанная версия устройства.">
|
<SettingsCard title="Прошивка трекера" description="Последняя считанная версия устройства.">
|
||||||
<dl className="fleet-facts"><div><dt>Версия</dt><dd>{recordedVersion||'Нет сведений'}</dd></div><div><dt>Считана</dt><dd>{device.observed.read_at?new Date(device.observed.read_at*1000).toLocaleString('ru-RU'):'Нет сведений'}</dd></div></dl>
|
<dl className="fleet-facts"><div><dt>Версия</dt><dd>{recordedVersion||'Нет сведений'}</dd></div><div><dt>Считана</dt><dd>{device.observed.read_at?new Date(device.observed.read_at*1000).toLocaleString('ru-RU'):'Нет сведений'}</dd></div></dl>
|
||||||
<p>Обновление прошивки через Mission Core недоступно. Файлы ниже хранятся отдельно от настроек трекера.</p>
|
<Description>Обновление прошивки через Mission Core недоступно. Файлы ниже хранятся отдельно от настроек трекера.</Description>
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
<SettingsCard title="Файлы прошивок" description="Архив Mission Core. Добавление и выбор файла не запускают установку.">
|
<SettingsCard title="Файлы прошивок" description="Архив Mission Core. Добавление и выбор файла не запускают установку.">
|
||||||
<input ref={picker} type="file" accept=".dfw" hidden aria-label="Файл прошивки .dfw" onChange={e=>{const file=e.target.files?.[0];e.target.value='';if(file)void add(file);}}/>
|
<input ref={picker} type="file" accept=".dfw" hidden aria-label="Файл прошивки .dfw" onChange={e=>{const file=e.target.files?.[0];e.target.value='';if(file)void add(file);}}/>
|
||||||
<Button icon={<Icon name="upload"/>} loading={uploading} disabled={uploading||downloading} onClick={()=>picker.current?.click()}>Добавить файл .dfw</Button>
|
<Button icon={<Icon name="upload"/>} loading={uploading} disabled={uploading||downloading} onClick={()=>picker.current?.click()}>Добавить файл .dfw</Button>
|
||||||
<LoadingRegion loading={loading} label="Читаем архив прошивок">
|
<LoadingRegion loading={loading} label="Читаем архив прошивок">
|
||||||
{loadError?<><p>{loadError}</p><Button onClick={()=>setReload(value=>value+1)}>Повторить загрузку</Button></>:catalog?.items.length?<div className="fleet-form">
|
{loadError?<><Description>{loadError}</Description><Button onClick={()=>setReload(value=>value+1)}>Повторить загрузку</Button></>:catalog?.items.length?<div className="fleet-form">
|
||||||
<Select label="Файл прошивки" value={selected} onChange={setSelected} disabled={uploading||downloading} options={catalog.items.map(image=>({value:image.id,label:image.version?`${image.version} · ${image.filename}`:image.filename}))}/>
|
<Select label="Файл прошивки" value={selected} onChange={setSelected} disabled={uploading||downloading} options={catalog.items.map(image=>({value:image.id,label:image.version?`${image.version} · ${image.filename}`:image.filename}))}/>
|
||||||
{item&&<>
|
{item&&<>
|
||||||
<StatusBadge tone="neutral">{item.source==='manufacturer'?'Файл производителя':'Файл пользователя · совместимость не проверена'}</StatusBadge>
|
<StatusBadge tone="neutral">{item.source==='manufacturer'?'Файл производителя':'Файл пользователя · совместимость не проверена'}</StatusBadge>
|
||||||
<dl className="fleet-facts"><div><dt>Версия файла</dt><dd>{item.version??'Не определена'}</dd></div><div><dt>Размер</dt><dd>{new Intl.NumberFormat('ru-RU').format(item.bytes)} байт</dd></div><div><dt>Сохранён</dt><dd>{new Date(item.added_at*1000).toLocaleString('ru-RU')}</dd></div></dl>
|
<dl className="fleet-facts"><div><dt>Версия файла</dt><dd>{item.version??'Не определена'}</dd></div><div><dt>Размер</dt><dd>{new Intl.NumberFormat('ru-RU').format(item.bytes)} байт</dd></div><div><dt>Сохранён</dt><dd>{new Date(item.added_at*1000).toLocaleString('ru-RU')}</dd></div></dl>
|
||||||
<Button icon={<Icon name="download"/>} loading={downloading} disabled={uploading||downloading} onClick={()=>void download()}>Скачать файл</Button>
|
<Button icon={<Icon name="download"/>} loading={downloading} disabled={uploading||downloading} onClick={()=>void download()}>Скачать файл</Button>
|
||||||
</>}
|
</>}
|
||||||
{recordedVersion&&!catalog.items.some(image=>image.source==='manufacturer'&&image.version===recordedVersion)&&<p>Образ считанной версии {recordedVersion} в архиве не найден. Сохранённые настройки не являются копией прошивки.</p>}
|
{recordedVersion&&!catalog.items.some(image=>image.source==='manufacturer'&&image.version===recordedVersion)&&<Description>Образ считанной версии {recordedVersion} в архиве не найден. Сохранённые настройки не являются копией прошивки.</Description>}
|
||||||
</div>:<p>Файлов прошивок пока нет. Добавьте файл .dfw с компьютера.</p>}
|
</div>:<Description>Файлов прошивок пока нет. Добавьте файл .dfw с компьютера.</Description>}
|
||||||
</LoadingRegion>
|
</LoadingRegion>
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
<ToastStack items={error?[{id:'firmware-error',title:error,tone:'error',durationMs:null}]:notice?[{id:'firmware-saved',title:notice,tone:'success'}]:[]} onDismiss={()=>{setError('');setNotice('');}}/>
|
<ToastStack items={error?[{id:'firmware-error',title:error,tone:'error',durationMs:null}]:notice?[{id:'firmware-saved',title:notice,tone:'success'}]:[]} onDismiss={()=>{setError('');setNotice('');}}/>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Select,SettingsCard,Switch,TextField} from '@nodedc/ui-react';
|
import { Description,Select,SettingsCard,Switch,TextField} from '@nodedc/ui-react';
|
||||||
import {cellularFresh,cellularSimOptions} from '../../../core/fleet/cellular';
|
import {cellularFresh,cellularSimOptions} from '../../../core/fleet/cellular';
|
||||||
import {allowBothInternetSims,selectInternetSim,type ConnectivityPreset,type EquipmentObservation,type EquipmentPolicy} from '../../../core/fleet/equipment';
|
import {allowBothInternetSims,selectInternetSim,type ConnectivityPreset,type EquipmentObservation,type EquipmentPolicy} from '../../../core/fleet/equipment';
|
||||||
import type {TrackerTelemetry} from '../../../core/fleet/vps';
|
import type {TrackerTelemetry} from '../../../core/fleet/vps';
|
||||||
@@ -16,11 +16,11 @@ export function EquipmentInternet({telemetry,observed,presets,value,onChange,dis
|
|||||||
const apn=connection.strategy==='sim'&&targeted?connection.apn??current:connection.strategy==='operator'&&targeted?presets.find(p=>p.id===connection.preset_id)?.apn??current:connection.strategy==='manual'?(slot==='1'?connection.apn1:connection.apn2):current;
|
const apn=connection.strategy==='sim'&&targeted?connection.apn??current:connection.strategy==='operator'&&targeted?presets.find(p=>p.id===connection.preset_id)?.apn??current:connection.strategy==='manual'?(slot==='1'?connection.apn1:connection.apn2):current;
|
||||||
return <SettingsCard title="Интернет"><div className="fleet-form">
|
return <SettingsCard title="Интернет"><div className="fleet-form">
|
||||||
<Select label="SIM для интернета" value={slot} options={[{value:'',label:'Выберите режим SIM',disabled:true},{value:'native',label:'Автоматический режим — без заданного APN'},{value:'both',label:'Автоматический режим — с сохранением APN'},...options.map(option=>({...option,label:`Только ${option.label}`}))]} disabled={disabled} onChange={next=>onChange(['both','native'].includes(next)?allowBothInternetSims(value,next==='native'):selectInternetSim(value,Number(next)))}/>
|
<Select label="SIM для интернета" value={slot} options={[{value:'',label:'Выберите режим SIM',disabled:true},{value:'native',label:'Автоматический режим — без заданного APN'},{value:'both',label:'Автоматический режим — с сохранением APN'},...options.map(option=>({...option,label:`Только ${option.label}`}))]} disabled={disabled} onChange={next=>onChange(['both','native'].includes(next)?allowBothInternetSims(value,next==='native'):selectInternetSim(value,Number(next)))}/>
|
||||||
<p>{slot==='native'?'Оба слота разрешены: B2 сам выбирает SIM для интернета. APN, логин и пароль обеих SIM будут очищены; подключение возможно, если оператор разрешает доступ без них. После сохранения B2 перезапустится.':slot==='both'?'Оба слота разрешены: B2 сам выбирает SIM для интернета. Текущие APN, логин и пароль каждой SIM сохранятся. Одновременно интернет работает через одну карту. После сохранения B2 перезапустится.':'Выберите одну SIM для принудительного подключения или автоматический режим. При выборе одной интернет на другой запрещается. Если выбранная SIM не подключится, для восстановления может потребоваться USB.'}</p>
|
<Description>{slot==='native'?'Оба слота разрешены: B2 сам выбирает SIM для интернета. APN, логин и пароль обеих SIM будут очищены; подключение возможно, если оператор разрешает доступ без них. После сохранения B2 перезапустится.':slot==='both'?'Оба слота разрешены: B2 сам выбирает SIM для интернета. Текущие APN, логин и пароль каждой SIM сохранятся. Одновременно интернет работает через одну карту. После сохранения B2 перезапустится.':'Выберите одну SIM для принудительного подключения или автоматический режим. При выборе одной интернет на другой запрещается. Если выбранная SIM не подключится, для восстановления может потребоваться USB.'}</Description>
|
||||||
{!!options.length&&(!telemetry?.online||!cellularFresh(telemetry.cellular?.status))&&<p>Показаны последние обнаруженные SIM. Ожидаем обновления связи с B2.</p>}
|
{!!options.length&&(!telemetry?.online||!cellularFresh(telemetry.cellular?.status))&&<Description>Показаны последние обнаруженные SIM. Ожидаем обновления связи с B2.</Description>}
|
||||||
{slot&&!both?<>
|
{slot&&!both?<>
|
||||||
<Switch label="Подбирать интернет для этой карты" checked={automatic} disabled={disabled} onChange={checked=>onChange({...value,connectivity:{strategy:'sim',sim_slot:Number(slot),activate:true,automatic:checked,apn:checked?null:apn,apn1:'',apn2:'',preset_id:null}})}/>
|
<Switch label="Подбирать интернет для этой карты" checked={automatic} disabled={disabled} onChange={checked=>onChange({...value,connectivity:{strategy:'sim',sim_slot:Number(slot),activate:true,automatic:checked,apn:checked?null:apn,apn1:'',apn2:'',preset_id:null}})}/>
|
||||||
{automatic?<p>{access?.state==='ready'?`${access.source==='verified_card'?'Проверенные настройки этой карты':'Стандартные настройки оператора'}: ${access.apn}. После сохранения проверим запись и подключение выбранной SIM.`:access?.state==='unknown_card'?'Карта ещё не распознана. Прочитайте её через USB или отключите автоподбор и задайте APN.':access?.state==='unsupported_operator'?'Для этой карты нет сохранённых настроек. Отключите автоподбор и задайте APN.':'Ожидаем подтверждение карты в выбранном слоте.'}</p>:<TextField label="APN" value={apn} maxLength={29} disabled={disabled} hint={`В B2 прочитан: ${current||'не задан'}. Изменение будет отправлено при сохранении настроек.`} onChange={event=>onChange({...value,connectivity:{strategy:'sim',sim_slot:Number(slot),activate:true,automatic:false,apn:event.target.value,apn1:'',apn2:'',preset_id:null}})}/>}
|
{automatic?<Description>{access?.state==='ready'?`${access.source==='verified_card'?'Проверенные настройки этой карты':'Стандартные настройки оператора'}: ${access.apn}. После сохранения проверим запись и подключение выбранной SIM.`:access?.state==='unknown_card'?'Карта ещё не распознана. Прочитайте её через USB или отключите автоподбор и задайте APN.':access?.state==='unsupported_operator'?'Для этой карты нет сохранённых настроек. Отключите автоподбор и задайте APN.':'Ожидаем подтверждение карты в выбранном слоте.'}</Description>:<TextField label="APN" value={apn} maxLength={29} disabled={disabled} hint={`В B2 прочитан: ${current||'не задан'}. Изменение будет отправлено при сохранении настроек.`} onChange={event=>onChange({...value,connectivity:{strategy:'sim',sim_slot:Number(slot),activate:true,automatic:false,apn:event.target.value,apn1:'',apn2:'',preset_id:null}})}/>}
|
||||||
</>:!both&&!options.length&&<p>Ожидаем актуальные сведения о SIM от трекера.</p>}
|
</>:!both&&!options.length&&<Description>Ожидаем актуальные сведения о SIM от трекера.</Description>}
|
||||||
</div></SettingsCard>;
|
</div></SettingsCard>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Select,SettingsCard,Switch,TextField} from '@nodedc/ui-react';
|
import { Description,Select,SettingsCard,Switch,TextField} from '@nodedc/ui-react';
|
||||||
import type {TrackerTelemetry,VPSHost} from '../../../core/fleet/vps';
|
import type {TrackerTelemetry,VPSHost} from '../../../core/fleet/vps';
|
||||||
import type {ConnectivityPreset,EquipmentField,EquipmentObservation,EquipmentPolicy} from '../../../core/fleet/equipment';
|
import type {ConnectivityPreset,EquipmentField,EquipmentObservation,EquipmentPolicy} from '../../../core/fleet/equipment';
|
||||||
|
|
||||||
@@ -9,9 +9,9 @@ export function EquipmentPolicyFields({hosts,section,fields,presets,telemetry,ob
|
|||||||
<EquipmentInternet telemetry={telemetry} observed={observed} presets={presets} value={value} onChange={onChange} disabled={disabled}/>
|
<EquipmentInternet telemetry={telemetry} observed={observed} presets={presets} value={value} onChange={onChange} disabled={disabled}/>
|
||||||
<SettingsCard title="Сервер мониторинга" description="Используйте постоянное DNS-имя: при переезде VPS можно сохранить адрес в трекерах.">
|
<SettingsCard title="Сервер мониторинга" description="Используйте постоянное DNS-имя: при переезде VPS можно сохранить адрес в трекерах.">
|
||||||
<div className="fleet-form"><Select label="Зарегистрированный VPS" value={hosts.find(h=>h.status?.tracker.host===value.endpoint?.host&&h.status?.tracker.port===value.endpoint?.port)?.id??''} options={[{value:'',label:'Сохранить адрес или указать вручную'},...hosts.filter(h=>h.status).map(h=>({value:h.id,label:h.name}))]} disabled={disabled} onChange={id=>{const host=hosts.find(h=>h.id===id);if(host?.status)onChange({...value,endpoint:{...host.status.tracker,slot:value.endpoint?.slot??2}});}}/><Switch label="Задать сервер в профиле" checked={value.endpoint!==null} disabled={disabled} onChange={enabled=>onChange({...value,endpoint:enabled?{host:'',port:0,slot:1}:null})}/>
|
<div className="fleet-form"><Select label="Зарегистрированный VPS" value={hosts.find(h=>h.status?.tracker.host===value.endpoint?.host&&h.status?.tracker.port===value.endpoint?.port)?.id??''} options={[{value:'',label:'Сохранить адрес или указать вручную'},...hosts.filter(h=>h.status).map(h=>({value:h.id,label:h.name}))]} disabled={disabled} onChange={id=>{const host=hosts.find(h=>h.id===id);if(host?.status)onChange({...value,endpoint:{...host.status.tracker,slot:value.endpoint?.slot??2}});}}/><Switch label="Задать сервер в профиле" checked={value.endpoint!==null} disabled={disabled} onChange={enabled=>onChange({...value,endpoint:enabled?{host:'',port:0,slot:1}:null})}/>
|
||||||
{value.endpoint&&<><TextField label="DNS/IP сервера" value={value.endpoint.host} maxLength={49} disabled={disabled} onChange={e=>onChange({...value,endpoint:{...value.endpoint!,host:e.target.value}})}/><TextField label="Порт" type="number" min={1} max={65535} value={value.endpoint.port||''} disabled={disabled} onChange={e=>onChange({...value,endpoint:{...value.endpoint!,port:Number(e.target.value)}})}/><Select label="Слот сервера" value={String(value.endpoint.slot)} options={[1,2,3,4].map(n=>({value:String(n),label:`Сервер ${n}`}))} disabled={disabled} onChange={slot=>onChange({...value,endpoint:{...value.endpoint!,slot:Number(slot)}})}/><p>Протокол INTERNAL. Остальные серверы сохраняются.</p></>}
|
{value.endpoint&&<><TextField label="DNS/IP сервера" value={value.endpoint.host} maxLength={49} disabled={disabled} onChange={e=>onChange({...value,endpoint:{...value.endpoint!,host:e.target.value}})}/><TextField label="Порт" type="number" min={1} max={65535} value={value.endpoint.port||''} disabled={disabled} onChange={e=>onChange({...value,endpoint:{...value.endpoint!,port:Number(e.target.value)}})}/><Select label="Слот сервера" value={String(value.endpoint.slot)} options={[1,2,3,4].map(n=>({value:String(n),label:`Сервер ${n}`}))} disabled={disabled} onChange={slot=>onChange({...value,endpoint:{...value.endpoint!,slot:Number(slot)}})}/><Description>Протокол INTERNAL. Остальные серверы сохраняются.</Description></>}
|
||||||
</div>
|
</div>
|
||||||
</SettingsCard>
|
</SettingsCard>
|
||||||
</div>;
|
</div>;
|
||||||
return <div className="fleet-form"><p>Пустое поле — сохранить значение конкретного трекера. Ноль — задать нулевое значение.</p>{fields.filter(f=>f.group===section).map(field=><TextField key={field.key} label={field.label} type="number" min={field.min} max={field.max} step={1} hint={`${field.min} … ${field.max}`} value={value.parameters[field.key]??''} disabled={disabled} onChange={e=>{const parameters={...value.parameters};if(e.target.value==='')delete parameters[field.key];else parameters[field.key]=Number(e.target.value);onChange({...value,parameters});}}/>)}</div>;
|
return <div className="fleet-form"><Description>Пустое поле — сохранить значение конкретного трекера. Ноль — задать нулевое значение.</Description>{fields.filter(f=>f.group===section).map(field=><TextField key={field.key} label={field.label} type="number" min={field.min} max={field.max} step={1} hint={`${field.min} … ${field.max}`} value={value.parameters[field.key]??''} disabled={disabled} onChange={e=>{const parameters={...value.parameters};if(e.target.value==='')delete parameters[field.key];else parameters[field.key]=Number(e.target.value);onChange({...value,parameters});}}/>)}</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useEffect,useRef,useState} from 'react';
|
import {useEffect,useRef,useState} from 'react';
|
||||||
import {Button,FeatureSettingsWindow,Select,SettingsCard,StatusBadge,TextField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
import { Description,Button,FeatureSettingsWindow,Select,SettingsCard,StatusBadge,TextField,ToastStack,Window,WindowFooterActions} from '@nodedc/ui-react';
|
||||||
import {configurationWriteNotStarted,simSelectionIntent,equipmentPolicyEqual,equipmentApplyMessage,equipmentRequest,networkOperationMessage,networkOperationProgress,policyError,type EquipmentModel,type EquipmentProfile,type IndependentDevice} from '../../../core/fleet/equipment';
|
import {configurationWriteNotStarted,simSelectionIntent,equipmentPolicyEqual,equipmentApplyMessage,equipmentRequest,networkOperationMessage,networkOperationProgress,policyError,type EquipmentModel,type EquipmentProfile,type IndependentDevice} from '../../../core/fleet/equipment';
|
||||||
import {cellularSimCurrent} from '../../../core/fleet/cellular';
|
import {cellularSimCurrent} from '../../../core/fleet/cellular';
|
||||||
import type {Vehicle} from '../../../core/fleet/useFleet';
|
import type {Vehicle} from '../../../core/fleet/useFleet';
|
||||||
@@ -38,18 +38,18 @@ export function EquipmentSettings({device,model,hosts,telemetry,vehicles,profile
|
|||||||
async function readUsb(){setBusy(true);setReadingUsb(true);setError('');try{onObserved(await equipmentRequest<IndependentDevice>(`/instances/${device.id}/inspect`,'POST',{expected_revision:device.revision}));}catch(e){setError(e instanceof Error?e.message:'Не удалось прочитать USB.');}finally{setBusy(false);setReadingUsb(false);}}
|
async function readUsb(){setBusy(true);setReadingUsb(true);setError('');try{onObserved(await equipmentRequest<IndependentDevice>(`/instances/${device.id}/inspect`,'POST',{expected_revision:device.revision}));}catch(e){setError(e instanceof Error?e.message:'Не удалось прочитать USB.');}finally{setBusy(false);setReadingUsb(false);}}
|
||||||
async function saveProfile(){setBusy(true);setError('');try{await equipmentRequest('/profiles','POST',{name:profileName.trim(),model_id:device.model_id,settings});setProfileOpen(false);setNotice('Профиль сохранён и доступен при подключении новых трекеров.');onProfile();}catch(e){setError(e instanceof Error?e.message:'Не удалось сохранить профиль.');}finally{setBusy(false);}}
|
async function saveProfile(){setBusy(true);setError('');try{await equipmentRequest('/profiles','POST',{name:profileName.trim(),model_id:device.model_id,settings});setProfileOpen(false);setNotice('Профиль сохранён и доступен при подключении новых трекеров.');onProfile();}catch(e){setError(e instanceof Error?e.message:'Не удалось сохранить профиль.');}finally{setBusy(false);}}
|
||||||
return <><FeatureSettingsWindow open={!profileOpen} title="Настройки устройства" subtitle={device.name} identity={{title:model.label,subtitle:`IMEI …${observed.imei_suffix}`,avatarLabel:model.label}} sections={sections} activeSection={section} onSectionChange={setSection} onClose={()=>{if(!working)onClose();}} footer={section==='firmware'?undefined:<WindowFooterActions><Button loading={saving} disabled={busy||!!validation||!name.trim()||!target} onClick={()=>void save()}>Сохранить настройки</Button><Button disabled={working||!!validation} onClick={()=>{setProfileName(`${model.label} — ${name}`.slice(0,80));setProfileOpen(true);}}>Сохранить профиль</Button></WindowFooterActions>}>
|
return <><FeatureSettingsWindow open={!profileOpen} title="Настройки устройства" subtitle={device.name} identity={{title:model.label,subtitle:`IMEI …${observed.imei_suffix}`,avatarLabel:model.label}} sections={sections} activeSection={section} onSectionChange={setSection} onClose={()=>{if(!working)onClose();}} footer={section==='firmware'?undefined:<WindowFooterActions><Button loading={saving} disabled={busy||!!validation||!name.trim()||!target} onClick={()=>void save()}>Сохранить настройки</Button><Button disabled={working||!!validation} onClick={()=>{setProfileName(`${model.label} — ${name}`.slice(0,80));setProfileOpen(true);}}>Сохранить профиль</Button></WindowFooterActions>}>
|
||||||
<div className="fleet-form" ref={contentRef}><StatusBadge tone={telemetry?.online?'success':'neutral'}>{telemetryLabel(telemetry)}</StatusBadge>{section!=='commands'&§ion!=='firmware'&&<SettingsCard title="Настройки через VPS" description={fullSettings?"Параметры профиля записываются через VPS. Текущие настройки читаются перед записью, а результат проверяется повторным чтением. Адрес резервного сервера сохраняется.":"По сети доступна смена адреса и порта сервера 1. Сервер 2 сохраняет связь с текущим VPS. Для полной конфигурации нужен обновлённый VPS."}><p>{equipmentApplyMessage(configurationWriteNotStarted(device.network_operation)?'not_started':device.policy_state)}</p>{device.network_server1&&<p>Последний подтверждённый сервер 1: {device.network_server1.host}:{device.network_server1.port}.</p>}<p>{networkOperationMessage(device.network_operation?.scope!=='command'?device.network_operation:undefined)}</p>{networkPending&&device.network_operation?.scope!=='command'&&<p>{device.network_operation?.durable?`Попыток: ${device.network_operation.attempt_count??0}. Окно можно закрыть — задание сохранено. Повторы можно остановить в журнале команд.`:progress.overdue?'Срок ожидания истёк. Уточняем результат у VPS; повторная отправка заблокирована до получения результата.':`До окончания ожидания: ${progress.remaining??'—'} с. Окно можно закрыть — операция продолжится на VPS.`}</p>}<Button loading={progress.waiting&&device.network_operation?.scope!=='command'&&!device.network_operation?.read_only} disabled={busy||dirty||!!validation||!writable} onClick={()=>void applyNetwork()}>Отправить через VPS</Button><Button loading={progress.waiting&&device.network_operation?.scope!=='command'&&device.network_operation?.read_only} disabled={busy||dirty} onClick={()=>void readNetwork()}>Прочитать через VPS</Button></SettingsCard>}
|
<div className="fleet-form" ref={contentRef}><StatusBadge tone={telemetry?.online?'success':'neutral'}>{telemetryLabel(telemetry)}</StatusBadge>{section!=='commands'&§ion!=='firmware'&&<SettingsCard title="Настройки через VPS" description={fullSettings?"Параметры профиля записываются через VPS. Текущие настройки читаются перед записью, а результат проверяется повторным чтением. Адрес резервного сервера сохраняется.":"По сети доступна смена адреса и порта сервера 1. Сервер 2 сохраняет связь с текущим VPS. Для полной конфигурации нужен обновлённый VPS."}><Description>{equipmentApplyMessage(configurationWriteNotStarted(device.network_operation)?'not_started':device.policy_state)}</Description>{device.network_server1&&<Description>Последний подтверждённый сервер 1: {device.network_server1.host}:{device.network_server1.port}.</Description>}<Description>{networkOperationMessage(device.network_operation?.scope!=='command'?device.network_operation:undefined)}</Description>{networkPending&&device.network_operation?.scope!=='command'&&<Description>{device.network_operation?.durable?`Попыток: ${device.network_operation.attempt_count??0}. Окно можно закрыть — задание сохранено. Повторы можно остановить в журнале команд.`:progress.overdue?'Срок ожидания истёк. Уточняем результат у VPS; повторная отправка заблокирована до получения результата.':`До окончания ожидания: ${progress.remaining??'—'} с. Окно можно закрыть — операция продолжится на VPS.`}</Description>}<Button loading={progress.waiting&&device.network_operation?.scope!=='command'&&!device.network_operation?.read_only} disabled={busy||dirty||!!validation||!writable} onClick={()=>void applyNetwork()}>Отправить через VPS</Button><Button loading={progress.waiting&&device.network_operation?.scope!=='command'&&device.network_operation?.read_only} disabled={busy||dirty} onClick={()=>void readNetwork()}>Прочитать через VPS</Button></SettingsCard>}
|
||||||
{section==='connection'&&<EquipmentCellular telemetry={telemetry} observed={observed}/>}
|
{section==='connection'&&<EquipmentCellular telemetry={telemetry} observed={observed}/>}
|
||||||
{section==='firmware'?<EquipmentFirmware device={device}/>:section==='identity'?<>
|
{section==='firmware'?<EquipmentFirmware device={device}/>:section==='identity'?<>
|
||||||
<TextField label="Название" value={name} maxLength={80} disabled={busy} onChange={e=>setName(e.target.value)}/>
|
<TextField label="Название" value={name} maxLength={80} disabled={busy} onChange={e=>setName(e.target.value)}/>
|
||||||
<Select label="Привязка к аппарату" value={target} options={vehicles.map(v=>({value:v.id,label:v.name}))} onChange={setTarget} disabled={busy}/>
|
<Select label="Привязка к аппарату" value={target} options={vehicles.map(v=>({value:v.id,label:v.name}))} onChange={setTarget} disabled={busy}/>
|
||||||
<Select label="Загрузить сохранённый профиль" value={selectedProfile} options={[{value:'',label:'Текущие настройки'},...profiles.filter(p=>p.model_id===device.model_id).map(p=>({value:p.id,label:`${p.name} · ${new Date(p.created_at*1000).toLocaleString('ru-RU')}`}))]} disabled={busy} onChange={id=>{setSelectedProfile(id);const p=profiles.find(p=>p.id===id);changeSettings(p?.settings??device.settings);}}/>
|
<Select label="Загрузить сохранённый профиль" value={selectedProfile} options={[{value:'',label:'Текущие настройки'},...profiles.filter(p=>p.model_id===device.model_id).map(p=>({value:p.id,label:`${p.name} · ${new Date(p.created_at*1000).toLocaleString('ru-RU')}`}))]} disabled={busy} onChange={id=>{setSelectedProfile(id);const p=profiles.find(p=>p.id===id);changeSettings(p?.settings??device.settings);}}/>
|
||||||
<SettingsCard title="Сведения B2" description={`ID ${observed.device_id} · ПО ${observed.firmware} · идентификация по USB ${new Date(observed.read_at*1000).toLocaleString('ru-RU')}`}>{observed.configuration_read_at&&<p>Настройки прочитаны через VPS: {new Date(observed.configuration_read_at*1000).toLocaleString('ru-RU')}.</p>}<dl className="fleet-facts"><div><dt>Основная SIM</dt><dd>{observed.sim1_iccid_reported_suffix?`…${observed.sim1_iccid_reported_suffix} (${observed.sim1_iccid_reported_length} цифр в ответе)`:'Нет сведений'}</dd></div><div><dt>Вторая SIM</dt><dd>{observed.sim2_iccid_reported_suffix?`…${observed.sim2_iccid_reported_suffix} (${observed.sim2_iccid_reported_length} цифр в ответе)`:'Нет сведений'}</dd></div><div><dt>APN основной SIM</dt><dd>{observed.configuration.apn1||'Не задан'}</dd></div><div><dt>APN второй SIM</dt><dd>{observed.configuration.apn2||'Не задан'}</dd></div>{observed.configuration.servers.filter(s=>s.host).map(s=><div key={s.slot}><dt>Сервер {s.slot}</dt><dd>{s.host}:{s.port}</dd></div>)}</dl><Button loading={readingUsb} disabled={busy||dirty} onClick={()=>void readUsb()}>Прочитать USB повторно</Button><Button loading={applying} disabled={busy||dirty||!!validation||!writable} onClick={()=>void applyUsb()}>Первоначальная настройка по USB</Button>{applying&&<p>Запись и проверка настроек. Не отсоединяйте USB.</p>}</SettingsCard>
|
<SettingsCard title="Сведения B2" description={`ID ${observed.device_id} · ПО ${observed.firmware} · идентификация по USB ${new Date(observed.read_at*1000).toLocaleString('ru-RU')}`}>{observed.configuration_read_at&&<Description>Настройки прочитаны через VPS: {new Date(observed.configuration_read_at*1000).toLocaleString('ru-RU')}.</Description>}<dl className="fleet-facts"><div><dt>Основная SIM</dt><dd>{observed.sim1_iccid_reported_suffix?`…${observed.sim1_iccid_reported_suffix} (${observed.sim1_iccid_reported_length} цифр в ответе)`:'Нет сведений'}</dd></div><div><dt>Вторая SIM</dt><dd>{observed.sim2_iccid_reported_suffix?`…${observed.sim2_iccid_reported_suffix} (${observed.sim2_iccid_reported_length} цифр в ответе)`:'Нет сведений'}</dd></div><div><dt>APN основной SIM</dt><dd>{observed.configuration.apn1||'Не задан'}</dd></div><div><dt>APN второй SIM</dt><dd>{observed.configuration.apn2||'Не задан'}</dd></div>{observed.configuration.servers.filter(s=>s.host).map(s=><div key={s.slot}><dt>Сервер {s.slot}</dt><dd>{s.host}:{s.port}</dd></div>)}</dl><Button loading={readingUsb} disabled={busy||dirty} onClick={()=>void readUsb()}>Прочитать USB повторно</Button><Button loading={applying} disabled={busy||dirty||!!validation||!writable} onClick={()=>void applyUsb()}>Первоначальная настройка по USB</Button>{applying&&<Description>Запись и проверка настроек. Не отсоединяйте USB.</Description>}</SettingsCard>
|
||||||
</>:section==='commands'?<SettingsCard title="Команды и журнал" description="Отправка команд, очередь и история обмена с B2."><Button disabled={working||dirty} onClick={onCommands}>Открыть команды</Button>{dirty&&<p>Сохраните изменения перед переходом к командам.</p>}</SettingsCard>:<EquipmentPolicyFields telemetry={telemetry} observed={observed} hosts={hosts.filter(h=>h.vehicle_ids.includes(target))} section={section} fields={fields} presets={model.connectivity_presets??[]} value={settings} onChange={changeSettings} disabled={busy}/>}
|
</>:section==='commands'?<SettingsCard title="Команды и журнал" description="Отправка команд, очередь и история обмена с B2."><Button disabled={working||dirty} onClick={onCommands}>Открыть команды</Button>{dirty&&<Description>Сохраните изменения перед переходом к командам.</Description>}</SettingsCard>:<EquipmentPolicyFields telemetry={telemetry} observed={observed} hosts={hosts.filter(h=>h.vehicle_ids.includes(target))} section={section} fields={fields} presets={model.connectivity_presets??[]} value={settings} onChange={changeSettings} disabled={busy}/>}
|
||||||
{section!=='firmware'&&validation&&<StatusBadge tone="warning">{validation}</StatusBadge>}
|
{section!=='firmware'&&validation&&<StatusBadge tone="warning">{validation}</StatusBadge>}
|
||||||
</div>
|
</div>
|
||||||
</FeatureSettingsWindow>
|
</FeatureSettingsWindow>
|
||||||
<Window open={profileOpen} title="Сохранить профиль" subtitle="Общие настройки для новых трекеров" onClose={()=>{if(!working)setProfileOpen(false);}} closeOnEscape={!working} closeOnBackdrop={false} footer={<WindowFooterActions><Button disabled={working} onClick={()=>setProfileOpen(false)}>Отмена</Button><Button loading={working} disabled={working||!profileName.trim()||!!validation} onClick={()=>void saveProfile()}>Сохранить профиль</Button></WindowFooterActions>}><div className="fleet-form"><TextField label="Название профиля" value={profileName} maxLength={80} disabled={working} onChange={e=>setProfileName(e.target.value)}/><p>Сохранятся параметры работы, выбранный сервер и настройки связи. IMEI, номера SIM, личные пароли и привязка к аппарату не входят в профиль. Настройки уже добавленных устройств не изменятся.</p></div></Window>
|
<Window open={profileOpen} title="Сохранить профиль" subtitle="Общие настройки для новых трекеров" onClose={()=>{if(!working)setProfileOpen(false);}} closeOnEscape={!working} closeOnBackdrop={false} footer={<WindowFooterActions><Button disabled={working} onClick={()=>setProfileOpen(false)}>Отмена</Button><Button loading={working} disabled={working||!profileName.trim()||!!validation} onClick={()=>void saveProfile()}>Сохранить профиль</Button></WindowFooterActions>}><div className="fleet-form"><TextField label="Название профиля" value={profileName} maxLength={80} disabled={working} onChange={e=>setProfileName(e.target.value)}/><Description>Сохранятся параметры работы, выбранный сервер и настройки связи. IMEI, номера SIM, личные пароли и привязка к аппарату не входят в профиль. Настройки уже добавленных устройств не изменятся.</Description></div></Window>
|
||||||
<ToastStack items={error?[{id:'equipment-settings-error',title:error,tone:'error',durationMs:null}]:notice?[{id:'equipment-profile-saved',title:notice,tone:'success'}]:[]} onDismiss={()=>{setError('');setNotice('');}}/>
|
<ToastStack items={error?[{id:'equipment-settings-error',title:error,tone:'error',durationMs:null}]:notice?[{id:'equipment-profile-saved',title:notice,tone:'success'}]:[]} onDismiss={()=>{setError('');setNotice('');}}/>
|
||||||
</>;
|
</>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {EquipmentSettings} from './EquipmentSettings';
|
|||||||
import {EquipmentCommandWindow} from './EquipmentCommandWindow';
|
import {EquipmentCommandWindow} from './EquipmentCommandWindow';
|
||||||
import {hostOnline,telemetryLabel,useTrackerTelemetry,vpsRequest,type VPSHost} from '../../../core/fleet/vps';
|
import {hostOnline,telemetryLabel,useTrackerTelemetry,vpsRequest,type VPSHost} from '../../../core/fleet/vps';
|
||||||
import {VPSHostSettings} from './VPSHostSettings';
|
import {VPSHostSettings} from './VPSHostSettings';
|
||||||
import {VehicleRouter} from '../router/VehicleRouter';
|
|
||||||
import './equipment.css';
|
import './equipment.css';
|
||||||
|
|
||||||
export function IndependentEquipment({vehicle,computer,onRefresh,actionsTarget}:{vehicle:Vehicle;computer:ReactNode;onComputer:()=>void;onRefresh:()=>void;actionsTarget?:HTMLElement|null}){
|
export function IndependentEquipment({vehicle,computer,onRefresh,actionsTarget}:{vehicle:Vehicle;computer:ReactNode;onComputer:()=>void;onRefresh:()=>void;actionsTarget?:HTMLElement|null}){
|
||||||
@@ -32,7 +31,6 @@ export function IndependentEquipment({vehicle,computer,onRefresh,actionsTarget}:
|
|||||||
return <div className="fleet-equipment-tree">
|
return <div className="fleet-equipment-tree">
|
||||||
{actionsTarget===undefined?<div className="sensor-actions sensor-inventory-toolbar"><span className="sensor-note">Бортовой компьютер и независимые устройства</span><div className="sensor-actions">{actions}</div></div>:actionsTarget?createPortal(actions,actionsTarget):null}
|
{actionsTarget===undefined?<div className="sensor-actions sensor-inventory-toolbar"><span className="sensor-note">Бортовой компьютер и независимые устройства</span><div className="sensor-actions">{actions}</div></div>:actionsTarget?createPortal(actions,actionsTarget):null}
|
||||||
{computer}
|
{computer}
|
||||||
<VehicleRouter vehicleID={vehicle.id}/>
|
|
||||||
{!devices?<LoadingRegion loading={!error} label="Загрузка независимых устройств"/>:devices.length>0?<ResourceList aria-label="Независимые устройства">{devices.map(device=><li key={device.id}><ResourceRow icon={<Icon name="network"/>} title={device.name} description={`${models.find(m=>m.id===device.model_id)?.label??device.model_id} · IMEI …${device.observed.imei_suffix}`} metadata={telemetry.unavailable?'Связь с сервером не проверена':telemetryLabel(telemetry.items.find(t=>t.instance_id===device.id))} statusPlacement="leading" status={<StatusBadge variant="indicator" tone={!telemetry.unavailable&&telemetry.items.find(t=>t.instance_id===device.id)?.online?'success':'neutral'} aria-label={telemetryLabel(telemetry.items.find(t=>t.instance_id===device.id))}/>} actions={<><IconButton label={`Команды: ${device.name}`} onClick={()=>setCommandDevice(device)}><Icon name="terminal"/></IconButton><IconButton label={`Настройки: ${device.name}`} onClick={()=>setSelected(device)}><Icon name="settings"/></IconButton></>}/></li>)}</ResourceList>:null}
|
{!devices?<LoadingRegion loading={!error} label="Загрузка независимых устройств"/>:devices.length>0?<ResourceList aria-label="Независимые устройства">{devices.map(device=><li key={device.id}><ResourceRow icon={<Icon name="network"/>} title={device.name} description={`${models.find(m=>m.id===device.model_id)?.label??device.model_id} · IMEI …${device.observed.imei_suffix}`} metadata={telemetry.unavailable?'Связь с сервером не проверена':telemetryLabel(telemetry.items.find(t=>t.instance_id===device.id))} statusPlacement="leading" status={<StatusBadge variant="indicator" tone={!telemetry.unavailable&&telemetry.items.find(t=>t.instance_id===device.id)?.online?'success':'neutral'} aria-label={telemetryLabel(telemetry.items.find(t=>t.instance_id===device.id))}/>} actions={<><IconButton label={`Команды: ${device.name}`} onClick={()=>setCommandDevice(device)}><Icon name="terminal"/></IconButton><IconButton label={`Настройки: ${device.name}`} onClick={()=>setSelected(device)}><Icon name="settings"/></IconButton></>}/></li>)}</ResourceList>:null}
|
||||||
{vehicleHosts.length>0&&<ResourceList aria-label="VPS Host ARNavi">{vehicleHosts.map(host=><li key={host.id}><ResourceRow icon={<Icon name="database"/>} title={host.name} description="VPS Host ARNavi" metadata={`${host.endpoint} · Аппаратов: ${host.vehicle_ids.length}`} statusPlacement="leading" status={<StatusBadge variant="indicator" tone={hostOnline(host)?'success':'neutral'} aria-label={hostOnline(host)?'VPS на связи':'Нет связи с VPS'}/>} actions={<IconButton label={`Настройки: ${host.name}`} onClick={()=>{setSelectedHost(host);setVpsOpen(true);}}><Icon name="settings"/></IconButton>}/></li>)}</ResourceList>}
|
{vehicleHosts.length>0&&<ResourceList aria-label="VPS Host ARNavi">{vehicleHosts.map(host=><li key={host.id}><ResourceRow icon={<Icon name="database"/>} title={host.name} description="VPS Host ARNavi" metadata={`${host.endpoint} · Аппаратов: ${host.vehicle_ids.length}`} statusPlacement="leading" status={<StatusBadge variant="indicator" tone={hostOnline(host)?'success':'neutral'} aria-label={hostOnline(host)?'VPS на связи':'Нет связи с VPS'}/>} actions={<IconButton label={`Настройки: ${host.name}`} onClick={()=>{setSelectedHost(host);setVpsOpen(true);}}><Icon name="settings"/></IconButton>}/></li>)}</ResourceList>}
|
||||||
{vpsOpen&&<VPSHostSettings host={hosts.find(h=>h.id===selectedHost?.id)} hosts={hosts} vehicle={vehicle} vehicles={vehicles} onClose={()=>setVpsOpen(false)} onSaved={()=>{setVpsOpen(false);reload();}}/>}
|
{vpsOpen&&<VPSHostSettings host={hosts.find(h=>h.id===selectedHost?.id)} hosts={hosts} vehicle={vehicle} vehicles={vehicles} onClose={()=>setVpsOpen(false)} onSaved={()=>{setVpsOpen(false);reload();}}/>}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {ObservationBattery} from './ObservationBattery';
|
import {ObservationBattery} from './ObservationBattery';
|
||||||
import {useEffect,useLayoutEffect,useMemo,useRef,useState} from 'react';
|
import {useEffect,useLayoutEffect,useMemo,useRef,useState} from 'react';
|
||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
import {Button,DockHandle,GlassSurface,Icon,IconButton,LoadingRegion,Select,StatusBadge,Switch,ToastStack,Window} from '@nodedc/ui-react';
|
import { Description,Button,DockHandle,GlassSurface,Icon,IconButton,LoadingRegion,Select,StatusBadge,Switch,ToastStack,Window} from '@nodedc/ui-react';
|
||||||
import {useDevicePluginHost} from '../../../core/device-plugins/DevicePluginHost';
|
import {useDevicePluginHost} from '../../../core/device-plugins/DevicePluginHost';
|
||||||
import {createFleetSensorTransport} from '../../../core/fleet/sensorTransport';
|
import {createFleetSensorTransport} from '../../../core/fleet/sensorTransport';
|
||||||
import {moveObservation,withObservationTree,orderedObservationIDs,observationTree} from '../../../core/fleet/observationLayout';
|
import {moveObservation,withObservationTree,orderedObservationIDs,observationTree} from '../../../core/fleet/observationLayout';
|
||||||
@@ -107,9 +107,9 @@ export function BoardObservationCenter({vehicleID,name,enabled,paired,back,confi
|
|||||||
<ObservationMount element={media.current.get(source.key)!}/>
|
<ObservationMount element={media.current.get(source.key)!}/>
|
||||||
</GlassSurface>
|
</GlassSurface>
|
||||||
</div>,mounts.current.get(source.key)!,source.key))}
|
</div>,mounts.current.get(source.key)!,source.key))}
|
||||||
</ObservationDeck>:<div className="observation-empty"><p>Все окна скрыты.</p><Button onClick={()=>setLayersOpen(true)}>Доступные слои</Button></div>}</div>
|
</ObservationDeck>:<div className="observation-empty"><Description>Все окна скрыты.</Description><Button onClick={()=>setLayersOpen(true)}>Доступные слои</Button></div>}</div>
|
||||||
{presets.ready&&groups.map(({device,views,Session,independentMediaLiveness})=>visible.some(key=>views.some(view=>key===observationKey(device.id,view.id)))&&<Session key={device.id} device={device} transport={transport} configure={view=>{setSettingsView(view==='plan'?'plan':'points');setSettingsDevice(device.id);}} sceneProfiles={Object.fromEntries(views.map(view=>[view.id,presets.scenes?.[observationKey(device.id,view.id)]]).filter(([,value])=>value))} onSceneChange={presets.ready?(view,value)=>presets.setScene(observationKey(device.id,view),value):undefined} reconnect={reconnect(device.kind)} presentation={presets.cameras[device.id]} onPresentationChange={presets.ready?value=>presets.setCamera(device.id,value):undefined} enabled={(independentMediaLiveness?paired:enabled&&inventory?.fresh!==false)&&device.online} fresh={enabled&&inventory?.fresh!==false} createRerunHost={createIsolatedRerunHost} views={views.filter(view=>visible.includes(observationKey(device.id,view.id))).map(view=>({id:view.id,layer:layerFor(observationKey(device.id,view.id),view),target:media.current.get(observationKey(device.id,view.id))!,...headers.current.get(observationKey(device.id,view.id))!}))}/>)}
|
{presets.ready&&groups.map(({device,views,Session,independentMediaLiveness})=>visible.some(key=>views.some(view=>key===observationKey(device.id,view.id)))&&<Session key={device.id} device={device} transport={transport} configure={view=>{setSettingsView(view==='plan'?'plan':'points');setSettingsDevice(device.id);}} sceneProfiles={Object.fromEntries(views.map(view=>[view.id,presets.scenes?.[observationKey(device.id,view.id)]]).filter(([,value])=>value))} onSceneChange={presets.ready?(view,value)=>presets.setScene(observationKey(device.id,view),value):undefined} reconnect={reconnect(device.kind)} presentation={presets.cameras[device.id]} onPresentationChange={presets.ready?value=>presets.setCamera(device.id,value):undefined} enabled={(independentMediaLiveness?paired:enabled&&inventory?.fresh!==false)&&device.online} fresh={enabled&&inventory?.fresh!==false} createRerunHost={createIsolatedRerunHost} views={views.filter(view=>visible.includes(observationKey(device.id,view.id))).map(view=>({id:view.id,layer:layerFor(observationKey(device.id,view.id),view),target:media.current.get(observationKey(device.id,view.id))!,...headers.current.get(observationKey(device.id,view.id))!}))}/>)}
|
||||||
{sources.filter(source=>source.catalog&&visible.includes(source.key)).map(source=>createPortal(<div className="observation-source"><div className="observation-source__notice"><p>{source.catalog} не подключён к аппарату.</p><Button onClick={reconnect(source.kind)??configure}>Подключить оборудование</Button></div></div>,media.current.get(source.key)!,source.key))}
|
{sources.filter(source=>source.catalog&&visible.includes(source.key)).map(source=>createPortal(<div className="observation-source"><div className="observation-source__notice"><Description>{source.catalog} не подключён к аппарату.</Description><Button onClick={reconnect(source.kind)??configure}>Подключить оборудование</Button></div></div>,media.current.get(source.key)!,source.key))}
|
||||||
{connectingKind&&<ObservationConnectionWindow key={`${vehicleID}:${connectingKind}`} kind={connectingKind} transport={transport} contributions={registry.sensorContributions} enabled={enabled} refresh={refresh} close={()=>setConnectingKind(null)} configure={setSettingsDevice}/>}
|
{connectingKind&&<ObservationConnectionWindow key={`${vehicleID}:${connectingKind}`} kind={connectingKind} transport={transport} contributions={registry.sensorContributions} enabled={enabled} refresh={refresh} close={()=>setConnectingKind(null)} configure={setSettingsDevice}/>}
|
||||||
{configuredDevice&&<ObservationDeviceSettings key={configuredDevice.id+settingsView} sceneProfile={{view:settingsView,settings:presets.scenes?.[observationKey(configuredDevice.id,settingsView)],save:value=>presets.setScene(observationKey(configuredDevice.id,settingsView),value)}} device={configuredDevice} transport={transport} contributions={registry.sensorContributions} enabled={enabled&&inventory?.fresh!==false} close={()=>setSettingsDevice(null)} configure={configure} refresh={async()=>{await refresh();}} reconnect={reconnect(configuredDevice.kind)}/>}
|
{configuredDevice&&<ObservationDeviceSettings key={configuredDevice.id+settingsView} sceneProfile={{view:settingsView,settings:presets.scenes?.[observationKey(configuredDevice.id,settingsView)],save:value=>presets.setScene(observationKey(configuredDevice.id,settingsView),value)}} device={configuredDevice} transport={transport} contributions={registry.sensorContributions} enabled={enabled&&inventory?.fresh!==false} close={()=>setSettingsDevice(null)} configure={configure} refresh={async()=>{await refresh();}} reconnect={reconnect(configuredDevice.kind)}/>}
|
||||||
{visible.includes('map')&&createPortal(<ObservationMap vehicleID={vehicleID} header={headers.current.get('map')!}/>,media.current.get('map')!,'map-session')}
|
{visible.includes('map')&&createPortal(<ObservationMap vehicleID={vehicleID} header={headers.current.get('map')!}/>,media.current.get('map')!,'map-session')}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import {Button,ToastStack,Window} from '@nodedc/ui-react';
|
import { Description,Button,ToastStack,Window} from '@nodedc/ui-react';
|
||||||
import type {SensorDetailProps} from '../../../../../../packages/sensor-ui/src/extensions';
|
import type {SensorDetailProps} from '../../../../../../packages/sensor-ui/src/extensions';
|
||||||
import {SensorDetail} from '../../../../../../packages/sensor-ui/src/SensorDetail';
|
import {SensorDetail} from '../../../../../../packages/sensor-ui/src/SensorDetail';
|
||||||
import {sensorContribution,type SensorUiContribution} from '../../../../../../packages/sensor-ui/src/extensions';
|
import {sensorContribution,type SensorUiContribution} from '../../../../../../packages/sensor-ui/src/extensions';
|
||||||
@@ -13,9 +13,9 @@ export function ObservationDeviceSettings({device,transport,contributions,enable
|
|||||||
const content=<Detail key={device.snapshot.context.session_id} device={device} transport={transport} enabled={enabled} previewEnabled={false} sceneProfile={sceneProfile} back={close} backLabel="Вернуться к наблюдению" refresh={refresh} reconnect={reconnect} failure={reason=>setError(reason instanceof Error?reason.message:reason?String(reason):'')} createRerunHost={createIsolatedRerunHost}/>;
|
const content=<Detail key={device.snapshot.context.session_id} device={device} transport={transport} enabled={enabled} previewEnabled={false} sceneProfile={sceneProfile} back={close} backLabel="Вернуться к наблюдению" refresh={refresh} reconnect={reconnect} failure={reason=>setError(reason instanceof Error?reason.message:reason?String(reason):'')} createRerunHost={createIsolatedRerunHost}/>;
|
||||||
if(contribution?.detailPresentation==='modal')return <>{content}<ToastStack items={error?[{id:'device-settings-error',tone:'error',title:error,durationMs:null}]:[]} onDismiss={()=>setError('')}/></>;
|
if(contribution?.detailPresentation==='modal')return <>{content}<ToastStack items={error?[{id:'device-settings-error',tone:'error',title:error,durationMs:null}]:[]} onDismiss={()=>setError('')}/></>;
|
||||||
return <Window open title={`Настройки · ${device.name}`} size="lg" placement="center" closeOnBackdrop={false} onClose={close}>
|
return <Window open title={`Настройки · ${device.name}`} size="lg" placement="center" closeOnBackdrop={false} onClose={close}>
|
||||||
{!enabled&&<p>Нет связи с устройством. Настройки оборудования будут доступны после подключения.</p>}
|
{!enabled&&<Description>Нет связи с устройством. Настройки оборудования будут доступны после подключения.</Description>}
|
||||||
{!device.prepared&&<Button onClick={configure}>Открыть оборудование аппарата</Button>}
|
{!device.prepared&&<Button onClick={configure}>Открыть оборудование аппарата</Button>}
|
||||||
{error&&<p role="alert">{error}</p>}
|
{error&&<Description role="alert">{error}</Description>}
|
||||||
{content}
|
{content}
|
||||||
</Window>;
|
</Window>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {useEffect,useMemo,useRef,useState} from 'react';
|
import {useEffect,useMemo,useRef,useState} from 'react';
|
||||||
import {CesiumMapRenderer,initialMapRuntimeState,type CesiumMapRendererHandle,type MapCamera,type MapGhostPinLayer} from '@nodedc/map-cesium-react';
|
import {CesiumMapRenderer,initialMapRuntimeState,type CesiumMapRendererHandle,type MapCamera,type MapGhostPinLayer} from '@nodedc/map-cesium-react';
|
||||||
import {Button,Icon,IconButton,Switch,Window} from '@nodedc/ui-react';
|
import { Description,Button,Icon,IconButton,Switch,Window} from '@nodedc/ui-react';
|
||||||
import {ObservationHeader} from '../../../../../../packages/sensor-ui/src/ObservationHeader';
|
import {ObservationHeader} from '../../../../../../packages/sensor-ui/src/ObservationHeader';
|
||||||
import type {ObservationHeaderTargets} from '../../../../../../packages/sensor-ui/src/observation';
|
import type {ObservationHeaderTargets} from '../../../../../../packages/sensor-ui/src/observation';
|
||||||
import {useTrackerTelemetry} from '../../../core/fleet/vps';
|
import {useTrackerTelemetry} from '../../../core/fleet/vps';
|
||||||
@@ -28,7 +28,7 @@ export function ObservationMap({vehicleID,header}:{vehicleID:string;header:Obser
|
|||||||
return <div className="observation-source">
|
return <div className="observation-source">
|
||||||
<ObservationHeader targets={header} live={!telemetry.unavailable&&telemetry.items.some(item=>item.online&&item.position_fresh)} label={positionLabel}><IconButton label="Показать аппарат на карте" disabled={!pins.length} onClick={center}><Icon name="globe"/></IconButton><IconButton label="Слои карты" onClick={()=>setSettings(true)}><Icon name="layers"/></IconButton></ObservationHeader>
|
<ObservationHeader targets={header} live={!telemetry.unavailable&&telemetry.items.some(item=>item.online&&item.position_fresh)} label={positionLabel}><IconButton label="Показать аппарат на карте" disabled={!pins.length} onClick={center}><Icon name="globe"/></IconButton><IconButton label="Слои карты" onClick={()=>setSettings(true)}><Icon name="layers"/></IconButton></ObservationHeader>
|
||||||
<div className="observation-source__media observation-map" data-available={available}><CesiumMapRenderer key={generation} ref={renderer} runtimeConfigUrl="/api/v1/map/runtime-config" camera={camera} ghostPins={markers} layers={layers} settings={mapPresentation(defaults.visualSettings)} cacheIntent={{enabled:true,no_overwrite:true}} onRuntimeStateChange={setState} onCameraChange={value=>{try{localStorage.setItem(storageKey,JSON.stringify(value));}catch{/* Browser storage may be unavailable. */}}}/></div>
|
<div className="observation-source__media observation-map" data-available={available}><CesiumMapRenderer key={generation} ref={renderer} runtimeConfigUrl="/api/v1/map/runtime-config" camera={camera} ghostPins={markers} layers={layers} settings={mapPresentation(defaults.visualSettings)} cacheIntent={{enabled:true,no_overwrite:true}} onRuntimeStateChange={setState} onCameraChange={value=>{try{localStorage.setItem(storageKey,JSON.stringify(value));}catch{/* Browser storage may be unavailable. */}}}/></div>
|
||||||
{unavailable&&<div className="observation-source__notice"><p>Картографические слои недоступны. Проверяем связь с сервером карты.</p><p>{positionLabel}</p><Button onClick={()=>setGeneration(v=>v+1)}>Повторить загрузку карты</Button></div>}
|
{unavailable&&<div className="observation-source__notice"><Description>Картографические слои недоступны. Проверяем связь с сервером карты.</Description><Description>{positionLabel}</Description><Button onClick={()=>setGeneration(v=>v+1)}>Повторить загрузку карты</Button></div>}
|
||||||
<Window open={settings} onClose={()=>setSettings(false)} title="Слои карты" size="sm">
|
<Window open={settings} onClose={()=>setSettings(false)} title="Слои карты" size="sm">
|
||||||
<div className="observation-settings">{([{id:'imagery',name:'Спутниковые снимки'},{id:'terrain',name:'Рельеф'},{id:'buildings',name:'Здания OSM'}] as const).map(item=><Switch key={item.id} label={item.name} checked={layers[item.id]} onChange={value=>setLayers(current=>({...current,[item.id]:value}))}/>)}
|
<div className="observation-settings">{([{id:'imagery',name:'Спутниковые снимки'},{id:'terrain',name:'Рельеф'},{id:'buildings',name:'Здания OSM'}] as const).map(item=><Switch key={item.id} label={item.name} checked={layers[item.id]} onChange={value=>setLayers(current=>({...current,[item.id]:value}))}/>)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
import {RouterSpeedGauge} from '../../../components/network/RouterSpeedGauge';
|
||||||
|
import {useEffect,useState} from 'react';
|
||||||
|
import {Button,Description,Select,SettingsCard,StatusBadge} from '@nodedc/ui-react';
|
||||||
|
import {routerFresh,type RouterDevice,type RouterSnapshot} from '../../../../../../packages/router-ui/src/contracts';
|
||||||
|
import {useServers,useServerHealth,serviceAvailability} from '../../../core/system/servers';
|
||||||
|
import {fleetRequest} from '../../../core/fleet/useFleet';
|
||||||
|
import {ServerServiceSetup} from '../../../components/system/ServerServiceSetup';
|
||||||
|
|
||||||
|
export function RouterSpeedtest({vehicleID,device,value}:{vehicleID:string;device:RouterDevice;value:RouterSnapshot}){
|
||||||
|
const servers=useServers(),health=useServerHealth(servers.items,servers.generation);
|
||||||
|
const [setup,setSetup]=useState(false),[selected,setSelected]=useState(''),[sending,setSending]=useState(false),[error,setError]=useState('');
|
||||||
|
const [pending,setPending]=useState<string|null>(null),[pendingAt,setPendingAt]=useState(0),[cancelling,setCancelling]=useState(false);
|
||||||
|
const services=(servers.items??[]).flatMap(server=>server.services.filter(s=>s.kind==='librespeed').map(service=>({server,service})));
|
||||||
|
const chosen=services.find(s=>s.service.id===selected)??(services.length===1?services[0]:undefined);
|
||||||
|
const latest=value.results.filter(r=>r.device_id===device.id&&r.action==='speedtest').sort((a,b)=>Number(['queued','applying'].includes(b.state))-Number(['queued','applying'].includes(a.state))||(b.at??0)-(a.at??0))[0];
|
||||||
|
const expired=!!pending&&Date.now()-pendingAt>100000;
|
||||||
|
const receipt=pending&&!expired?value.results.find(r=>r.operation_id===pending):latest;
|
||||||
|
const measurement=receipt?.measurement;
|
||||||
|
useEffect(()=>{if(pending&&receipt?.operation_id===pending&&['complete','error','unknown'].includes(receipt.state))setPending(null);},[pending,receipt?.operation_id,receipt?.state]);
|
||||||
|
const waiting=!!pending&&!expired&&receipt?.operation_id!==pending;
|
||||||
|
const running=waiting||receipt?.state==='queued'||receipt?.state==='applying';
|
||||||
|
const ready=routerFresh(value,device)&&device.state==='ready'&&value.speedtest_version===1;
|
||||||
|
const available=chosen?serviceAvailability(chosen.service,health[chosen.server.id]).online:false;
|
||||||
|
async function start(){if(!chosen)return;setSending(true);setError('');setCancelling(false);const operation='op_'+crypto.randomUUID().replaceAll('-','');try{
|
||||||
|
await fleetRequest(`/${vehicleID}/routers/speedtest`,'POST',{operation_id:operation,runtime_id:value.runtime_id,device_id:device.id,server_id:chosen.service.id});setPendingAt(Date.now());setPending(operation);
|
||||||
|
}catch(e){setError(e instanceof Error?e.message:'Не удалось запустить замер.');}finally{setSending(false);}}
|
||||||
|
async function cancel(){const operation=pending??receipt?.operation_id;if(!operation)return;setSending(true);setError('');try{await fleetRequest(`/${vehicleID}/routers/speedtest/${operation}/cancel`,'POST',{});setCancelling(true);}catch(e){setError(e instanceof Error?e.message:'Не удалось остановить замер.');}finally{setSending(false);}}
|
||||||
|
const number=(n:number,unit:string)=>`${new Intl.NumberFormat('ru-RU',{maximumFractionDigits:1}).format(n)} ${unit}`;
|
||||||
|
return <>
|
||||||
|
{services.length===0?<SettingsCard title="Замер скорости" description={servers.error||(!servers.items?'Получение служб…':'Для замера скорости подключите службу LibreSpeed на одном из ваших VPS.')}><Button disabled={!servers.items||!!servers.error} onClick={()=>setSetup(true)}>Добавить службу</Button></SettingsCard>:<SettingsCard title="Замер скорости" description="Борт → Ethernet роутера → выбранный VPS. Замер занимает около 30 секунд и расходует мобильный трафик.">
|
||||||
|
<Select label="Сервер замера" disabled={running||sending} value={chosen?.service.id??''} options={[{value:'',label:'Выберите VPS'},...services.map(s=>({value:s.service.id,label:`${s.server.name} · ${s.server.address}`}))]} onChange={setSelected}/>
|
||||||
|
<Description>{ready?`Интерфейс борта: ${device.interface}.`:value.speedtest_version!==1?'Для замера обновите бортовой агент.':'Борт или Ethernet-роутер недоступен.'}{chosen&&!available?' Служба VPS не подтвердила доступность.':''}</Description>
|
||||||
|
<RouterSpeedGauge key={receipt?.operation_id??pending??'idle'} measurement={measurement} waiting={waiting} fresh={value.fresh===true}/>
|
||||||
|
{measurement&&<>
|
||||||
|
{running&&cancelling&&<Description role="status">Останавливаем замер…</Description>}
|
||||||
|
<dl className="router-facts">
|
||||||
|
<div><dt>Задержка HTTP</dt><dd>{measurement.phase==='complete'?number(measurement.latency_ms,'мс'):'—'}</dd></div>
|
||||||
|
<div><dt>Джиттер HTTP</dt><dd>{measurement.phase==='complete'?number(measurement.jitter_ms,'мс'):'—'}</dd></div>
|
||||||
|
</dl>
|
||||||
|
{measurement.phase==='complete'&&<Description>{new Date((measurement.finished_at??measurement.started_at)*1000).toLocaleString('ru-RU')} · {measurement.interface}</Description>}
|
||||||
|
{measurement.phase==='error'&&<Description>{measurement.error==='ethernet_route_unavailable'?'У борта нет маршрута к VPS через этот роутер.':measurement.error==='ethernet_unavailable'?'Ethernet-подключение недоступно.':'Проверка соединения не завершилась. Проверьте доступность VPS и повторите замер.'}</Description>}
|
||||||
|
</>}
|
||||||
|
{expired&&<Description>Борт не подтвердил результат. Срок замера истёк; можно повторить проверку.</Description>}
|
||||||
|
{receipt?.state==='complete'&&!measurement&&<Description>Замер остановлен.</Description>}
|
||||||
|
{waiting&&<Description>Ожидаем подтверждения борта…</Description>}
|
||||||
|
{running&&!value.fresh&&<Description>Связь с бортом прервалась. Результат пока неизвестен; замер ограничен 90 секундами.</Description>}
|
||||||
|
<div className="router-actions">{running?<Button disabled={sending||cancelling} onClick={()=>void cancel()}>Остановить замер</Button>:<Button disabled={sending||!ready||!available||!!servers.error} loading={sending} onClick={()=>void start()}>Начать замер</Button>}<Button disabled={running||sending} onClick={()=>setSetup(true)}>Добавить службу</Button></div>
|
||||||
|
<Description>Результат относится к этому маршруту и времени замера. Подключение нескольких SIM само по себе не подтверждает агрегацию.</Description>
|
||||||
|
</SettingsCard>}
|
||||||
|
{error&&<StatusBadge tone="warning">{error}</StatusBadge>}
|
||||||
|
{setup&&<ServerServiceSetup fixedKind="librespeed" onClose={()=>setSetup(false)} onSaved={()=>{setSetup(false);servers.refresh();}}/>}
|
||||||
|
</>;
|
||||||
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
|
import {RouterSpeedtest} from './RouterSpeedtest';
|
||||||
import {useMemo} from 'react';
|
import {useMemo} from 'react';
|
||||||
import {RouterEquipment} from '../../../../../../packages/router-ui/src/RouterEquipment';
|
import {RouterEquipment} from '../../../../../../packages/router-ui/src/RouterEquipment';
|
||||||
import {routerTransport} from '../../../core/fleet/router';
|
import {routerTransport} from '../../../core/fleet/router';
|
||||||
|
|
||||||
export function VehicleRouter({vehicleID}:{vehicleID:string}){
|
export function VehicleRouter({vehicleID}:{vehicleID:string}){
|
||||||
const transport=useMemo(()=>routerTransport(vehicleID),[vehicleID]);
|
const transport=useMemo(()=>routerTransport(vehicleID),[vehicleID]);
|
||||||
return <RouterEquipment key={vehicleID} transport={transport}/>;
|
return <RouterEquipment key={vehicleID} transport={transport} renderSpeedtest={(device,value)=><RouterSpeedtest vehicleID={vehicleID} device={device} value={value}/>}/>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
type ComponentType,
|
type ComponentType,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { Icon, StatusBadge } from "@nodedc/ui-react";
|
import { Description, Icon, StatusBadge } from "@nodedc/ui-react";
|
||||||
import {
|
import {
|
||||||
LaboratoryEvidence,
|
LaboratoryEvidence,
|
||||||
LaboratorySelector,
|
LaboratorySelector,
|
||||||
@@ -198,11 +198,11 @@ function E29LaboratoryResult({
|
|||||||
<div className="laboratory-result-pending" role="status">
|
<div className="laboratory-result-pending" role="status">
|
||||||
{loading ? <span className="busy-indicator" aria-hidden="true" /> : <Icon name="database" size={20} />}
|
{loading ? <span className="busy-indicator" aria-hidden="true" /> : <Icon name="database" size={20} />}
|
||||||
<strong>{loading ? "Проверяем и открываем запись" : "Исходная запись не открыта"}</strong>
|
<strong>{loading ? "Проверяем и открываем запись" : "Исходная запись не открыта"}</strong>
|
||||||
<p>
|
<Description>
|
||||||
{error ?? (loading
|
{error ?? (loading
|
||||||
? "Viewer появится после серверной проверки неизменяемого RRD."
|
? "Viewer появится после серверной проверки неизменяемого RRD."
|
||||||
: "Выберите LAB E29 повторно, чтобы открыть связанный источник.")}
|
: "Выберите LAB E29 повторно, чтобы открыть связанный источник.")}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</LaboratoryEvidence>
|
</LaboratoryEvidence>
|
||||||
@@ -240,7 +240,7 @@ function E29LaboratoryResult({
|
|||||||
<small>{formatNumber(result.metrics.geometryOnlyOccupied.pointCount, 0)} точек</small>
|
<small>{formatNumber(result.metrics.geometryOnlyOccupied.pointCount, 0)} точек</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>{result.decision.nextGate}</p>
|
<Description>{result.decision.nextGate}</Description>
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
details={(
|
details={(
|
||||||
@@ -297,13 +297,13 @@ function E29LaboratoryResult({
|
|||||||
<div className="laboratory-frame-review__conflicts">
|
<div className="laboratory-frame-review__conflicts">
|
||||||
<span>Фактические конфликты</span>
|
<span>Фактические конфликты</span>
|
||||||
{conflicts.length ? conflicts.map((observation) => (
|
{conflicts.length ? conflicts.map((observation) => (
|
||||||
<p key={observation.trackId}>
|
<Description key={observation.trackId}>
|
||||||
<strong>{observation.label} · track {observation.trackId}</strong>
|
<strong>{observation.label} · track {observation.trackId}</strong>
|
||||||
<small>
|
<small>
|
||||||
{observation.geometryReason} · classified {observation.support.classifiedPoints}
|
{observation.geometryReason} · classified {observation.support.classifiedPoints}
|
||||||
{" · "}surface {observation.support.surfacePoints}
|
{" · "}surface {observation.support.surfacePoints}
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</Description>
|
||||||
)) : <small>В этом кадре конфликт не найден.</small>}
|
)) : <small>В этом кадре конфликт не найден.</small>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -427,11 +427,11 @@ function PublishedLaboratoryResult({
|
|||||||
<div className="laboratory-result-pending" role="status">
|
<div className="laboratory-result-pending" role="status">
|
||||||
{loading ? <span className="busy-indicator" aria-hidden="true" /> : <Icon name="database" size={20} />}
|
{loading ? <span className="busy-indicator" aria-hidden="true" /> : <Icon name="database" size={20} />}
|
||||||
<strong>{loading ? "Подготавливаем лабораторную запись" : "Запись не открыта"}</strong>
|
<strong>{loading ? "Подготавливаем лабораторную запись" : "Запись не открыта"}</strong>
|
||||||
<p>
|
<Description>
|
||||||
{error ?? (loading
|
{error ?? (loading
|
||||||
? "Связанное визуальное доказательство откроется после проверки записи."
|
? "Связанное визуальное доказательство откроется после проверки записи."
|
||||||
: "Выберите работу ещё раз, чтобы открыть связанное визуальное доказательство.")}
|
: "Выберите работу ещё раз, чтобы открыть связанное визуальное доказательство.")}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</LaboratoryEvidence>
|
</LaboratoryEvidence>
|
||||||
@@ -745,7 +745,7 @@ export function LaboratoryArchiveWorkspace(props: LaboratoryWorkspaceProps) {
|
|||||||
<div className="laboratory-result-pending" role="status">
|
<div className="laboratory-result-pending" role="status">
|
||||||
<span className="busy-indicator" aria-hidden="true" />
|
<span className="busy-indicator" aria-hidden="true" />
|
||||||
<strong>Ревизия лабораторных данных</strong>
|
<strong>Ревизия лабораторных данных</strong>
|
||||||
<p>Проверяем артефакты, связанные исходные записи и доступность replay.</p>
|
<Description>Проверяем артефакты, связанные исходные записи и доступность replay.</Description>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -755,12 +755,12 @@ export function LaboratoryArchiveWorkspace(props: LaboratoryWorkspaceProps) {
|
|||||||
<div className="laboratory-result-pending" role="status">
|
<div className="laboratory-result-pending" role="status">
|
||||||
<Icon name="database" size={20} />
|
<Icon name="database" size={20} />
|
||||||
<strong>Подтверждённых лабораторных работ нет</strong>
|
<strong>Подтверждённых лабораторных работ нет</strong>
|
||||||
<p>
|
<Description>
|
||||||
{evidenceError
|
{evidenceError
|
||||||
?? advanced.indexError
|
?? advanced.indexError
|
||||||
?? sessions.error
|
?? sessions.error
|
||||||
?? "Непроверенные и отсутствующие результаты скрыты."}
|
?? "Непроверенные и отсутствующие результаты скрыты."}
|
||||||
</p>
|
</Description>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -912,13 +912,13 @@ export function LaboratoryArchiveWorkspace(props: LaboratoryWorkspaceProps) {
|
|||||||
<div className="laboratory-result-pending" role="status">
|
<div className="laboratory-result-pending" role="status">
|
||||||
<span className="busy-indicator" aria-hidden="true" />
|
<span className="busy-indicator" aria-hidden="true" />
|
||||||
<strong>Подготавливаем выбранную лабораторную работу</strong>
|
<strong>Подготавливаем выбранную лабораторную работу</strong>
|
||||||
<p>Сервер проверяет только её доказательства и связанные артефакты.</p>
|
<Description>Сервер проверяет только её доказательства и связанные артефакты.</Description>
|
||||||
</div>
|
</div>
|
||||||
) : advanced.failedWorkId === workId ? (
|
) : advanced.failedWorkId === workId ? (
|
||||||
<div className="laboratory-result-pending">
|
<div className="laboratory-result-pending">
|
||||||
<Icon name="database" size={20} />
|
<Icon name="database" size={20} />
|
||||||
<strong>Работа не прошла ревизию</strong>
|
<strong>Работа не прошла ревизию</strong>
|
||||||
<p>{advanced.resultError}</p>
|
<Description>{advanced.resultError}</Description>
|
||||||
</div>
|
</div>
|
||||||
) : isAdvancedLaboratoryWorkId(workId) ? (
|
) : isAdvancedLaboratoryWorkId(workId) ? (
|
||||||
<AdvancedLaboratoryResult
|
<AdvancedLaboratoryResult
|
||||||
@@ -942,7 +942,7 @@ export function LaboratoryArchiveWorkspace(props: LaboratoryWorkspaceProps) {
|
|||||||
<div className="laboratory-result-pending">
|
<div className="laboratory-result-pending">
|
||||||
<Icon name="database" size={20} />
|
<Icon name="database" size={20} />
|
||||||
<strong>Работа не прошла ревизию</strong>
|
<strong>Работа не прошла ревизию</strong>
|
||||||
<p>Неподтверждённый результат скрыт из лабораторного каталога.</p>
|
<Description>Неподтверждённый результат скрыт из лабораторного каталога.</Description>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div> : null}
|
</div> : null}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user