probe-registry-notes.mjs 879 B

1234567891011121314151617181920
  1. // 只读探针:用真实注册表逐面板收集「视图级说明字段」,验证行为层普查可行且不为空。
  2. import { implementedPanelIds, panelView } from '../../../../../src/modules/cockpit/domain/panelViews.js'
  3. const ids = implementedPanelIds()
  4. console.log(`implemented panels: ${ids.length} → ${ids.join(', ')}`)
  5. const union = new Set()
  6. for (const id of ids) {
  7. let view
  8. try {
  9. view = panelView(id, {}, null, undefined)
  10. } catch (e) {
  11. console.log(` BUILD-ERROR ${id}: ${e.message}`)
  12. continue
  13. }
  14. if (!view) { console.log(` NULL-VIEW ${id}`); continue }
  15. const notes = Object.keys(view).filter((k) => /Note$/.test(k) || k === 'gap' || k === 'note')
  16. notes.forEach((k) => union.add(k))
  17. console.log(` ${id.padEnd(24)} ${notes.join(', ') || '(none)'}`)
  18. }
  19. console.log(`union: ${[...union].sort().join(', ')}`)