From e6e87de46a57b9d9be98305ed925d633b067e8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NaYeong=2CKim=28=EA=B9=80=EB=82=98=EC=98=81=29?= Date: Thu, 9 Jan 2025 16:59:57 +0900 Subject: [PATCH 1/7] fix: fixed event rule update bug Signed-off-by: NaYeong,Kim --- .../ServiceDetailTabsSettingsEventRule.vue | 13 ++----------- ...rviceDetailTabsSettingsEventRuleDeleteModal.vue | 10 ++++++++++ .../ServiceDetailTabsSettingsEventRuleFormCard.vue | 14 ++++++++++---- .../ServiceDetailTabsSettingsEventRuleSidebar.vue | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/apps/web/src/services/alert-manager/components/ServiceDetailTabsSettingsEventRule.vue b/apps/web/src/services/alert-manager/components/ServiceDetailTabsSettingsEventRule.vue index 579b185954..caaa7abf49 100644 --- a/apps/web/src/services/alert-manager/components/ServiceDetailTabsSettingsEventRule.vue +++ b/apps/web/src/services/alert-manager/components/ServiceDetailTabsSettingsEventRule.vue @@ -7,8 +7,6 @@ import { PButton, PDataLoader } from '@cloudforet/mirinae'; import { EVENT_RULE_SCOPE } from '@/schema/alert-manager/event-rule/constant'; import type { EventRuleModel } from '@/schema/alert-manager/event-rule/model'; -import { replaceUrlQuery } from '@/lib/router-query-string'; - import ServiceDetailTabsSettingsEventRuleCard from '@/services/alert-manager/components/ServiceDetailTabsSettingsEventRuleCard.vue'; import ServiceDetailTabsSettingsEventRuleFormCard @@ -58,16 +56,8 @@ const fetchEventRuleInfo = async () => { watch(() => route.query?.eventRuleId, (eventRuleId) => { if (eventRuleId) { fetchEventRuleInfo(); - serviceDetailPageStore.setShowEventRuleFormCard(false); } }, { immediate: true }); -watch(() => storeState.items, (items) => { - if (!items.length) return; - replaceUrlQuery({ - webhookId: items[0].webhook_id || 'global', - eventRuleId: items[0].event_rule_id, - }); -}); watch(() => storeState.serviceId, async (id) => { if (!id) return; try { @@ -95,6 +85,7 @@ watch(() => storeState.serviceId, async (id) => { :selected-webhook="storeState.isEventRuleEditMode ? storeState.eventRuleInfo.webhook_id : state.selectedWebhook" :selected-scope="storeState.isEventRuleEditMode ? storeState.eventRuleInfo.scope : state.selectedScope" class="flex-1" + @confirm="fetchEventRuleInfo()" /> storeState.serviceId, async (id) => {