From 6b1117d7771f6c2127ff8ec1dff1d200299efaab 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: Mon, 7 Apr 2025 20:46:14 +0900 Subject: [PATCH 1/4] feat: add resolved_at field Signed-off-by: NaYeong,Kim --- .../alert-manager/v2/components/AlertsManagementTable.vue | 1 + .../alert-manager/v2/constants/alert-table-constant.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue index ee6dee39ca..c6583b3257 100644 --- a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue +++ b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue @@ -88,6 +88,7 @@ const state = reactive({ ? calculateTime(alert?.resolved_at, storeState.timezone) || '0m' : calculateTime(alert?.created_at, storeState.timezone) || '0m', created_at: iso8601Formatter(alert.created_at, storeState.timezone), + resolved_at: iso8601Formatter(alert.resolved_at, storeState.timezone) || '-', }))), alertStateLabels: getAlertStateI18n(), urgencyLabels: getAlertUrgencyI18n(), diff --git a/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts b/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts index f6e47cf837..54c79a6bb2 100644 --- a/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts +++ b/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts @@ -20,6 +20,7 @@ export const ALERT_MANAGEMENT_TABLE_FIELDS: DataTableFieldType[] = [ { name: 'triggered_by', label: 'Triggered by' }, { name: 'duration', label: 'Duration', sortable: false }, { name: 'created_at', label: 'Created' }, + { name: 'resolved_at', label: 'Resolved' }, ]; export const ALERT_MANAGEMENT_TABLE_HANDLER: AlertManagementTableHandlerType = { keyItemSets: [{ @@ -44,7 +45,8 @@ export const ALERT_EXCEL_FIELDS: ExcelDataField[] = [ { key: 'urgency', name: 'Urgency' }, { key: 'labels', name: 'Labels' }, { key: 'triggered_by', name: 'Triggered by', reference: { reference_key: 'webhook_id', resource_type: 'alert_manager.Webhook' } }, - { key: 'created_at', name: 'Created' }, + { key: 'created_at', name: 'Created', type: 'datetime' }, + { key: 'resolved_at', name: 'Resolved', type: 'datetime' }, ]; export const ALERT_CHANNEL_TABLE_FIELDS: DataTableFieldType[] = [ From 85256f0faa819efef543502d1858cad7814763fd 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: Tue, 8 Apr 2025 11:02:41 +0900 Subject: [PATCH 2/4] fix: add copy value data to definition table Signed-off-by: NaYeong,Kim --- .../ServiceDetailTabsNotificationsDetail.vue | 6 +++--- .../v2/constants/webhook-table-constant.ts | 6 +++--- .../tables/definition-table/PDefinitionTable.vue | 12 ++++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/web/src/services/alert-manager/v2/components/ServiceDetailTabsNotificationsDetail.vue b/apps/web/src/services/alert-manager/v2/components/ServiceDetailTabsNotificationsDetail.vue index 8dbac28121..e76accc70c 100644 --- a/apps/web/src/services/alert-manager/v2/components/ServiceDetailTabsNotificationsDetail.vue +++ b/apps/web/src/services/alert-manager/v2/components/ServiceDetailTabsNotificationsDetail.vue @@ -75,11 +75,11 @@ const state = reactive({ SUN: i18n.t('ALERT_MANAGER.NOTIFICATIONS.SUNDAY'), })), fields: computed(() => { - const forwardField = (state.notificationInfo.channel_type === SERVICE_CHANNEL_TYPE.FORWARD) ? [{ label: 'Member', name: 'data' }] : []; + const forwardField = (state.notificationInfo.channel_type === SERVICE_CHANNEL_TYPE.FORWARD) ? [{ label: 'Member', name: 'data', disableCopy: true }] : []; return [ - { label: 'Name', name: 'name' }, + { label: 'Name', name: 'name', disableCopy: true }, { label: 'Channel', name: 'protocol_id' }, - { label: 'State', name: 'state' }, + { label: 'State', name: 'state', disableCopy: true }, ...forwardField, { label: 'Schedule', name: 'schedule', disableCopy: true }, ]; diff --git a/apps/web/src/services/alert-manager/v2/constants/webhook-table-constant.ts b/apps/web/src/services/alert-manager/v2/constants/webhook-table-constant.ts index 117842f4ff..3877cfac6d 100644 --- a/apps/web/src/services/alert-manager/v2/constants/webhook-table-constant.ts +++ b/apps/web/src/services/alert-manager/v2/constants/webhook-table-constant.ts @@ -27,9 +27,9 @@ export const ALERT_EXCEL_FIELDS: ExcelDataField[] = [ ]; export const WEBHOOK_DEFINITION_FIELDS: DataTableFieldType[] = [ - { name: 'name', label: 'Name' }, - { name: 'plugin_info.plugin_id', label: 'Plugin' }, - { name: 'state', label: 'State' }, + { name: 'name', label: 'Name', disableCopy: true }, + { name: 'plugin_info.plugin_id', label: 'Plugin', disableCopy: true }, + { name: 'state', label: 'State', disableCopy: true }, { name: 'plugin_info.version', label: 'Version' }, { name: 'webhook_id', label: 'Webhook ID' }, { name: 'webhook_url', label: 'Webhook URL' }, diff --git a/packages/mirinae/src/data-display/tables/definition-table/PDefinitionTable.vue b/packages/mirinae/src/data-display/tables/definition-table/PDefinitionTable.vue index 8a1b71424b..e445f74f0e 100644 --- a/packages/mirinae/src/data-display/tables/definition-table/PDefinitionTable.vue +++ b/packages/mirinae/src/data-display/tables/definition-table/PDefinitionTable.vue @@ -80,10 +80,14 @@ import type { } from '@/data-display/tables/definition-table/type'; import PDataLoader from '@/feedbacks/loading/data-loader/PDataLoader.vue'; -const makeDefItems = (fields: DefinitionField[], data?: DefinitionData|DefinitionData[]): DefinitionProps[] => fields.map((field) => ({ - ...field, - data: get(data, field.name) ?? getValueByPath(data, field.name) ?? '', -})); +const makeDefItems = (fields: DefinitionField[], data?: DefinitionData|DefinitionData[]): DefinitionProps[] => fields.map((field) => { + const dataValue = get(data, field.name) ?? getValueByPath(data, field.name) ?? ''; + return { + ...field, + data: dataValue, + copyValue: field.disableCopy ? undefined : dataValue, + }; +}); export default defineComponent({ From d8397844cc1a29c11c23ddde620702ba7e2faa72 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: Tue, 8 Apr 2025 12:50:44 +0900 Subject: [PATCH 3/4] feat: add alert period filter Signed-off-by: NaYeong,Kim --- .../v2/components/AlertsManagementTable.vue | 111 +++++++++++-- .../v2/constants/alert-table-constant.ts | 7 + .../v2/helpers/alert-period-helper.ts | 15 ++ .../v2/types/alert-manager-type.ts | 16 ++ .../console-translation-2.8.babel | 147 ++++++++++++++++++ packages/language-pack/en.json | 7 + packages/language-pack/ja.json | 7 + packages/language-pack/ko.json | 7 + 8 files changed, 307 insertions(+), 10 deletions(-) create mode 100644 apps/web/src/services/alert-manager/v2/helpers/alert-period-helper.ts diff --git a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue index c6583b3257..e4a1762f9f 100644 --- a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue +++ b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue @@ -5,6 +5,8 @@ import { import type { TranslateResult } from 'vue-i18n'; import { useRoute } from 'vue-router/composables'; +import dayjs from 'dayjs'; + import { makeDistinctValueHandler } from '@cloudforet/core-lib/component-util/query-search'; import { QueryHelper } from '@cloudforet/core-lib/query'; import { SpaceConnector } from '@cloudforet/core-lib/space-connector'; @@ -30,6 +32,7 @@ import { FILE_NAME_PREFIX } from '@/lib/excel-export/constant'; import { downloadExcel } from '@/lib/helper/file-download-helper'; import { replaceUrlQuery } from '@/lib/router-query-string'; +import CustomDateModal from '@/common/components/custom-date-modal/CustomDateModal.vue'; import ErrorHandler from '@/common/composables/error/errorHandler'; import { useQueryTags } from '@/common/composables/query-tags'; import CustomFieldModal from '@/common/modules/custom-table/custom-field-modal/CustomFieldModal.vue'; @@ -45,12 +48,18 @@ import { ALERT_EXCEL_FIELDS, ALERT_MANAGEMENT_TABLE_FIELDS, ALERT_MANAGEMENT_TABLE_HANDLER, - ALERT_STATUS_FILTERS, + ALERT_STATUS_FILTERS, ALERT_PERIOD_DROPDOWN_MENU, } from '@/services/alert-manager/v2/constants/alert-table-constant'; +import { + convertRelativePeriodToPeriod, initiatePeriodByGranularity, +} from '@/services/alert-manager/v2/helpers/alert-period-helper'; import { ALERT_MANAGER_ROUTE } from '@/services/alert-manager/v2/routes/route-constant'; import { useAlertPageStore } from '@/services/alert-manager/v2/stores/alert-page-store'; import { useServiceDetailPageStore } from '@/services/alert-manager/v2/stores/service-detail-page-store'; -import type { AlertFilterType } from '@/services/alert-manager/v2/types/alert-manager-type'; +import type { + AlertFilterType, AlertPeriodItemType, + AlertPeriodDropdownMenuType, +} from '@/services/alert-manager/v2/types/alert-manager-type'; const allReferenceStore = useAllReferenceStore(); const allReferenceGetters = allReferenceStore.getters; @@ -94,8 +103,56 @@ const state = reactive({ urgencyLabels: getAlertUrgencyI18n(), defaultFields: computed(() => (state.isServicePage ? ALERT_MANAGEMENT_TABLE_FIELDS : [{ name: 'service_id', label: 'Service' }, ...ALERT_MANAGEMENT_TABLE_FIELDS])), fields: route.name === ALERT_MANAGER_ROUTE.SERVICE.DETAIL._NAME ? ALERT_MANAGEMENT_TABLE_FIELDS : [{ name: 'service_id', label: 'Service' }, ...ALERT_MANAGEMENT_TABLE_FIELDS], + customRangeModalVisible: false, }); const filterState = reactive({ + urgencyFields: computed(() => ([ + { label: i18n.t('ALERT_MANAGER.ALERTS.ALL'), name: 'ALL' }, + { label: i18n.t('ALERT_MANAGER.ALERTS.HIGH'), name: ALERT_URGENCY.HIGH }, + { label: i18n.t('ALERT_MANAGER.ALERTS.LOW'), name: ALERT_URGENCY.LOW }, + ])), + period: initiatePeriodByGranularity()[0], + periodMenuItems: computed(() => [ + { + name: ALERT_PERIOD_DROPDOWN_MENU.LAST_1_MONTH, + relativePeriod: { unit: 'month', value: 1 }, + label: i18n.t('ALERT_MANAGER.ALERTS.LAST_1_MONTHS'), + }, + { + name: ALERT_PERIOD_DROPDOWN_MENU.LAST_3_MONTHS, + relativePeriod: { unit: 'month', value: 2 }, + label: i18n.t('ALERT_MANAGER.ALERTS.LAST_3_MONTHS'), + }, + { + name: ALERT_PERIOD_DROPDOWN_MENU.LAST_6_MONTHS, + relativePeriod: { unit: 'month', value: 5 }, + label: i18n.t('ALERT_MANAGER.ALERTS.LAST_6_MONTHS'), + }, + { + name: ALERT_PERIOD_DROPDOWN_MENU.LAST_12_MONTHS, + relativePeriod: { unit: 'month', value: 11 }, + label: i18n.t('ALERT_MANAGER.ALERTS.LAST_12_MONTHS'), + }, + { + type: 'divider', + }, { + type: 'item', + name: ALERT_PERIOD_DROPDOWN_MENU.CUSTOM, + label: i18n.t('ALERT_MANAGER.ALERTS.CUSTOM'), + }, + ]), + isPeriodInvalid: computed(() => { + const now = dayjs().utc(); + const checkPeriod = (limit:number):{isStartInvalid:boolean, isEndInvalid:boolean} => { + const isStartInvalid = now.diff(filterState.period?.start, 'month') >= limit; + const isEndInvalid = now.diff(filterState.period?.end, 'month') >= limit; + return { isStartInvalid, isEndInvalid }; + }; + const LIMIT_MONTH = 36; + const { isStartInvalid, isEndInvalid } = checkPeriod(LIMIT_MONTH); + return isStartInvalid || isEndInvalid; + }), + selectedPeriod: ALERT_PERIOD_DROPDOWN_MENU.LAST_1_MONTH as string, serviceDropdownList: computed(() => alertPageGetters.serviceDropdownList), statusFields: computed(() => ([ { label: i18n.t('ALERT_MANAGER.ALERTS.OPEN'), name: ALERT_STATUS_FILTERS.OPEN }, @@ -105,11 +162,6 @@ const filterState = reactive({ { label: i18n.t('ALERT_MANAGER.ALERTS.IGNORED'), name: ALERT_STATUS_FILTERS.IGNORED }, { label: i18n.t('ALERT_MANAGER.ALERTS.ALL'), name: 'ALL' }, ])), - urgencyFields: computed(() => ([ - { label: i18n.t('ALERT_MANAGER.ALERTS.ALL'), name: 'ALL' }, - { label: i18n.t('ALERT_MANAGER.ALERTS.HIGH'), name: ALERT_URGENCY.HIGH }, - { label: i18n.t('ALERT_MANAGER.ALERTS.LOW'), name: ALERT_URGENCY.LOW }, - ])), labelHandler: computed(() => makeDistinctValueHandler('alert_manager.Alert', 'labels')), selectedLabels: [] as SelectDropdownMenuItem[], }); @@ -180,6 +232,16 @@ const handleSelectFilter = async (type: 'status' | 'urgency', value: string) => } await fetchAlertsList(); }; +const handleSelectPeriod = async (periodMenuName: AlertPeriodDropdownMenuType) => { + if (periodMenuName === ALERT_PERIOD_DROPDOWN_MENU.CUSTOM) { + state.customRangeModalVisible = true; + return; + } + filterState.selectedPeriod = periodMenuName; + const selectedPeriodItem = filterState.periodMenuItems.find((d) => d.name === periodMenuName) || {} as AlertPeriodItemType; + filterState.period = selectedPeriodItem.relativePeriod ? convertRelativePeriodToPeriod(selectedPeriodItem.relativePeriod) : filterState.period; + await fetchAlertsList(); +}; const handleChange = async (options: any = {}) => { if (options.sortBy !== undefined) alertListApiQueryHelper.setSort(options.sortBy, options.sortDesc); if (options.queryTags !== undefined) { @@ -211,22 +273,35 @@ const handleExportToExcel = async () => { timezone: storeState.timezone, }); }; +const handleCustomRangeModalConfirm = (start: string, end: string) => { + filterState.period = { start: dayjs(start).startOf('month').format('YYYY-MM-DD'), end: dayjs(end).endOf('month').format('YYYY-MM-DD') }; + filterState.selectedPeriod = ALERT_PERIOD_DROPDOWN_MENU.CUSTOM; + state.customRangeModalVisible = false; + fetchAlertsList(); +}; const fetchAlertsList = async () => { try { filterQueryHelper.setFilters([]); + if (storeState.selectedUrgency !== 'ALL') { + filterQueryHelper.addFilter({ k: 'urgency', v: storeState.selectedUrgency, o: '=' }); + } if (storeState.selectedStatus === ALERT_STATUS_FILTERS.OPEN) { filterQueryHelper.addFilter({ k: 'status', v: [ALERT_STATUS_FILTERS.TRIGGERED, ALERT_STATUS_FILTERS.ACKNOWLEDGED], o: '=' }); } else if (storeState.selectedStatus !== 'ALL') { filterQueryHelper.addFilter({ k: 'status', v: storeState.selectedStatus, o: '=' }); } - if (storeState.selectedUrgency !== 'ALL') { - filterQueryHelper.addFilter({ k: 'urgency', v: storeState.selectedUrgency, o: '=' }); - } if (filterState.selectedLabels.length > 0) { filterQueryHelper.addFilter({ k: 'labels', v: filterState.selectedLabels.map((i) => i.name), o: '=' }); } + if (filterState.period.start) { + filterQueryHelper.addFilter({ k: 'created_at', v: filterState.period.start, o: '>=' }); + } + if (filterState.period.end) { + filterQueryHelper.addFilter({ k: 'created_at', v: filterState.period.end, o: '<=' }); + } + if (state.isServicePage) { filterQueryHelper.addFilter({ k: 'service_id', v: storeState.serviceId, o: '=' }); } else if (storeState.selectedServiceId) { @@ -323,6 +398,15 @@ watch(() => storeState.serviceId, async (serviceId) => { {{ item.label }} + @@ -434,6 +518,13 @@ watch(() => storeState.serviceId, async (serviceId) => { @complete="fetchAlertsList" @custom-field-loaded="handleCustomFieldUpdate" /> + diff --git a/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts b/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts index 54c79a6bb2..380af0750f 100644 --- a/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts +++ b/apps/web/src/services/alert-manager/v2/constants/alert-table-constant.ts @@ -5,6 +5,13 @@ import type { ExcelDataField } from '@/lib/helper/file-download-helper/type'; import type { AlertManagementTableHandlerType } from '@/services/alert-manager/v2/types/alert-manager-type'; +export const ALERT_PERIOD_DROPDOWN_MENU = { + LAST_1_MONTH: 'LAST_1_MONTH', + LAST_3_MONTHS: 'LAST_3_MONTHS', + LAST_6_MONTHS: 'LAST_6_MONTHS', + LAST_12_MONTHS: 'LAST_12_MONTHS', + CUSTOM: 'CUSTOM', +} as const; export const ALERT_STATUS_FILTERS = { OPEN: 'OPEN', TRIGGERED: 'TRIGGERED', diff --git a/apps/web/src/services/alert-manager/v2/helpers/alert-period-helper.ts b/apps/web/src/services/alert-manager/v2/helpers/alert-period-helper.ts new file mode 100644 index 0000000000..fe31f4f2fe --- /dev/null +++ b/apps/web/src/services/alert-manager/v2/helpers/alert-period-helper.ts @@ -0,0 +1,15 @@ +import dayjs from 'dayjs'; + +import type { AlertRelativePeriod, Period } from '@/services/alert-manager/v2/types/alert-manager-type'; + +export const convertRelativePeriodToPeriod = (alertRelativePeriod: AlertRelativePeriod): Period => { + const today = dayjs.utc(); + return { + start: today.subtract(alertRelativePeriod.value, 'month').format('YYYY-MM-DD'), + }; +}; + +export const initiatePeriodByGranularity = (): [Period, AlertRelativePeriod|undefined] => { + const last1MonthsRelativePeriod: AlertRelativePeriod = { value: 1 }; + return [convertRelativePeriodToPeriod(last1MonthsRelativePeriod), last1MonthsRelativePeriod]; +}; 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 bc736b6e8b..ec548a7750 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 @@ -18,6 +18,7 @@ import type { ServiceChannelDataType, ServiceChannelScheduleInfoType } from '@/s import type { ServiceModel } from '@/schema/alert-manager/service/model'; import type { AlertsInfoType, AlertsType } from '@/schema/alert-manager/service/type'; +import type { ALERT_PERIOD_DROPDOWN_MENU } from '@/services/alert-manager/v2/constants/alert-table-constant'; import type { SERVICE_DETAIL_TABS, WEBHOOK_DETAIL_TABS, @@ -33,6 +34,12 @@ export type WebhookModalType = 'UPDATE' | 'ENABLE' | 'DISABLE' | 'DELETE'; export type EventRuleSettingsType = typeof EVENT_RULE_SETTINGS_TYPE[keyof typeof EVENT_RULE_SETTINGS_TYPE]; +export type AlertPeriodDropdownMenuType = typeof ALERT_PERIOD_DROPDOWN_MENU[keyof typeof ALERT_PERIOD_DROPDOWN_MENU]; + +export type Period = { + start?: string; + end?: string; +}; export type AlertFilterType = { label: TranslateResult; name: string; @@ -41,6 +48,15 @@ export type AlertUrgencyRadioType = { label: TranslateResult, name: AlertUrgencyType }; +export type AlertRelativePeriod = { + value: number; +}; +export type AlertPeriodItemType = { + name?: AlertPeriodDropdownMenuType; + label?: TranslateResult; + period?: Period; + relativePeriod?: AlertRelativePeriod; +}; export type AlertManagementTableHandlerType = { keyItemSets: KeyItemSet[], valueHandlerMap: ValueHandlerMap diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index e396c18fd8..a159ca2eb3 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -400,6 +400,48 @@ + + CUSTOM + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + CUSTOM_DATE_RANGE + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + DESC false @@ -715,6 +757,90 @@ + + LAST_12_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_1_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_3_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + + + LAST_6_MONTHS + false + + + + + + en-US + true + + + ja-JP + true + + + ko-KR + true + + + LOW false @@ -1009,6 +1135,27 @@ + + PERIOD + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + RESOLVED false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index c1cc4efc14..9674d0eab8 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -19,6 +19,8 @@ "CREATED_BY": "created by: {user}", "CREATE_ALERT": "Create Alert", "CRITICAL": "Critical", + "CUSTOM": "Custom", + "CUSTOM_DATE_RANGE": "Custom Date Range", "DESC": "Description", "DETAILS": "Details", "DURATION": "Duration", @@ -34,6 +36,10 @@ "LABEL_STATUS": "Status", "LABEL_TITLE": "Title", "LABEL_URGENCY": "Urgency", + "LAST_12_MONTHS": "Last 12 Months", + "LAST_1_MONTHS": "Last 1 Months", + "LAST_3_MONTHS": "Last 3 Months", + "LAST_6_MONTHS": "Last 6 Months", "LOW": "Low", "MANUALLY": "do it Manually", "MEMBERS": "members", @@ -48,6 +54,7 @@ "NOT_AVAILABLE": "Not Available", "NO_EVENT": "No Event", "OPEN": "Open", + "PERIOD": "Period", "RESOLVED": "Resolved", "RESOURCE": "Resources", "RESPONDER": "Responder", diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index 516545a913..54d6585f5d 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -19,6 +19,8 @@ "CREATED_BY": "作成者: {user}", "CREATE_ALERT": "アラート作成", "CRITICAL": "警告", + "CUSTOM": "カスタム", + "CUSTOM_DATE_RANGE": "日付範囲", "DESC": "説明", "DETAILS": "詳細情報", "DURATION": "持続期間", @@ -34,6 +36,10 @@ "LABEL_STATUS": "ステータス", "LABEL_TITLE": "タイトル", "LABEL_URGENCY": "緊急度", + "LAST_12_MONTHS": "過去12ヶ月間", + "LAST_1_MONTHS": "過去1ヶ月間", + "LAST_3_MONTHS": "過去3ヶ月間", + "LAST_6_MONTHS": "過去6ヶ月間", "LOW": "低い", "MANUALLY": "手動で行います。", "MEMBERS": "構成員", @@ -48,6 +54,7 @@ "NOT_AVAILABLE": "利用不可", "NO_EVENT": "イベントがありません。", "OPEN": "発生", + "PERIOD": "期間", "RESOLVED": "完了", "RESOURCE": "リソース", "RESPONDER": "回答者", diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 417bb6e3f8..133dbb705e 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -19,6 +19,8 @@ "CREATED_BY": "생성자: {user}", "CREATE_ALERT": "얼럿 생성", "CRITICAL": "위험 경고", + "CUSTOM": "기간 선택", + "CUSTOM_DATE_RANGE": "상세 기간 선택", "DESC": "설명", "DETAILS": "상세 정보", "DURATION": "지속 기간", @@ -34,6 +36,10 @@ "LABEL_STATUS": "상태", "LABEL_TITLE": "제목", "LABEL_URGENCY": "긴급도", + "LAST_12_MONTHS": "지난 12개월", + "LAST_1_MONTHS": "지난 1개월", + "LAST_3_MONTHS": "지난 3개월", + "LAST_6_MONTHS": "지난 6개월", "LOW": "낮음", "MANUALLY": "직접 완료합니다.", "MEMBERS": "멤버", @@ -48,6 +54,7 @@ "NOT_AVAILABLE": "사용 불가", "NO_EVENT": "이벤트가 없습니다.", "OPEN": "오픈", + "PERIOD": "기간", "RESOLVED": "완료", "RESOURCE": "리소스", "RESPONDER": "응답자", From 3f14689fbe5b8535ca376de0f702fc399dcaf728 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: Tue, 8 Apr 2025 12:54:43 +0900 Subject: [PATCH 4/4] chore: remove unnecessary property Signed-off-by: NaYeong,Kim --- .../alert-manager/v2/components/AlertsManagementTable.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue index e4a1762f9f..d0e9fdd8c5 100644 --- a/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue +++ b/apps/web/src/services/alert-manager/v2/components/AlertsManagementTable.vue @@ -115,22 +115,22 @@ const filterState = reactive({ periodMenuItems: computed(() => [ { name: ALERT_PERIOD_DROPDOWN_MENU.LAST_1_MONTH, - relativePeriod: { unit: 'month', value: 1 }, + relativePeriod: { value: 1 }, label: i18n.t('ALERT_MANAGER.ALERTS.LAST_1_MONTHS'), }, { name: ALERT_PERIOD_DROPDOWN_MENU.LAST_3_MONTHS, - relativePeriod: { unit: 'month', value: 2 }, + relativePeriod: { value: 2 }, label: i18n.t('ALERT_MANAGER.ALERTS.LAST_3_MONTHS'), }, { name: ALERT_PERIOD_DROPDOWN_MENU.LAST_6_MONTHS, - relativePeriod: { unit: 'month', value: 5 }, + relativePeriod: { value: 5 }, label: i18n.t('ALERT_MANAGER.ALERTS.LAST_6_MONTHS'), }, { name: ALERT_PERIOD_DROPDOWN_MENU.LAST_12_MONTHS, - relativePeriod: { unit: 'month', value: 11 }, + relativePeriod: { value: 11 }, label: i18n.t('ALERT_MANAGER.ALERTS.LAST_12_MONTHS'), }, {