Skip to content

Commit

Permalink
chore(ui): add empty view on flow concurrency page (#6640)
Browse files Browse the repository at this point in the history
Co-authored-by: Miloš Paunović <[email protected]>
  • Loading branch information
hashimzs and MilosPaunovic authored Jan 16, 2025
1 parent 4227e1d commit fb66d42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ui/src/components/flows/FlowConcurrency.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-if="flow.concurrency">
<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">
Expand All @@ -26,6 +26,12 @@
/>
</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"
/>
<empty-state
v-else
:title="$t('concurrency-view.title_no_limit')"
Expand All @@ -51,12 +57,14 @@
data() {
return {
runningCount: 0,
runningCountSet: false,
noConcurrencyImage
}
},
methods: {
setRunningCount(count) {
this.runningCount = count
this.runningCountSet = true
}
},
computed: {
Expand Down
2 changes: 2 additions & 0 deletions ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@
}
},
"concurrency-view": {
"title_no_executions":"No ongoing Executions for this Flow.",
"desc_no_executions":"Read more about <strong><a href=\"https://kestra.io/docs/workflow-components/execution\" target=\"_blank\">Executions</a></strong> in our documentation.",
"title_no_limit": "No limits are set for this Flow.",
"desc_no_limit": "Read more about <strong><a href=\"https://kestra.io/docs/workflow-components/concurrency\" target=\"_blank\">Concurrency Limits</a></strong> in our documentation."
},
Expand Down

0 comments on commit fb66d42

Please sign in to comment.