mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-01 02:30:22 +00:00
fix(actions): show retention info on hover for expired artifacts (#38477)
The artifact info hover tooltip (#37100) only worked for live artifacts. Hovering an expired/deleted artifact showed nothing, and even on live artifacts the retention date was missing on real runs. Two root causes: 1. **Expired artifacts had no tooltip.** In the run view sidebar, expired artifacts render in a separate branch that omitted `data-tooltip-content` entirely, so there was nothing to hover. 2. **`ExpiresUnix` was no longer sent.** The `ActionRunAttempt` refactor (#37119) dropped `ExpiresUnix` from `fillViewRunResponseArtifacts`, so real runs always returned `0` and the tooltip fell back to size-only. Only the devtest mock still populated it, which masked the regression. Artifacts without a recorded expiry (`expiresUnix <= 0`) still degrade gracefully to a size-only tooltip. Both states can be previewed on the `/devtest/mock/*` actions run page. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -274,7 +274,12 @@ onBeforeUnmount(() => {
|
||||
<SvgIcon name="octicon-trash"/>
|
||||
</a>
|
||||
</template>
|
||||
<span v-else class="flex-text-block tw-flex-1 tw-min-w-0 tw-text-text-light-2">
|
||||
<span
|
||||
v-else class="flex-text-block tw-flex-1 tw-min-w-0 tw-text-text-light-2"
|
||||
:data-tooltip-content="buildArtifactTooltipHtml(artifact, locale.artifactExpiredAt)"
|
||||
data-tooltip-render="html"
|
||||
data-tooltip-placement="top-end"
|
||||
>
|
||||
<SvgIcon name="octicon-file-removed"/>
|
||||
<span class="tw-flex-1 gt-ellipsis">{{ artifact.name }}</span>
|
||||
<span class="ui label tw-flex-shrink-0">{{ locale.artifactExpired }}</span>
|
||||
|
||||
@@ -71,6 +71,7 @@ function initRepositoryActionsView() {
|
||||
artifactsTitle: el.getAttribute('data-locale-artifacts-title'),
|
||||
artifactExpired: el.getAttribute('data-locale-artifact-expired'),
|
||||
artifactExpiresAt: el.getAttribute('data-locale-artifact-expires-at'),
|
||||
artifactExpiredAt: el.getAttribute('data-locale-artifact-expired-at'),
|
||||
confirmDeleteArtifact: el.getAttribute('data-locale-confirm-delete-artifact'),
|
||||
showTimeStamps: el.getAttribute('data-locale-show-timestamps'),
|
||||
showLogSeconds: el.getAttribute('data-locale-show-log-seconds'),
|
||||
|
||||
Reference in New Issue
Block a user