mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-24 12:05:49 +00:00
fix(actions): show run index in run view and fix summary graph height (#38165)
- Display the per-repository run number as `#N` next to the run title in the run view, matching the runs list and GitHub - Add the run `Index` to the run view API response (and the devtest mock) to support that - Restore the summary panel's `flex: 1` so the workflow graph fills the right-column height even when a run has no job summaries - Keep the job-summary section content-sized so it doesn't compete with the graph for height - Gate the devtest mock job summaries to a subset of runs so the devtest page also exercises the no-summary layout <img width="521" height="232" alt="image" src="https://github.com/user-attachments/assets/a1f2f20b-65bd-4d98-ba6a-b8135580a6de" />
This commit is contained in:
@@ -107,6 +107,7 @@ export function buildJobsByParentJobID(jobs: ActionsJob[]): Map<number, ActionsJ
|
||||
export function createEmptyActionsRun(): ActionsRun {
|
||||
return {
|
||||
repoId: 0,
|
||||
index: 0,
|
||||
link: '',
|
||||
viewLink: '',
|
||||
title: '',
|
||||
|
||||
@@ -141,6 +141,7 @@ onBeforeUnmount(() => {
|
||||
<ActionStatusIcon :locale-status="locale.status[run.status]" :status="run.status" :size="22" icon-variant="circle-fill"/>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<h2 class="action-info-summary-title-text" v-html="run.titleHTML"/>
|
||||
<span class="action-info-summary-title-index">#{{ run.index }}</span>
|
||||
</div>
|
||||
<div class="flex-text-block tw-shrink-0 tw-flex-wrap">
|
||||
<button class="ui basic small compact button primary" @click="approveRun()" v-if="run.canApprove">
|
||||
@@ -377,10 +378,15 @@ onBeforeUnmount(() => {
|
||||
.action-info-summary-title-text {
|
||||
font-size: 20px;
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.action-info-summary-title-index {
|
||||
font-size: 20px;
|
||||
color: var(--color-text-light-2);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.action-info-summary .ui.button {
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
@@ -497,6 +503,7 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
.action-view-right-panel {
|
||||
flex: 1; /* fill the right column so the summary graph stretches even without a job-summary section */
|
||||
border: 1px solid var(--color-console-border);
|
||||
border-radius: var(--border-radius);
|
||||
background: var(--color-console-bg);
|
||||
@@ -538,6 +545,7 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
.job-summary-section {
|
||||
flex: 0 0 auto; /* size to its content; let the summary panel keep the remaining height */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ export type ActionsArtifactStatus = 'expired' | 'completed';
|
||||
|
||||
export type ActionsRun = {
|
||||
repoId: number,
|
||||
index: number,
|
||||
link: string,
|
||||
viewLink: string,
|
||||
title: string,
|
||||
|
||||
Reference in New Issue
Block a user