web: right-align list miniatures and color pinned run graphs
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import { h } from "../dom.js";
|
||||
import { statusIcon } from "../statusIcon.js";
|
||||
import { renderMiniGraph, createMiniGraphCache } from "../miniGraph.js";
|
||||
import {
|
||||
RUN_STATES,
|
||||
RUN_TIME_RANGES,
|
||||
@@ -31,6 +32,9 @@ export function createRunsView(rt) {
|
||||
const renderContent = (...args) => rt.renderContent(...args);
|
||||
const selectRun = (...args) => rt.selectRun(...args);
|
||||
const renderAttentionBell = () => rt.renderAttentionBell();
|
||||
const miniGraphFor = createMiniGraphCache((id, version) => rt.repo.getPipeline(id, version), () => {
|
||||
if (state.view === "runs") renderContent();
|
||||
});
|
||||
|
||||
|
||||
function renderRunList(now = Date.now()) {
|
||||
@@ -160,6 +164,10 @@ function renderRunRow(run, now) {
|
||||
}),
|
||||
);
|
||||
}
|
||||
const evidence = state.runDetail?.id === run.id ? state.runDetail : run;
|
||||
const graph = miniGraphFor(evidence, state.pipelines, state.url);
|
||||
const mini = renderMiniGraph(graph, evidence);
|
||||
if (mini) row.append(mini);
|
||||
return row;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user