Files
explorer-monorepo/frontend/src/pages/system/index.tsx
defiQUG 7a7dfca221
Some checks failed
Deploy Explorer Live / deploy (push) Failing after 14s
Validate Explorer / frontend (push) Successful in 1m34s
Validate Explorer / smoke-e2e (push) Failing after 1m26s
feat(explorer): mission-control resilience, ops token labels, and CI validate
Add SSE reconnect with backoff, fallback REST polling, visibility-aware refresh,
extended token-list labels on operations pages, validate-on-pr workflow, and smoke coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 20:40:11 -07:00

44 lines
2.1 KiB
TypeScript

import type { GetServerSideProps } from 'next'
import SystemOperationsPage from '@/components/explorer/SystemOperationsPage'
import { fetchPublicJson } from '@/utils/publicExplorer'
import { loadTokenListResponseForSurface } from '@/services/api/tokenListSurfaces'
import type { CapabilitiesResponse, NetworksConfigResponse, TokenListResponse } from '@/services/api/config'
import type { MissionControlBridgeStatusResponse } from '@/services/api/missionControl'
import type { RouteMatrixResponse } from '@/services/api/routes'
import { normalizeExplorerStats, type ExplorerStats } from '@/services/api/stats'
interface SystemPageProps {
initialBridgeStatus: MissionControlBridgeStatusResponse | null
initialNetworksConfig: NetworksConfigResponse | null
initialTokenList: TokenListResponse | null
initialCapabilities: CapabilitiesResponse | null
initialRouteMatrix: RouteMatrixResponse | null
initialStats: ExplorerStats | null
}
export default function SystemPage(props: SystemPageProps) {
return <SystemOperationsPage {...props} />
}
export const getServerSideProps: GetServerSideProps<SystemPageProps> = async () => {
const [bridgeStatus, networksConfig, tokenList, capabilities, routeMatrix, stats] = await Promise.all([
fetchPublicJson<MissionControlBridgeStatusResponse>('/explorer-api/v1/track1/bridge/status').catch(() => null),
fetchPublicJson<NetworksConfigResponse>('/api/config/networks').catch(() => null),
loadTokenListResponseForSurface('extended', 138).then((value) => value.response).catch(() => null),
fetchPublicJson<CapabilitiesResponse>('/api/config/capabilities').catch(() => null),
fetchPublicJson<RouteMatrixResponse>('/token-aggregation/api/v1/routes/matrix?includeNonLive=true').catch(() => null),
fetchPublicJson('/api/v2/stats').then((value) => normalizeExplorerStats(value as never)).catch(() => null),
])
return {
props: {
initialBridgeStatus: bridgeStatus,
initialNetworksConfig: networksConfig,
initialTokenList: tokenList,
initialCapabilities: capabilities,
initialRouteMatrix: routeMatrix,
initialStats: stats,
},
}
}