Skip to content

Commit

Permalink
Merge pull request #17626 from martenson/wflist-linktoinvo-240
Browse files Browse the repository at this point in the history
[24.0] do not link to invocations for workflow that has never run
  • Loading branch information
dannon authored Mar 7, 2024
2 parents 83dc003 + 8d95f36 commit 7142df1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
faExchangeAlt,
faFileArchive,
faFileExport,
faList,
faLock,
faPlay,
faPlus,
faShareAlt,
faSitemap,
faStream,
faTrash,
faUserLock,
Expand Down Expand Up @@ -50,7 +50,7 @@ library.add(
faPlay,
faPlus,
faShareAlt,
faSitemap,
faList,
faStream,
faTrash,
faUserLock
Expand Down Expand Up @@ -204,7 +204,7 @@ function userTitle(title: string) {
:disabled="isAnonymous"
:title="userTitle('Display Workflow Invocations')"
@click="$router.push(`/histories/${history.id}/invocations`)">
<FontAwesomeIcon fixed-width :icon="faSitemap" class="fa-rotate-270 mr-1" />
<FontAwesomeIcon fixed-width :icon="faList" class="mr-1" />
<span v-localize>Show Invocations</span>
</BDropdownItem>

Expand Down
17 changes: 9 additions & 8 deletions client/src/components/Workflow/WorkflowInvocationsCount.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { library } from "@fortawesome/fontawesome-svg-core";
import { faClock, faSitemap } from "@fortawesome/free-solid-svg-icons";
import { faList } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { onMounted, ref } from "vue";
import { invocationCountsFetcher } from "@/api/workflows";
import localize from "@/utils/localization";
library.add(faClock, faSitemap);
library.add(faList);
interface Props {
workflow: any;
Expand All @@ -33,22 +33,23 @@ onMounted(initCounts);

<template>
<div class="workflow-invocations-count d-flex align-items-center flex-gapx-1">
<BBadge v-if="count != undefined && count === 0" pill class="list-view">
<span>never run</span>
</BBadge>
<BBadge
v-if="count != undefined"
v-else-if="count != undefined && count > 0"
v-b-tooltip.hover.noninteractive
pill
:title="localize('View workflow invocations')"
class="outline-badge cursor-pointer list-view"
:to="`/workflows/${props.workflow.id}/invocations`">
<FontAwesomeIcon :icon="faSitemap" fixed-width />
<FontAwesomeIcon :icon="faList" fixed-width />

<span v-if="count > 0">
<span>
workflow runs:
{{ count }}
</span>
<span v-else> workflow never run </span>
</BBadge>

<BButton
v-else
v-b-tooltip.hover.noninteractive
Expand All @@ -57,7 +58,7 @@ onMounted(initCounts);
variant="link"
size="sm"
:to="`/workflows/${props.workflow.id}/invocations`">
<FontAwesomeIcon :icon="faSitemap" fixed-width />
<FontAwesomeIcon :icon="faList" fixed-width />
</BButton>
</div>
</template>

0 comments on commit 7142df1

Please sign in to comment.