-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add back navigation link to action run view #36721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -40,9 +40,10 @@ async function deleteArtifact(name: string) { | |||||
| <!-- make the view container full width to make users easier to read logs --> | ||||||
| <div class="ui fluid container"> | ||||||
| <div class="action-view-header"> | ||||||
| <a class="action-view-back" :href="run.workflowLink"><SvgIcon name="octicon-arrow-left"/> {{ run.workflowID.replace(/\.(yml|yaml)$/i, '') }}</a> | ||||||
| <div class="action-info-summary"> | ||||||
| <div class="action-info-summary-title"> | ||||||
| <ActionRunStatus :locale-status="locale.status[run.status]" :status="run.status" :size="20"/> | ||||||
| <ActionRunStatus :locale-status="locale.status[run.status]" :status="run.status" :size="22"/> | ||||||
| <!-- eslint-disable-next-line vue/no-v-html --> | ||||||
| <h2 class="action-info-summary-title-text" v-html="run.titleHTML"/> | ||||||
| </div> | ||||||
|
|
@@ -74,7 +75,7 @@ async function deleteArtifact(name: string) { | |||||
| </div> | ||||||
| </div> | ||||||
| <div class="action-commit-summary"> | ||||||
| <span><a class="muted" :href="run.workflowLink"><b>{{ run.workflowID }}</b></a>:</span> | ||||||
| <span><a class="muted" :href="`${run.link}/workflow`"><b>{{ run.workflowID }}</b></a>:</span> | ||||||
|
||||||
| <span><a class="muted" :href="`${run.link}/workflow`"><b>{{ run.workflowID }}</b></a>:</span> | |
| <span><a class="muted" :href="run.link ? `${run.link}/workflow` : undefined"><b>{{ run.workflowID }}</b></a>:</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new back link is rendered unconditionally, but
run.workflowLink/run.workflowIDare initialized as empty strings. UntilloadJob()finishes, this produces a clickable<a>with an emptyhrefand no text (only the icon), which can cause an accidental reload/navigation. Consider guarding the link withv-if(e.g. only render whenrun.workflowLinkandrun.workflowIDare set) or otherwise disabling it until data is loaded.