源产品资产
总体状态
{renderBadge(
assetInventoryHealthy,
assetInventory ? `${toNumber(sourceAssets.total_count)} 项` : '未知'
)}
LT-1 / Sentinel-1
{toNumber(sourceAssets.lt1_count)} / {toNumber(sourceAssets.s1_count)}
解析异常
{toNumber(sourceAssets.parse_failed_count)}
源数据根
{toNumber(assetSourceRoots.accessible_count)} / {toNumber(assetSourceRoots.configured_count)}
需复扫
{toNumber(assetSourceRoots.needs_rescan_count)}
{toNumber(sourceAssets.parse_failed_count) > 0 ? (
存在源产品解析异常,请在“数据资产”中查看开放问题并复扫相关目录。
) : (
源产品资产已按 XML/元数据登记。
)}
精轨资产状态
总体状态
{renderBadge(
orbitAssetRiskCount === 0 && assetInventoryHealthy,
orbitAssetRiskCount > 0 ? `${orbitAssetRiskCount} 个风险项` : `${toNumber(orbitAssets.total_count)} 项`
)}
LT-1 / Sentinel-1
{toNumber(orbitAssets.lt1_count)} / {toNumber(orbitAssets.s1_count)}
解析异常
{toNumber(orbitAssets.parse_failed_count)}
精轨根
{toNumber(assetOrbitRoots.accessible_count)} / {toNumber(assetOrbitRoots.configured_count)}
需复扫
{toNumber(assetOrbitRoots.needs_rescan_count)}
精轨可用性以资产登记和时间窗绑定结果为准,不再以 ISCE2 XML 池作为生产判断。
场景精轨绑定
已绑定场景
{toNumber(orbitBindings.matched_count)} / {toNumber(orbitBindings.scene_count)}
缺失精轨
{toNumber(orbitBindings.missing_count)}
候选歧义
{toNumber(orbitBindings.ambiguous_count)}
开放问题
{toNumber(assetIssues.open_count)}
错误 / 警告
{toNumber(assetIssues.error_count)} / {toNumber(assetIssues.warning_count)}
{orbitAssetRiskCount > 0 ? (
请在“数据资产”中复核缺失或歧义精轨;生产配对会优先使用已选定的精轨资产。
) : (
当前开放问题未显示精轨绑定风险。
)}
{en ? 'Consistency Check' : '一致性检测'}
{en ? 'Total Issues' : '异常总数'}
{renderBadge(
!consistencySummary || consistencySummary.total === 0,
consistencySummary ? `${consistencySummary.total} ${en ? 'items' : '项'}` : (en ? 'Unknown' : '未知')
)}
{consistencySummary && (
<>
{en ? 'Critical' : '严重异常'}
{consistencySummary.critical}
{en ? 'Warning' : '一般异常'}
{consistencySummary.warning}
{consistencySummary.issues
.filter((item) => item.count > 0)
.map((item) => (
{item.label}:{item.count} 条
))}
{consistencySummary.issues.find(i => i.key === 'water_unregistered' && i.count > 0) && (
{
setSyncLoading(true);
setSyncResult(null);
try {
const res = await syncWaterScenesFromDisk();
setSyncResult(en
? `Sync done: inserted ${res.data.inserted}, skipped ${res.data.skipped_already_done}`
: `补录完成:新增 ${res.data.inserted} 条,已跳过 ${res.data.skipped_already_done} 条`);
await fetchStatus({ force: true });
} catch (e) {
setSyncResult(en
? `Sync failed: ${e.response?.data?.detail || e.message}`
: `补录失败:${e.response?.data?.detail || e.message}`);
} finally {
setSyncLoading(false);
}
}}
disabled={syncLoading}
style={{ padding: '4px 12px', background: '#1890ff', color: '#fff', border: 'none', borderRadius: 4, cursor: 'pointer', fontSize: 12 }}
>
{syncLoading ? (en ? 'Syncing...' : '补录中...') : (en ? 'Auto Sync' : '一键补录')}
{syncResult &&
{syncResult}
}
)}
{consistencySummary.total === 0 && (
{en ? 'No consistency issues found.' : '未发现一致性异常。'}
)}
>
)}
{consistencyError && (
{en ? 'Failed to fetch consistency stats: ' : '一致性统计获取失败:'}{consistencyError}
)}
旧精轨池核对
{
event.preventDefault();
event.stopPropagation();
void refreshOrbitStatus();
}}
disabled={orbitSyncing}
className="health-inline-button"
>
{orbitStatus ? '重新核对' : '加载诊断'}
该诊断仅核对源精轨目录与 ENVI/Gamma 生产 TXT 池,用于排查历史目录;生产判断以资产登记与场景绑定为准。
{orbitStatus ? (
<>
{en ? 'Precise Orbit Management' : '文件池状态'}
{en ? 'Overall' : '总体状态'}
{renderBadge(
orbitOverallHealthy,
orbitStatus
? (en ? `${orbitMismatchCount} mismatches` : `${orbitMismatchCount} 项不一致`)
: (en ? 'Unknown' : '未知')
)}
{en ? 'Source / production TXT' : '源目录 / 生产 TXT'}
{`${toNumber(orbitSource.total_source)} / ${toNumber(orbitPools.envi?.total)}`}
{en ? 'DB expected / missing path' : '数据库期望 / 路径缺失'}
{toNumber(orbitDatabase.db_expected_stem_count)} / {orbitDbMissingPathCount}
{en ? 'Pool mismatches' : '池不一致'}
{orbitMismatchCount}
{en ? 'Source-only' : '仅源存在'}
{orbitSourceWithoutEnviCount}
{en ? 'Production TXT only' : '仅生产 TXT 存在'}
{orbitEnviWithoutSourceCount}
{en ? 'DB missing in production TXT' : '数据库在生产 TXT 缺失'}
{orbitDbMissingEnviCount}
{en ? 'Duplicate stems / scan errors' : '重复 stem / 扫描异常'}
{orbitDuplicateCount} / {orbitScanErrorCount}
{en
? 'LT-1 orbit scans synchronize the production TXT pool for ENVI/SARscape and Gamma. S1 EOF files remain registered as source orbit assets.'
: 'LT-1 精轨扫描会同步 ENVI/SARscape 与 Gamma 共用的生产 TXT 池;S1 EOF 只登记为源精轨资产。'}
{en ? 'Source path: ' : '源目录路径:'}{formatPathText(orbitSource.path)}
{en ? 'Production TXT pool: ' : '生产 TXT 池:'}{formatPathText(orbitPools.envi?.path)}
{orbitDuplicateCount > 0 && (
{en
? `Duplicate stems detected during scan: ${orbitDuplicateCount}`
: `扫描时发现重复 stem:${orbitDuplicateCount}`}
)}
{orbitDbFlagIssueCount > 0 && (
{en
? `DB flag/path anomalies: has_orbit=true but path missing ${toNumber(orbitDatabase.has_orbit_but_missing_path_count)}, has_orbit=false but path present ${toNumber(orbitDatabase.without_orbit_but_path_present_count)}`
: `数据库标记异常:has_orbit_data=true 但路径缺失 ${toNumber(orbitDatabase.has_orbit_but_missing_path_count)} 条,has_orbit_data=false 但路径存在 ${toNumber(orbitDatabase.without_orbit_but_path_present_count)} 条`}
)}
{orbitDbMissingPathCount > 0 && (
{en
? `DB orbit_file_path missing on disk: ${orbitDbMissingPathCount} / ${toNumber(orbitDatabase.distinct_orbit_path_count)}`
: `数据库 orbit_file_path 指向不存在文件:${orbitDbMissingPathCount} / ${toNumber(orbitDatabase.distinct_orbit_path_count)}`}
)}
{orbitBadSourceSampleCount > 0 && (
{en
? `Sampled source TXT with corruption signals: ${orbitBadSourceSampleCount}`
: `抽样检测到损坏信号的源 TXT:${orbitBadSourceSampleCount}`}
)}
{orbitDatabase.sample_missing_in_envi?.length > 0 && (
{en ? 'DB expected but ENVI pool missing: ' : '数据库期望但 ENVI 池缺失:'}
{orbitDatabase.sample_missing_in_envi.slice(0, 5).join(', ')}
)}
{orbitBadSourceSamples.slice(0, 5).map((item) => (
{item.name} - {item.error || (en ? 'Corruption signal detected' : '检测到损坏信号')}
{renderOrbitSourceIssueDetails(item, en, formatPathText)}
))}
{(orbitConsistency.mismatches || []).slice(0, 5).map((item) => (
{item.name} - {item.issue}
{item.envi_path && (
{en ? 'ENVI: ' : 'ENVI:'}{formatPathText(item.envi_path)}
)}
))}
{orbitConsistency.mismatch_count > 5 && (
{en
? `...and ${orbitConsistency.mismatch_count - 5} more mismatches`
: `...还有 ${orbitConsistency.mismatch_count - 5} 项不一致`}
)}
{(orbitDatabase.path_errors || []).slice(0, 3).map((item, index) => (
{item}
))}
{(orbitSource.errors || []).slice(0, 3).map((item, index) => (
{en ? 'Source scan error: ' : '源目录扫描异常:'}{item}
))}
{(orbitPools.envi?.errors || []).slice(0, 3).map((item, index) => (
{en ? 'ENVI pool scan error: ' : 'ENVI 池扫描异常:'}{item}
))}
{
setOrbitSyncing(true);
setOrbitSyncResult(null);
try {
const result = await syncOrbitPools();
setOrbitSyncResult(result);
await refreshOrbitStatus();
} catch (e) {
setOrbitSyncResult({ error: e.response?.data?.detail || e.message });
} finally {
setOrbitSyncing(false);
}
}}
disabled={orbitSyncing}
style={{ padding: '4px 12px', background: '#1890ff', color: '#fff', border: 'none', borderRadius: 4, cursor: 'pointer', fontSize: 12 }}
>
{orbitSyncing ? (en ? 'Checking...' : '检查中...') : (en ? 'Check Consistency' : '精轨一致性检查')}
{orbitSyncResult && (
{orbitSyncResult.error ? (
{orbitSyncResult.error}
) : (
<>
{orbitSyncResult.healthy
? (en ? 'Pools are consistent.' : '本地池一致。')
: (en ? `Detected ${toNumber(orbitSyncResult.mismatch_count)} mismatches.` : `检测到 ${toNumber(orbitSyncResult.mismatch_count)} 项不一致。`)}
{en
? `TXT ${toNumber(orbitSyncResult.envi?.total)}, scan errors ${toNumber(orbitSyncResult.error_count)}`
: `TXT ${toNumber(orbitSyncResult.envi?.total)} 项,扫描异常 ${toNumber(orbitSyncResult.error_count)} 项`}
{(orbitSyncResult.mismatches || []).slice(0, 5).map((item, index) => (
{item.name} - {item.issue}
{item.envi_path && (
{en ? 'ENVI: ' : 'ENVI:'}{formatPathText(item.envi_path)}
)}
))}
{(orbitSyncResult.errors || []).slice(0, 3).map((item, index) => (
{item}
))}
>
)}
)}
>
) : (
展开后点击“加载诊断”获取旧精轨池状态。
)}