推进 INI 面板 control view helper
This commit is contained in:
@@ -22,6 +22,7 @@ For control-page polling, use
|
||||
`window.linuxCncIniPanelApi.getMachineSessionWorkflowStatus()`. It returns a
|
||||
smaller workflow-facing object derived from the same report data.
|
||||
For a single read call, use `window.linuxCncIniPanelApi.getMachineSessionStateBundle()`.
|
||||
For direct rendering, use `window.linuxCncIniPanelApi.getMachineSessionControlView()`.
|
||||
|
||||
## `createIniPanelStateSummary(input)`
|
||||
|
||||
@@ -142,6 +143,24 @@ It is the preferred single-entry helper for control-page polling and other
|
||||
upper-level UI consumers that want one stable read instead of stitching the
|
||||
three views together themselves.
|
||||
|
||||
## `createMachineSessionControlView(bundle)`
|
||||
|
||||
This helper maps a bundle into UI-ready status and sections:
|
||||
|
||||
```js
|
||||
{
|
||||
status: { lastAction: "run-gcode", error: null, runStatus: "ok" },
|
||||
sections: [
|
||||
{ id: "readiness", title: "Readiness", rows: [{ label: "INI", value: "..." }] },
|
||||
{ id: "session", title: "Session", rows: [{ label: "Workflow", value: "..." }] },
|
||||
{ id: "run", title: "Run", rows: [{ label: "Canonical events", value: 2 }] }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
It is a presentation mapping over the bundle only. It does not parse G-code,
|
||||
canonical events, or LinuxCNC-owned runtime content.
|
||||
|
||||
## Boundary Rules
|
||||
|
||||
- Do not parse G-code text in this helper.
|
||||
|
||||
Reference in New Issue
Block a user