@if (error()) { } @if (message()) {

{{ message() }}

} @if (loading() && !status()) {
正在联络同步桥并核对数据水位…
} @else { @if (status(); as sync) {
当前同步状态{{ sync.overallHealthLabel }}{{ sync.message }}
同步桥
{{ sync.bridgeReachable ? '可访问' : '未连通' }}
数据时间点
{{ sync.manifestTime ? (sync.manifestTime | date:'yyyy-MM-dd HH:mm:ss') : '—' }}
异常数据集
{{ outOfSyncCount() }}
失败 / 冲突
{{ sync.totalFailures }} / {{ sync.totalConflicts }}
@if (!sync.configured) {
同步桥尚未配置

需在云函数环境设置 XIAOSHU_LEGACY_SYNC_BASE_URL、XIAOSHU_LEGACY_SYNC_KEY_ID 和 XIAOSHU_LEGACY_SYNC_SECRET。未配置前不会假装数据已实时同步。

}

数据集对账

数量一致仅是第一层验证,每日仍会核对主键集合和字段哈希

状态刷新 {{ sync.refreshedAt | date:'HH:mm:ss' }}
@for (item of sync.datasets; track item.key) { } @empty { }
数据集旧库Parse差异延迟最后成功异常状态操作
{{ item.label }}{{ item.key }}{{ item.legacyCount === null ? '—' : (item.legacyCount | number) }}{{ item.parseCount | number }}{{ item.difference === null ? '—' : (item.difference > 0 ? '+' : '') + item.difference }}{{ item.lagSeconds === null ? '—' : item.lagSeconds < 60 ? item.lagSeconds + ' 秒' : ((item.lagSeconds / 60) | number:'1.0-0') + ' 分钟' }}{{ item.lastSuccessAt ? (item.lastSuccessAt | date:'MM-dd HH:mm:ss') : '从未同步' }}{{ item.pendingFailures }} 失败 · {{ item.conflicts }} 冲突{{ item.healthLabel }}
尚无数据集状态
} }