Skip to content

Commit

Permalink
fix(ui): amend flow concurrency overview
Browse files Browse the repository at this point in the history
closes #6811
  • Loading branch information
yuri1969 authored Jan 23, 2025
1 parent 8e5ffe8 commit 0a047a7
Showing 1 changed file with 48 additions and 34 deletions.
82 changes: 48 additions & 34 deletions ui/src/components/flows/FlowConcurrency.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
<template>
<div v-if="flow.concurrency && !runningCountSet" :class="{'d-none': !runningCountSet}">
<el-card class="mb-1">
<div class="row mb-3">
<span class="col d-flex align-items-center">
<h5 class="m-3">RUNNING</h5> {{ runningCount }} / {{ flow.concurrency.limit }} {{ $t('active-slots') }}
</span>
<span class="col d-flex justify-content-end align-items-center">
{{ $t('behavior') }}: <status class="mx-2" :status="flow.concurrency.behavior" />
</span>
</div>
<div class="progressbar mb-3">
<el-progress :stroke-width="40" color="#5BB8FF" :percentage="progress" :show-text="false" />
</div>
</el-card>
<el-card>
<executions
:restore-url="false"
:topbar="false"
:namespace="flow.namespace"
:flow-id="flow.id"
is-concurrency
:statuses="[State.QUEUED, State.RUNNING, State.PAUSED]"
@state-count="setRunningCount"
:filter="false"
/>
</el-card>
</div>
<empty-state
v-else-if="runningCount === 0"
:title="$t('concurrency-view.title_no_executions')"
:description="$t('concurrency-view.desc_no_executions')"
:image="noConcurrencyImage"
/>
<template v-if="flow.concurrency">
<div v-if="runningCount > 0 || !runningCountSet" :class="{'d-none': !runningCountSet}">
<el-card class="mb-3">
<div class="row mb-3">
<span class="col d-flex align-items-center">
<h5 class="m-3">RUNNING</h5> {{ runningCount }}/{{ flow.concurrency.limit }} {{ $t('active-slots') }}
</span>
<span class="col d-flex justify-content-end align-items-center">
{{ $t('behavior') }}: <status class="mx-2" :status="flow.concurrency.behavior" size="small" />
</span>
</div>
<div class="progressbar mb-3">
<el-progress :stroke-width="16" color="#5BB8FF" :percentage="progress" :show-text="false" />
</div>
</el-card>
<el-card>
<executions
:restore-url="false"
:topbar="false"
:namespace="flow.namespace"
:flow-id="flow.id"
is-concurrency
:statuses="[State.QUEUED, State.RUNNING, State.PAUSED]"
@state-count="setRunningCount"
:filter="false"
/>
</el-card>
</div>
<empty-state
v-else
:title="$t('concurrency-view.title_no_executions')"
:description="$t('concurrency-view.desc_no_executions')"
:image="noConcurrencyImage"
/>
</template>
<empty-state
v-else
:title="$t('concurrency-view.title_no_limit')"
Expand All @@ -49,11 +51,13 @@
import noConcurrencyImage from "../../assets/no_concurrency.svg";
export default {
inheritAttrs: false,
components: {
Status,
Status,
Executions,
EmptyState
},
emits: ["expand-subflow"],
data() {
return {
runningCount: 0,
Expand Down Expand Up @@ -87,4 +91,14 @@
height: 100%;
width: 100%;
}
h5 {
font-weight: bold;
margin-left: 0 !important;
}
:deep(.el-progress) {
.el-progress-bar, .el-progress-bar__outer, .el-progress-bar__inner {
border-radius: var(--bs-border-radius);
}
}
</style>

0 comments on commit 0a047a7

Please sign in to comment.