推进 INI 面板 readonly status API manifest
This commit is contained in:
@@ -21,6 +21,35 @@ export function createMachineSessionReadonlyStatus({
|
||||
};
|
||||
}
|
||||
|
||||
export function createMachineSessionReadonlyStatusApiManifest() {
|
||||
return {
|
||||
apiName: "machine-session-readonly-status",
|
||||
methods: {
|
||||
readStatus: {
|
||||
input: "{ getPanelApi, getControlView }",
|
||||
output: "readonly machine-session status snapshot",
|
||||
},
|
||||
},
|
||||
relatedControlPageMethods: [
|
||||
"loadSessionState",
|
||||
"readStatus",
|
||||
"refresh",
|
||||
"renderView",
|
||||
],
|
||||
statusFields: [
|
||||
"stateBundle",
|
||||
"workflowStatus",
|
||||
"overview",
|
||||
"controlView",
|
||||
"report",
|
||||
"runReadiness",
|
||||
"run",
|
||||
"session",
|
||||
"status",
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function readMachineSessionReadonlyStatus({ getPanelApi, getControlView } = {}) {
|
||||
if (typeof getPanelApi !== "function") {
|
||||
throw new Error("A panel API getter is required.");
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
} from "./control-page-session-workflow.js";
|
||||
import {
|
||||
createMachineSessionReadonlyStatus,
|
||||
createMachineSessionReadonlyStatusApiManifest,
|
||||
readMachineSessionReadonlyStatus,
|
||||
} from "./readonly-status-api.js";
|
||||
export {
|
||||
@@ -33,6 +34,7 @@ export {
|
||||
} from "./control-page-session-workflow.js";
|
||||
export {
|
||||
createMachineSessionReadonlyStatus,
|
||||
createMachineSessionReadonlyStatusApiManifest,
|
||||
readMachineSessionReadonlyStatus,
|
||||
} from "./readonly-status-api.js";
|
||||
export {
|
||||
@@ -70,6 +72,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
controlPage: {
|
||||
createController: createMachineSessionControlPageController,
|
||||
loadSessionState: loadMachineSessionForControlPageWorkflow,
|
||||
readonlyStatusApiManifest: createMachineSessionReadonlyStatusApiManifest(),
|
||||
readStatus: readMachineSessionReadonlyStatus,
|
||||
refresh: refreshMachineSessionControlPage,
|
||||
renderView: renderMachineSessionControlView,
|
||||
|
||||
Reference in New Issue
Block a user