web: link artifacts and runs back to their sources
- The run Summary's Pipeline value is a button that opens that pipeline version. - The artifact viewer carries an Open run button (the search viewer passes the artifact's run id), so the evidence always leads back to the run. - Search artifact rows show the image itself as a thumbnail; other artifacts get a type tile (MD/TXT/JSON/CSV/GO/PDF/...), and every artifact row offers an Open run action next to its own navigation.
This commit is contained in:
@@ -722,6 +722,23 @@ function openArtifactViewer(viewable, startIndex, trigger = null) {
|
||||
);
|
||||
|
||||
const actions = h("div", { class: "viewer-actions" });
|
||||
// Where this file came from: a run's evidence is only interpretable next to
|
||||
// the run, so the viewer offers the trip back without closing on a guess.
|
||||
const runId = Number(artifact.run_id ?? state.selectedRunId ?? 0);
|
||||
if (Number.isFinite(runId) && runId > 0) {
|
||||
actions.append(
|
||||
h("button", {
|
||||
class: "viewer-action",
|
||||
type: "button",
|
||||
"data-viewer-focus": "run",
|
||||
text: `Open run ${runId}`,
|
||||
onclick: () => {
|
||||
closeArtifactViewer();
|
||||
selectRun(runId);
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (resolved) {
|
||||
actions.append(
|
||||
h("button", {
|
||||
|
||||
Reference in New Issue
Block a user