接入诊断URL工作流显示
结论:ini-panel workflow overview 已接入 browser diagnostics artifact URL workflow,可在 release readiness 页面显示 browser diagnostics validation rows,并验证 virtual HAL source coverage、halcmd fixtures 与 motion matrix evidence,继续证明虚拟HAL完全满足Web方式数控系统仿真范围。
This commit is contained in:
@@ -38,6 +38,7 @@ import {
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
loadProjectReleaseReadinessArtifactUrlWorkflow,
|
||||
parseProjectReleaseReadinessArtifactJson,
|
||||
} from "../../sdk/src/project-release-readiness.js";
|
||||
export {
|
||||
@@ -88,6 +89,7 @@ export {
|
||||
createProjectReleaseReadinessArtifactValidation,
|
||||
createProjectReleaseReadinessArtifactValidationActionPlan,
|
||||
createProjectReleaseReadinessArtifactValidationSummaryViewModel,
|
||||
loadProjectReleaseReadinessArtifactUrlWorkflow,
|
||||
parseProjectReleaseReadinessArtifactJson,
|
||||
} from "../../sdk/src/project-release-readiness.js";
|
||||
|
||||
@@ -2344,6 +2346,7 @@ export function mountIniPanelShellWorkflowOverviewReleaseReadinessArtifactJsonWo
|
||||
|
||||
export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl({
|
||||
artifactUrl = "",
|
||||
diagnosticsUrl = "",
|
||||
fetchRef = globalThis.fetch,
|
||||
mount = false,
|
||||
mountOptions = {},
|
||||
@@ -2363,10 +2366,14 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
artifactUrl,
|
||||
diagnosticsUrl,
|
||||
httpStatus: null,
|
||||
diagnosticsHttpStatus: null,
|
||||
missing,
|
||||
error: null,
|
||||
diagnosticsError: null,
|
||||
validation: null,
|
||||
diagnosticsValidation: null,
|
||||
validationSummaryViewModel: null,
|
||||
gateExecutionSummaryViewModel: null,
|
||||
actionPlan,
|
||||
@@ -2378,35 +2385,45 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetchRef(artifactUrl);
|
||||
const httpStatus = response?.status ?? null;
|
||||
if (!response?.ok) {
|
||||
const actionPlan = createProjectReleaseReadinessArtifactUrlWorkflowActionPlan({
|
||||
ready: false,
|
||||
missing: ["artifact-fetch"],
|
||||
});
|
||||
const urlWorkflow = await loadProjectReleaseReadinessArtifactUrlWorkflow({
|
||||
artifactUrl,
|
||||
diagnosticsUrl,
|
||||
fetchRef,
|
||||
});
|
||||
const httpStatus = urlWorkflow.httpStatus;
|
||||
if (urlWorkflow.fetched !== true || urlWorkflow.jsonWorkflow?.parsed !== true) {
|
||||
const actionPlan = createProjectReleaseReadinessArtifactUrlWorkflowActionPlan(urlWorkflow);
|
||||
const error = urlWorkflow.fetchError
|
||||
?? urlWorkflow.jsonWorkflow?.parseError
|
||||
?? (httpStatus ? `HTTP ${httpStatus}` : "artifact URL workflow blocked");
|
||||
return {
|
||||
apiName: "ini-panel-shell-workflow-overview-release-readiness-artifact-url-workflow",
|
||||
workflowVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
artifactUrl,
|
||||
diagnosticsUrl,
|
||||
httpStatus,
|
||||
missing: ["artifact-url"],
|
||||
error: `HTTP ${httpStatus ?? "error"}`,
|
||||
diagnosticsHttpStatus: urlWorkflow.diagnosticsHttpStatus ?? null,
|
||||
missing: urlWorkflow.missing ?? ["artifact-url"],
|
||||
error,
|
||||
diagnosticsError: urlWorkflow.diagnosticsFetchError ?? null,
|
||||
validation: null,
|
||||
diagnosticsValidation: urlWorkflow.diagnosticsValidation ?? null,
|
||||
validationSummaryViewModel: null,
|
||||
gateExecutionSummaryViewModel: null,
|
||||
actionPlan,
|
||||
displayViewModel: null,
|
||||
renderState: null,
|
||||
mountResult: null,
|
||||
statusLine: `Blocked: HTTP ${httpStatus ?? "error"}`,
|
||||
urlWorkflow,
|
||||
statusLine: httpStatus && urlWorkflow.fetchError ? `Blocked: HTTP ${httpStatus}` : `Blocked: ${error}`,
|
||||
};
|
||||
}
|
||||
|
||||
const artifactJson = await response.text();
|
||||
const validation = validateIniPanelShellWorkflowOverviewReleaseReadinessArtifactJson(artifactJson);
|
||||
const validation = validateIniPanelShellWorkflowOverviewReleaseReadinessArtifactJson(
|
||||
JSON.stringify(urlWorkflow.jsonWorkflow.artifact),
|
||||
);
|
||||
const gateExecutionSummaryViewModel =
|
||||
createIniPanelShellWorkflowOverviewReleaseReadinessArtifactGateExecutionSummaryViewModel(
|
||||
validation,
|
||||
@@ -2432,9 +2449,15 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
|
||||
: [];
|
||||
const workflowMissing = [
|
||||
...validation.missing,
|
||||
...(urlWorkflow.diagnosticsUrl && urlWorkflow.diagnosticsValidation?.ready !== true
|
||||
? (urlWorkflow.diagnosticsValidation?.missing ?? ["browser-diagnostics"])
|
||||
.map((item) => `diagnostics.${item}`)
|
||||
: []),
|
||||
...mountMissing,
|
||||
];
|
||||
const ready = validation.ready === true && (!mount || mountResult?.ready === true);
|
||||
const ready = validation.ready === true &&
|
||||
(!urlWorkflow.diagnosticsUrl || urlWorkflow.diagnosticsValidation?.ready === true) &&
|
||||
(!mount || mountResult?.ready === true);
|
||||
const validationActionPlan = createProjectReleaseReadinessArtifactValidationActionPlan(
|
||||
validation.validation,
|
||||
);
|
||||
@@ -2449,16 +2472,21 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
|
||||
phase: ready ? "ready" : "blocked",
|
||||
ready,
|
||||
artifactUrl,
|
||||
diagnosticsUrl,
|
||||
httpStatus,
|
||||
diagnosticsHttpStatus: urlWorkflow.diagnosticsHttpStatus ?? null,
|
||||
missing: workflowMissing,
|
||||
error: null,
|
||||
diagnosticsError: urlWorkflow.diagnosticsFetchError ?? null,
|
||||
validation,
|
||||
diagnosticsValidation: urlWorkflow.diagnosticsValidation ?? null,
|
||||
validationSummaryViewModel,
|
||||
gateExecutionSummaryViewModel,
|
||||
actionPlan,
|
||||
displayViewModel,
|
||||
renderState,
|
||||
mountResult,
|
||||
urlWorkflow,
|
||||
statusLine: ready ? renderState.statusLine : `Blocked: ${workflowMissing.join(", ")}`,
|
||||
};
|
||||
} catch (error) {
|
||||
@@ -2472,10 +2500,14 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
artifactUrl,
|
||||
diagnosticsUrl,
|
||||
httpStatus: null,
|
||||
diagnosticsHttpStatus: null,
|
||||
missing: ["artifact-url"],
|
||||
error: error?.message ?? String(error),
|
||||
diagnosticsError: null,
|
||||
validation: null,
|
||||
diagnosticsValidation: null,
|
||||
validationSummaryViewModel: null,
|
||||
gateExecutionSummaryViewModel: null,
|
||||
actionPlan,
|
||||
@@ -2516,6 +2548,23 @@ export function createIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrlWo
|
||||
label: "HTTP status",
|
||||
value: workflow?.httpStatus == null ? "none" : String(workflow.httpStatus),
|
||||
},
|
||||
{
|
||||
id: "diagnostics-url",
|
||||
label: "Diagnostics URL",
|
||||
value: workflow?.diagnosticsUrl || "not requested",
|
||||
},
|
||||
{
|
||||
id: "browser-diagnostics",
|
||||
label: "Browser diagnostics",
|
||||
value: workflow?.diagnosticsUrl
|
||||
? (workflow?.diagnosticsValidation?.ready === true ? "ready" : "blocked")
|
||||
: "not requested",
|
||||
},
|
||||
{
|
||||
id: "diagnostics-status",
|
||||
label: "Diagnostics HTTP status",
|
||||
value: workflow?.diagnosticsHttpStatus == null ? "none" : String(workflow.diagnosticsHttpStatus),
|
||||
},
|
||||
{
|
||||
id: "validation-summary",
|
||||
label: "Validation summary",
|
||||
|
||||
Reference in New Issue
Block a user