feat(ui): перевести фронт с pcp-ui-service на источники, снять gateway catch-all
Запросы tguApi.ts (platforms/plans/decision/dismiss/restore/confirm-layin) и flight-line переведены с прокси /api/tgu-planning через умирающий pcp-ui-service на прямые вызовы pcp-tgu-service (/api/pcp-tgu, decision и confirm-layin — на тест-контроллер /test/tgu/*) и pcp-ballistics-service. flight-line перенесён в ballisticsApi.ts. editorApi.ts modes переведён с /api/current-plans на /api/pcp-mission. UX-перевод ошибок решения уже жил во фронте (errorMessage в tguApi.ts), серверная обвязка ui-service дублировала. Из config-repo/pcp-gateway-service.yaml снят маршрут ui-catch-all: не-матчнутый /api/** теперь отдаёт 404 на gateway, а не уходит в pcp-ui-service. Шаг 8 (вывод сервиса из эксплуатации: compose/helm/CI/реестр + удаление кода) отложен до проверки репойнта на живом стенде; сервис пока задеплоен без маршрутов. См. docs/план-перевода-с-pcp-ui-service.md и задачу #40 бэклога.
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
Возвращает { env, domain, sched } в том же виде, что buildEnv() прототипа,
|
||||
так что ConstellationDashboard рендерит реальные данные без изменений разметки.
|
||||
============================================================ */
|
||||
import { fetchPlatforms, fetchFlightLine, fetchPlans, type FlightLinePoint } from "../../api/tguApi";
|
||||
import { fetchPlatforms, fetchPlans } from "../../api/tguApi";
|
||||
import { fetchStations, type StationDto } from "../../api/stationsApi";
|
||||
import { fetchRequestsForMap } from "../../api/requestApi";
|
||||
import { fetchSatelliteRva } from "../../api/ballisticsApi";
|
||||
import { fetchSatelliteRva, fetchFlightLine, type FlightLinePoint } from "../../api/ballisticsApi";
|
||||
import { fetchPlanModes, type PlanMode } from "../tgu-editor/editorApi";
|
||||
import type { TguPlatform, TguPlan } from "../../model/tguTypes";
|
||||
import type { RequestMapItem } from "../../model/requestTypes";
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { useEffect, useMemo, useRef, useState, useCallback, type MutableRefObject } from "react";
|
||||
import { fetchRequestsForMap } from "../../api/requestApi";
|
||||
import { fetchStations, type StationDto } from "../../api/stationsApi";
|
||||
import { fetchFlightLine, type FlightLinePoint } from "../../api/tguApi";
|
||||
import type { RequestMapItem } from "../../model/requestTypes";
|
||||
import { stationPasses, type OrbitPassInfo, type PassRange } from "../tgu-map-2d/geometry/passes";
|
||||
import { fetchPointVisibility, fetchSatelliteRva, type PointVisibilityParam, type RvaZone } from "../../api/ballisticsApi";
|
||||
import { fetchPointVisibility, fetchSatelliteRva, fetchFlightLine, type FlightLinePoint, type PointVisibilityParam, type RvaZone } from "../../api/ballisticsApi";
|
||||
import {
|
||||
buildSurveyRoute,
|
||||
calculateDrops,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { apiFetch } from "../../api/apiFetch";
|
||||
|
||||
export type PlanSurveyMode = {
|
||||
id: number;
|
||||
planId: number;
|
||||
@@ -30,9 +32,10 @@ export type PlanDropMode = {
|
||||
export type PlanMode = PlanSurveyMode | PlanDropMode;
|
||||
|
||||
export async function fetchPlanModes(planId: string): Promise<PlanMode[]> {
|
||||
const response = await fetch(`/api/current-plans/missions/${encodeURIComponent(planId)}/modes`, {
|
||||
headers: { Accept: "application/json" }
|
||||
});
|
||||
const response = await apiFetch(
|
||||
`/api/pcp-mission/api/missions/${encodeURIComponent(planId)}/modes`,
|
||||
{ headers: { Accept: "application/json" } }
|
||||
);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Ошибка загрузки включений плана: ${response.status}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user