From 10f8465788af193d295534923c9eaa4d47327e77 Mon Sep 17 00:00:00 2001 From: sulmo <50662170+sulmoJ@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:00:07 +0900 Subject: [PATCH] chore: activate the anomaly detection menu (#4383) Signed-off-by: sulmo --- .../preference/components/DomainSettingsLSB.vue | 15 +++++++-------- ...nSettingsAnomalyDetectionConfigurationPage.vue | 3 +++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/web/src/services/preference/components/DomainSettingsLSB.vue b/apps/web/src/services/preference/components/DomainSettingsLSB.vue index 12b88c13b5..569ac9e688 100644 --- a/apps/web/src/services/preference/components/DomainSettingsLSB.vue +++ b/apps/web/src/services/preference/components/DomainSettingsLSB.vue @@ -32,14 +32,13 @@ const state = reactive({ hideFavorite: true, highlightTag: 'new', }, - // TODO: To be implemented after completion of the feature API - // { - // type: MENU_ITEM_TYPE.ITEM, - // label: i18n.t('IAM.DOMAIN_SETTINGS.ANOMALY_DETECTION_CONFIGURATION'), - // to: { name: makeAdminRouteName(PREFERENCE_ROUTE.DOMAIN_SETTINGS.ANOMALY_DETECTION_DOMAIN_CONFIGURATION._NAME) }, - // hideFavorite: true, - // highlightTag: 'new', - // }, + { + type: MENU_ITEM_TYPE.ITEM, + label: i18n.t('IAM.DOMAIN_SETTINGS.ANOMALY_DETECTION_CONFIGURATION'), + to: { name: makeAdminRouteName(PREFERENCE_ROUTE.DOMAIN_SETTINGS.ANOMALY_DETECTION_DOMAIN_CONFIGURATION._NAME) }, + hideFavorite: true, + highlightTag: 'new', + }, ]), }); diff --git a/apps/web/src/services/preference/pages/admin/AdminDomainSettingsAnomalyDetectionConfigurationPage.vue b/apps/web/src/services/preference/pages/admin/AdminDomainSettingsAnomalyDetectionConfigurationPage.vue index 828fa2f1c5..1bfb0fce58 100644 --- a/apps/web/src/services/preference/pages/admin/AdminDomainSettingsAnomalyDetectionConfigurationPage.vue +++ b/apps/web/src/services/preference/pages/admin/AdminDomainSettingsAnomalyDetectionConfigurationPage.vue @@ -145,6 +145,9 @@ onMounted(async () => { variation: rule.variations, notifyLevel: rule.severity, })); + if (!state.notificationRules.length) { + state.notificationRules = [{ variation: ['gte', 'lte'] }]; + } state.recipients = savedConfig.recipients?.role_type.includes('WORKSPACE_OWNER') ?? false; } });