接入 INI 面板浏览器状态 report getter
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
} from "./session-workflow.js";
|
||||
import {
|
||||
createMachineSessionStateSnapshot,
|
||||
createMachineSessionStateReport,
|
||||
} from "./panel-state-summary.js";
|
||||
|
||||
const SAMPLE_PATH =
|
||||
@@ -151,6 +152,10 @@ let canonicalEventText = "";
|
||||
let runPlaybackTimer = null;
|
||||
let panelMachineSessionState = createMachineSessionStateSnapshot();
|
||||
|
||||
function getMachineSessionStateReport() {
|
||||
return createMachineSessionStateReport(window.linuxCncIniPanelMachineSessionState);
|
||||
}
|
||||
|
||||
function updatePanelMachineSessionState(patch = {}) {
|
||||
panelMachineSessionState = createMachineSessionStateSnapshot({
|
||||
...panelMachineSessionState,
|
||||
@@ -164,6 +169,9 @@ function updatePanelMachineSessionState(patch = {}) {
|
||||
return panelMachineSessionState;
|
||||
}
|
||||
|
||||
window.getMachineSessionStateReport = getMachineSessionStateReport;
|
||||
window.linuxCncIniPanelMachineSessionState = panelMachineSessionState;
|
||||
|
||||
function setBadge(node, text, className = "badge") {
|
||||
node.className = className;
|
||||
node.textContent = text;
|
||||
|
||||
Reference in New Issue
Block a user