推进 INI 面板 session load summary helper
This commit is contained in:
22
wasm-port/runtime/ui/ini-panel/session-load-summary.js
Normal file
22
wasm-port/runtime/ui/ini-panel/session-load-summary.js
Normal file
@@ -0,0 +1,22 @@
|
||||
export function createMachineSessionLoadSummary(session) {
|
||||
return {
|
||||
iniOpfsPath: session?.ini?.opfsPath ?? null,
|
||||
iniWasmPath: session?.ini?.wasmPath ?? null,
|
||||
parameterOpfsPath: session?.parameters?.opfsPath ?? null,
|
||||
parameterWasmPath: session?.parameters?.wasmPath ?? null,
|
||||
parameterResult: session?.parameters?.result ?? "",
|
||||
toolTableOpfsPath: session?.toolTable?.opfsPath ?? null,
|
||||
toolTableWasmPath: session?.toolTable?.wasmPath ?? null,
|
||||
toolTableResult: session?.toolTable?.result ?? "",
|
||||
};
|
||||
}
|
||||
|
||||
export function machineSessionLoadLogLines(summary) {
|
||||
return [
|
||||
`INI: ${summary.iniOpfsPath ?? "-"} -> ${summary.iniWasmPath ?? "-"}`,
|
||||
`Parameter file: ${summary.parameterOpfsPath ?? "-"} -> ${summary.parameterWasmPath ?? "-"}`,
|
||||
`Parameters: ${summary.parameterResult.trim()}`,
|
||||
`Tool table file: ${summary.toolTableOpfsPath ?? "-"} -> ${summary.toolTableWasmPath ?? "-"}`,
|
||||
`Tool table: ${summary.toolTableResult.trim()}`,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user