Skip to content

Commit

Permalink
fix(ui): create flow button from namespace flows list (#5117)
Browse files Browse the repository at this point in the history
close #4646
  • Loading branch information
Skraye authored Sep 25, 2024
1 parent 15700ef commit 96ce248
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ui/src/components/namespace/Namespace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
</el-button>
</li>
</ul>
<ul v-if="$route.params.tab === 'flows'">
<li>
<router-link :to="{name: 'flows/create'}" v-if="canCreateFlow">
<el-button :icon="Plus" type="primary">
{{ $t('create') }}
</el-button>
</router-link>
</li>
</ul>
</template>
</top-nav-bar>
<tabs :route-name="$route.param && $route.param.id ? 'namespaces/update' : ''" :tabs="tabs" :namespace="$route.params.id" id="namespaces" />
Expand Down Expand Up @@ -68,6 +77,9 @@
canCreateKv() {
return this.$route.params.id;
},
canCreateFlow() {
return this.user && this.user.hasAnyActionOnAnyNamespace(permission.FLOW, action.CREATE);
},
routeInfo() {
return {
title: this.$route.params.id || this.$t("namespaces"),
Expand Down

0 comments on commit 96ce248

Please sign in to comment.