From 3d9ca7fe028b9205b0a11e813e17aa1a7f88b916 Mon Sep 17 00:00:00 2001 From: "NaYeong,Kim" Date: Sun, 22 Dec 2024 22:26:35 +0900 Subject: [PATCH] feat: create escalation policy creation modal (#5297) * feat: create escalation policy creation modal Signed-off-by: NaYeong,Kim * chore: update translations Signed-off-by: NaYeong,Kim --------- Signed-off-by: NaYeong,Kim --- .../components/ServiceDetailTabsSettings.vue | 2 +- ...viceDetailTabsSettingsEscalationPolicy.vue | 166 +++++----- ...DetailTabsSettingsEscalationPolicyForm.vue | 196 ++++++++++++ ...ngsEscalationPolicyFormChannelDropdown.vue | 282 +++++++++++++++++ ...lTabsSettingsEscalationPolicyFormModal.vue | 165 ++++++++++ ... ServiceDetailTabsSettingsUpdateModal.vue} | 0 .../types/alert-manager-type.ts | 8 +- .../console-translation-2.8.babel | 294 ++++++++++++++++++ packages/language-pack/en.json | 14 + packages/language-pack/ja.json | 14 + packages/language-pack/ko.json | 14 + 11 files changed, 1078 insertions(+), 77 deletions(-) create mode 100644 apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyForm.vue create mode 100644 apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormChannelDropdown.vue create mode 100644 apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormModal.vue rename apps/web/src/services/alert-manager-v2/components/{ServiceDetailTabsSettingsModal.vue => ServiceDetailTabsSettingsUpdateModal.vue} (100%) diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettings.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettings.vue index 9113c1e670..7fa39c5fad 100644 --- a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettings.vue +++ b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettings.vue @@ -14,7 +14,7 @@ import { red } from '@/styles/colors'; import ServiceDetailTabsSettingsEscalationPolicy from '@/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicy.vue'; -import ServiceDetailTabsSettingsModal from '@/services/alert-manager-v2/components/ServiceDetailTabsSettingsModal.vue'; +import ServiceDetailTabsSettingsModal from '@/services/alert-manager-v2/components/ServiceDetailTabsSettingsUpdateModal.vue'; import { SERVICE_SETTING_CARD } from '@/services/alert-manager-v2/constants/common-constant'; import { useServiceDetailPageStore } from '@/services/alert-manager-v2/stores/service-detail-page-store'; import type { ServiceDetailSettingCardType, Service } from '@/services/alert-manager-v2/types/alert-manager-type'; diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicy.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicy.vue index 3d8938d0ce..303f98575d 100644 --- a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicy.vue +++ b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicy.vue @@ -1,6 +1,6 @@ diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyForm.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyForm.vue new file mode 100644 index 0000000000..d0dce964b6 --- /dev/null +++ b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyForm.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormChannelDropdown.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormChannelDropdown.vue new file mode 100644 index 0000000000..bc476aebec --- /dev/null +++ b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormChannelDropdown.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormModal.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormModal.vue new file mode 100644 index 0000000000..431e8dbd94 --- /dev/null +++ b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsEscalationPolicyFormModal.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsModal.vue b/apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsUpdateModal.vue similarity index 100% rename from apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsModal.vue rename to apps/web/src/services/alert-manager-v2/components/ServiceDetailTabsSettingsUpdateModal.vue diff --git a/apps/web/src/services/alert-manager-v2/types/alert-manager-type.ts b/apps/web/src/services/alert-manager-v2/types/alert-manager-type.ts index 5d2bb78522..3207cfb687 100644 --- a/apps/web/src/services/alert-manager-v2/types/alert-manager-type.ts +++ b/apps/web/src/services/alert-manager-v2/types/alert-manager-type.ts @@ -2,7 +2,7 @@ import type { TranslateResult } from 'vue-i18n'; import type { KeyItemSet, ValueHandlerMap } from '@cloudforet/mirinae/types/controls/search/query-search/type'; -import type { AlertUrgencyType } from '@/schema/alert-manager/alert/type'; +import type { AlertStateType, AlertUrgencyType } from '@/schema/alert-manager/alert/type'; import type { ServiceChannelDataType, ServiceChannelScheduleInfoType } from '@/schema/alert-manager/service-channel/type'; import type { ServiceModel } from '@/schema/alert-manager/service/model'; import type { AlertsInfoType, AlertsType } from '@/schema/alert-manager/service/type'; @@ -53,3 +53,9 @@ export type ProtocolInfo = { name: string; icon: string; }; + +export type EscalationPolicyRadioType = { + label: TranslateResult, + name: AlertStateType +}; +export type EscalationPolicyModalType = 'CREATE' | 'SET'; diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index fd161ff782..4c6ea926da 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -1434,6 +1434,27 @@ ESCALATION_POLICY + + ADD_RULE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + CHANNEL false @@ -1455,6 +1476,90 @@ + + CREATE_MODAL_TITLE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + ESCALATES_AFTER + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + ESCALATION_RULES_HELP_TEXT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + GO_SET_NOTIFICATION + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + IN_USE false @@ -1476,6 +1581,174 @@ + + LABEL_ESCALATION_RULES + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LABEL_FINISH_CONDITION + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LABEL_NAME + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + NAME_INVALID_TEXT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + NOTIFICATION_CHANNEL_PLACEHOLDER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + REPEAT + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + REPEAT_DESC + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + + + SET_MODAL_TITLE + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + SET_POLICY false @@ -1539,6 +1812,27 @@ + + USER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + USER_GROUP false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 3dcb901753..2631b9afb3 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -70,11 +70,25 @@ "EDIT_NAME": "Edit Name", "ENABLE": "Enable", "ESCALATION_POLICY": { + "ADD_RULE": "Add Rule", "CHANNEL": "Channel", + "CREATE_MODAL_TITLE": "Create Escalation Policy", + "ESCALATES_AFTER": "Next step runs in {minute} minutes.", + "ESCALATION_RULES_HELP_TEXT": "At least one rule must be set. (Up to 5)", + "GO_SET_NOTIFICATION": "Go set Notifications", "IN_USE": "In Use", + "LABEL_ESCALATION_RULES": "Escalation Rules", + "LABEL_FINISH_CONDITION": "Finish Condition", + "LABEL_NAME": "Name", + "NAME_INVALID_TEXT": "The maximum length of a name is 40 characters.", + "NOTIFICATION_CHANNEL_PLACEHOLDER": "Select Notification Channel", + "REPEAT": "REPEAT", + "REPEAT_DESC": "Apply to all steps above", + "SET_MODAL_TITLE": "Set Escalation Policy", "SET_POLICY": "Set Escalation Rules", "STEP": "Step {step}", "TITLE": "Escalation Policy", + "USER": "User", "USER_GROUP": "User Group" }, "EVENT_RULE": { diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index 89500577aa..739b86c179 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -70,11 +70,25 @@ "EDIT_NAME": "名の編集", "ENABLE": "有効化", "ESCALATION_POLICY": { + "ADD_RULE": "ルールを追加", "CHANNEL": "チャンネル名", + "CREATE_MODAL_TITLE": "エスカレーションポリシー作成", + "ESCALATES_AFTER": "{minute}分後に次のステップを実行", + "ESCALATION_RULES_HELP_TEXT": "少なくとも1以上のルールが必要です。(最大5)", + "GO_SET_NOTIFICATION": "", "IN_USE": "", + "LABEL_ESCALATION_RULES": "エスカレーションルール", + "LABEL_FINISH_CONDITION": "終了条件", + "LABEL_NAME": "名前", + "NAME_INVALID_TEXT": "名前の最大長さは40文字です。", + "NOTIFICATION_CHANNEL_PLACEHOLDER": "", + "REPEAT": "繰り返す", + "REPEAT_DESC": "", + "SET_MODAL_TITLE": "", "SET_POLICY": "", "STEP": "ステップ {step}", "TITLE": "エスカレーションポリシー", + "USER": "ユーザー", "USER_GROUP": "" }, "EVENT_RULE": { diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 757a0a16ac..e4d7daec6d 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -70,11 +70,25 @@ "EDIT_NAME": "이름 수정", "ENABLE": "활성화", "ESCALATION_POLICY": { + "ADD_RULE": "규칙 추가", "CHANNEL": "채널", + "CREATE_MODAL_TITLE": "에스컬레이션 정책 생성", + "ESCALATES_AFTER": "{minute}분 후 다음 단계 실행", + "ESCALATION_RULES_HELP_TEXT": "최소 1개 이상의 규칙이 있어야 합니다. (5개 까지)", + "GO_SET_NOTIFICATION": "", "IN_USE": "", + "LABEL_ESCALATION_RULES": "에스컬레이션 규칙", + "LABEL_FINISH_CONDITION": "종료 조건(상태)", + "LABEL_NAME": "이름", + "NAME_INVALID_TEXT": "40글자 미만으로 입력해주세요.", + "NOTIFICATION_CHANNEL_PLACEHOLDER": "", + "REPEAT": "반복", + "REPEAT_DESC": "", + "SET_MODAL_TITLE": "", "SET_POLICY": "", "STEP": "단계 {step}", "TITLE": "에스컬레이션 정책", + "USER": "사용자", "USER_GROUP": "" }, "EVENT_RULE": {