Skip to content

Commit 2abaaab

Browse files
committed
fix(redis-smq-web-ui): redirect to queue page after successful creation
1 parent 5e59457 commit 2abaaab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/redis-smq-web-ui/src/views/HomeView.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
} from '@/api/generated/queue-consumers/queue-consumers.ts';
2525
import CreateQueueModal from '@/components/modals/CreateQueueModal.vue';
2626
import { useTypedRouter } from '@/router/useTypeRouter.ts';
27+
import type { IQueueParams } from '@/types';
2728
2829
const router = useTypedRouter();
2930
const queryClient = useQueryClient();
@@ -179,6 +180,15 @@ const loadDashboardData = async () => {
179180
onMounted(() => {
180181
loadDashboardData();
181182
});
183+
184+
const onQueueCreated = (queue: IQueueParams) => {
185+
router.push('queue', {
186+
params: {
187+
ns: queue.ns,
188+
queue: queue.name,
189+
},
190+
});
191+
};
182192
</script>
183193

184194
<template>
@@ -354,7 +364,7 @@ onMounted(() => {
354364
<CreateQueueModal
355365
:is-visible="showCreateQueueModal"
356366
@close="showCreateQueueModal = false"
357-
@created="loadDashboardData"
367+
@created="onQueueCreated"
358368
/>
359369
</div>
360370
</template>

0 commit comments

Comments
 (0)