refactor(platform): bound lab canon and contour identity
This commit is contained in:
@@ -478,7 +478,7 @@ export function ComputeContourSettingsWindow({
|
||||
<dd>{network?.broker.bind_address ?? "—"}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Worker 006</dt>
|
||||
<dt>{contour?.display_name ?? "Worker"}</dt>
|
||||
<dd>{network?.worker.reachable
|
||||
? `${network.worker.mqtt_host ?? "—"}:${network.worker.mqtt_port ?? "—"}`
|
||||
: "Недоступен"}</dd>
|
||||
|
||||
@@ -28,7 +28,7 @@ export function useComputeContourSettings(): ComputeContourSettingsController {
|
||||
{
|
||||
label: "Обновить телеметрию выбранного контура",
|
||||
icon: "refresh",
|
||||
disabled: contours.selectedContour?.contour_id !== "worker-006",
|
||||
disabled: contours.selectedContour === null,
|
||||
onClick: contours.refreshTelemetry,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -48,7 +48,11 @@ export function useWorkerTelemetry(
|
||||
setError(null);
|
||||
} catch (reason: unknown) {
|
||||
if (controller.signal.aborted) return;
|
||||
setError(reason instanceof Error ? reason.message : "Worker 006 не ответил.");
|
||||
setError(
|
||||
reason instanceof Error
|
||||
? reason.message
|
||||
: "Вычислительный контур не ответил.",
|
||||
);
|
||||
} finally {
|
||||
if (!controller.signal.aborted) setLoading(false);
|
||||
}
|
||||
|
||||
@@ -62,8 +62,7 @@ export function ComputeModulesWorkspace() {
|
||||
selectedContour,
|
||||
telemetryRefreshGeneration,
|
||||
} = useComputeContours();
|
||||
const legacyDiagnostic = selectedContour?.contour_id === "worker-006"
|
||||
&& selectedContour.telemetry_mode === "legacy-ssh";
|
||||
const legacyDiagnostic = selectedContour?.telemetry_mode === "legacy-ssh";
|
||||
const { telemetry, error } = useWorkerTelemetry(
|
||||
selectedContour?.contour_id ?? null,
|
||||
(selectedContour?.telemetry_poll_interval_seconds ?? 3) * 1_000,
|
||||
|
||||
@@ -20,8 +20,7 @@ export function NetworkWorkspace() {
|
||||
selectedContour,
|
||||
telemetryRefreshGeneration,
|
||||
} = useComputeContours();
|
||||
const legacyDiagnostic = selectedContour?.contour_id === "worker-006"
|
||||
&& selectedContour.telemetry_mode === "legacy-ssh";
|
||||
const legacyDiagnostic = selectedContour?.telemetry_mode === "legacy-ssh";
|
||||
const { telemetry, error } = useWorkerTelemetry(
|
||||
selectedContour?.contour_id ?? null,
|
||||
(selectedContour?.telemetry_poll_interval_seconds ?? 3) * 1_000,
|
||||
|
||||
Reference in New Issue
Block a user