| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- // 只读探针:逐面板列出视图对象里所有「说明类」字段,确认哪些进了摘要、哪些被渲染层丢掉。
- import {
- monitoringOverviewPanel,
- monitoringDistributionPanel,
- operationOverviewPanel,
- monitoringPointLedgerPanel,
- } from '../../../../../src/modules/cockpit/domain/monitoringPanels.js'
- import {
- situationSummaryPanel,
- infrastructureSummaryPanel,
- monitoringSummaryPanel,
- alertSettingsPanel,
- } from '../../../../../src/modules/cockpit/domain/overviewPanels.js'
- import {
- archivePanel,
- emergencyPanel,
- managementPanel,
- operationPanel,
- } from '../../../../../src/modules/cockpit/domain/infrastructurePanels.js'
- const NOTE_FIELDS = ['industryNote', 'typeNote', 'eventNote', 'rangeNote', 'gap', 'offlineNote', 'pageNote', 'locateNote', 'note', 'linkNote', 'excludedNote', 'stateText']
- const cases = [
- ['monitoringOverview', () => monitoringOverviewPanel({}, null)],
- ['monitoringDistribution', () => monitoringDistributionPanel({}, null)],
- ['operationOverview', () => operationOverviewPanel({}, null)],
- ['monitoringPointLedger', () => monitoringPointLedgerPanel({}, null)],
- ['situationSummary', () => situationSummaryPanel({}, null)],
- ['infrastructureSummary', () => infrastructureSummaryPanel({}, null)],
- ['monitoringSummary', () => monitoringSummaryPanel({}, null)],
- ['alertSettings', () => alertSettingsPanel({}, null)],
- ['archive', () => archivePanel({}, null)],
- ['emergency', () => emergencyPanel({}, null)],
- ['management', () => managementPanel({}, null)],
- ['operation(infra)', () => operationPanel({}, null)],
- ]
- for (const [id, build] of cases) {
- let view
- try { view = build() } catch (e) { console.log(`${id.padEnd(24)} BUILD-ERROR ${e.message}`); continue }
- const present = NOTE_FIELDS.filter((f) => typeof view?.[f] === 'string' && view[f])
- console.log(`${id.padEnd(24)} ${present.length ? present.join(', ') : '(none)'} [label=${view?.label ?? ''}]`)
- for (const f of present) console.log(` ${f} → ${String(view[f]).slice(0, 70)}…`.replace('…', view[f].length > 70 ? '…' : ''))
- }
|