新增 release artifact URL workflow summary view model

This commit is contained in:
2026-06-16 11:44:11 +08:00
parent 4970d156c1
commit e00c7b038b
18 changed files with 225 additions and 6 deletions

View File

@@ -197,6 +197,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
"getWorkflowOverviewReadiness",
"mountWorkflowOverviewEmbedding",
"loadWorkflowOverviewReleaseReadinessArtifactUrl",
"getWorkflowOverviewReleaseReadinessArtifactUrlWorkflowSummaryViewModel",
"getWorkflowOverviewReleaseReadinessArtifactValidationSummaryViewModel",
"getWorkflowOverviewEmbeddingReport",
"getWorkflowOverviewEmbeddingDisplayViewModel",
@@ -1879,6 +1880,7 @@ export function createIniPanelShellWorkflowOverviewContract() {
"getWorkflowOverviewPersistenceSummary",
"validateWorkflowOverviewReleaseReadinessArtifactJson",
"loadWorkflowOverviewReleaseReadinessArtifactUrl",
"getWorkflowOverviewReleaseReadinessArtifactUrlWorkflowSummaryViewModel",
"getWorkflowOverviewReleaseReadinessArtifactValidationSummaryViewModel",
"getWorkflowOverviewReleaseReadinessArtifactDisplayViewModel",
"getWorkflowOverviewReleaseReadinessArtifactRenderState",
@@ -2048,6 +2050,61 @@ export async function loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactU
}
}
export function createIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrlWorkflowSummaryViewModel(
workflow = {},
) {
const missing = Array.isArray(workflow?.missing) ? workflow.missing : [];
const ready = workflow?.ready === true;
const statusText = ready ? "Ready" : "Blocked";
const detailText = ready
? "Artifact URL workflow complete"
: (missing.length > 0 ? missing.join(", ") : workflow?.error ?? "artifact URL workflow blocked");
return {
apiName: "ini-panel-shell-workflow-overview-release-readiness-artifact-url-workflow-summary-view-model",
viewModelVersion: 1,
phase: ready ? "ready" : "blocked",
ready,
title: "Release artifact URL workflow",
statusText,
detailText,
statusLine: `${statusText}: ${detailText}`,
rows: [
{
id: "artifact-url",
label: "Artifact URL",
value: workflow?.artifactUrl || "missing",
},
{
id: "http-status",
label: "HTTP status",
value: workflow?.httpStatus == null ? "none" : String(workflow.httpStatus),
},
{
id: "validation-summary",
label: "Validation summary",
value: workflow?.validationSummaryViewModel?.statusLine ?? "missing",
},
{
id: "render-state",
label: "Render state",
value: workflow?.renderState?.statusLine ?? "missing",
},
{
id: "mount-result",
label: "Mount result",
value: workflow?.mountResult
? (workflow.mountResult.ready ? "ready" : workflow.mountResult.statusLine)
: "not requested",
},
{
id: "missing",
label: "Missing workflow evidence",
value: missing.length > 0 ? missing.join(", ") : "none",
},
],
};
}
export function createIniPanelShellWorkflowOverviewReleaseReadinessArtifactDisplayViewModel(
validation = validateIniPanelShellWorkflowOverviewReleaseReadinessArtifactJson("{}"),
) {
@@ -3292,6 +3349,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
createWorkflowOverviewReadiness: createIniPanelShellWorkflowOverviewReadiness,
createWorkflowOverviewReleaseReadinessArtifactValidationSummaryViewModel:
createIniPanelShellWorkflowOverviewReleaseReadinessArtifactValidationSummaryViewModel,
createWorkflowOverviewReleaseReadinessArtifactUrlWorkflowSummaryViewModel:
createIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrlWorkflowSummaryViewModel,
loadWorkflowOverviewReleaseReadinessArtifactUrl:
loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl,
mountWorkflowOverviewEmbedding: mountIniPanelShellWorkflowOverviewEmbedding,