diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue index 1c1c2e71cb..75d508a833 100644 --- a/apps/web/src/common/modules/user/UserSelectDropdown.vue +++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue @@ -13,14 +13,13 @@ import type { SelectDropdownMenuItem, } from '@cloudforet/mirinae/types/controls/dropdown/select-dropdown/type'; +import type { MembersType } from '@/schema/alert-manager/service/type'; import { i18n } from '@/translations'; import { useAllReferenceStore } from '@/store/reference/all-reference-store'; import type { UserGroupReferenceMap } from '@/store/reference/user-group-reference-store'; import type { UserReferenceMap } from '@/store/reference/user-reference-store'; -import type { SelectedUserDropdownIdsType } from '@/common/modules/user/typte'; - import { indigo } from '@/styles/colors'; interface DropdownItem extends SelectDropdownMenuItem { @@ -35,8 +34,8 @@ type DropdownCategoriesType = { }; const props = withDefaults(defineProps<{ - selectedId?: SelectedUserDropdownIdsType; - selectedIds?: SelectedUserDropdownIdsType[]; + selectedId?: string; + selectedIds?: string[]; selectionType?: 'single'|'multiple'; useFixedMenuStyle?: boolean; invalid?: boolean; @@ -49,6 +48,7 @@ const props = withDefaults(defineProps<{ showUserGroupList?: boolean; showCategoryTitle?: boolean; placeholder?: string; + excludedSelectedIds?: string[]; }>(), { selectedId: undefined, selectedIds: undefined, @@ -63,10 +63,12 @@ const props = withDefaults(defineProps<{ showUserGroupList: true, showCategoryTitle: true, placeholder: 'Select', + excludedSelectedIds: undefined, }); -const emit = defineEmits<{(event: 'update:selected-ids', value: SelectedUserDropdownIdsType[]): void; - (event: 'update:selected-id', value?: SelectedUserDropdownIdsType): void; +const emit = defineEmits<{(event: 'update:selected-id', value?: string): void; + (event: 'update:selected-ids', value: string[]): void; + (event: 'formatted-selected-ids', value: Record): void; }>(); const allReferenceStore = useAllReferenceStore(); @@ -101,7 +103,10 @@ const state = reactive({ label: storeState.userReferenceMap[userId]?.label || storeState.userReferenceMap[userId]?.name || userId, })); } - return Object.values(storeState.userReferenceMap).map((u: UserReferenceMap[string]) => ({ + const list = props.excludedSelectedIds + ? Object.values(storeState.userReferenceMap).filter((i) => !props.excludedSelectedIds?.includes(i.key)) + : Object.values(storeState.userReferenceMap); + return list.map((u: UserReferenceMap[string]) => ({ name: u.key, label: u.key, userName: u.name, @@ -115,7 +120,10 @@ const state = reactive({ label: storeState.userGroupReferenceMap[userGroupId]?.label || storeState.userGroupReferenceMap[userGroupId]?.name || userGroupId, })); } - return Object.values(storeState.userGroupReferenceMap).map((u: UserGroupReferenceMap[string]) => ({ + const list = props.excludedSelectedIds + ? Object.values(storeState.userGroupReferenceMap).filter((i) => !props.excludedSelectedIds?.includes(i.key)) + : Object.values(storeState.userGroupReferenceMap); + return list.map((u: UserGroupReferenceMap[string]) => ({ name: u.key, label: u.label, members: u.data.users?.length, @@ -124,6 +132,7 @@ const state = reactive({ selectedItems: [] as SelectDropdownMenuItem[], }); +const checkUserGroup = (id: string): boolean => state.allUserGroupItems.some((i) => i.name === id); const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, pageStart = 1, pageLimit = 10, filters, resultIndex) => { const _totalCount = pageStart - 1 + pageLimit; const filterItems = (items: SelectDropdownMenuItem[]) => items.filter((item) => getTextHighlightRegex(keyword).test(item.name)).slice(pageStart - 1, _totalCount); @@ -156,8 +165,8 @@ const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, page }); }; -const currentUserIds = computed(() => state.selectedItems.map((item) => ({ value: item.name, type: checkUserGroup(item.name) ? 'USER_GROUP' : 'USER' }))); -const currentUserId = computed(() => ({ value: state.selectedItems[0]?.name, type: checkUserGroup(state.selectedItems[0]?.name) ? 'USER_GROUP' : 'USER' })); +const currentUserId = computed(() => state.selectedItems[0]?.name); +const currentUserIds = computed(() => state.selectedItems.map((item) => item.name)); const handleUpdateSelectedUserItems = (selectedUsers: SelectDropdownMenuItem[]) => { if (isEqual(selectedUsers, state.selectedItems)) return; // prevent unnecessary update @@ -168,53 +177,64 @@ const handleUpdateSelectedUserItems = (selectedUsers: SelectDropdownMenuItem[]) } else { if (isEqual(currentUserIds.value, props.selectedIds)) return; // prevent unnecessary update emit('update:selected-ids', currentUserIds.value); + emit('formatted-selected-ids', { + USER: currentUserIds.value.filter((i) => !checkUserGroup(i)), + USER_GROUP: currentUserIds.value.filter((i) => checkUserGroup(i)), + }); } }; const handleTagDelete = (idx: number) => { state.selectedItems.splice(idx, 1); emit('update:selected-ids', currentUserIds.value); + emit('formatted-selected-ids', { + USER: currentUserIds.value.filter((i) => !checkUserGroup(i)), + USER_GROUP: currentUserIds.value.filter((i) => checkUserGroup(i)), + }); }; -const initSingleType = (_userId?: SelectedUserDropdownIdsType) => { - if (currentUserId?.value !== _userId?.value) { - const value = _userId?.value || ''; +const initSingleType = (_userId?: string) => { + if (currentUserId?.value !== _userId) { + const value = _userId || ''; const label = (() => { if (props.showUserList && storeState.userReferenceMap[value]) { - return storeState.userReferenceMap[value]?.label ?? _userId?.value; + return storeState.userReferenceMap[value]?.label ?? _userId; } if (props.showUserGroupList && storeState.userGroupReferenceMap[value]) { - return storeState.userGroupReferenceMap[value]?.label ?? _userId?.value; + return storeState.userGroupReferenceMap[value]?.label ?? _userId; } - return _userId?.value; + return _userId; })(); - state.selectedItems = _userId?.value - ? [{ name: _userId?.value, label }] + state.selectedItems = _userId + ? [{ name: _userId, label }] : []; } }; -const initMultipleType = (_userIds?: SelectedUserDropdownIdsType[]) => { +const initMultipleType = (_userIds?: string[]) => { if (!Array.isArray(_userIds)) throw new Error('userIds should be an array'); if (!isEqual(currentUserIds.value, _userIds)) { state.selectedItems = _userIds.map((userId) => { const label = (() => { - if (props.showUserList && storeState.userReferenceMap[userId.value]) { - return storeState.userReferenceMap[userId.value]?.label ?? userId.value; + if (props.showUserList && storeState.userReferenceMap[userId]) { + return storeState.userReferenceMap[userId]?.label ?? userId; } - if (props.showUserGroupList && storeState.userGroupReferenceMap[userId.value]) { - return storeState.userGroupReferenceMap[userId.value]?.label ?? userId.value; + if (props.showUserGroupList && storeState.userGroupReferenceMap[userId]) { + return storeState.userGroupReferenceMap[userId]?.label ?? userId; } - return userId.value; + return userId; })(); return { - name: userId.value, + name: userId, label, }; }); + emit('formatted-selected-ids', { + USER: currentUserIds.value.filter((i) => !checkUserGroup(i)), + USER_GROUP: currentUserIds.value.filter((i) => checkUserGroup(i)), + }); } }; -const checkUserGroup = (id: string): boolean => state.allUserGroupItems.some((i) => i.name === id); watch([() => props.selectedId, () => props.selectedIds], ([newUserId, newUserIds]) => { if (props.selectionType === 'single') { diff --git a/apps/web/src/common/modules/user/typte.ts b/apps/web/src/common/modules/user/typte.ts index b7ff735180..df30385ad0 100644 --- a/apps/web/src/common/modules/user/typte.ts +++ b/apps/web/src/common/modules/user/typte.ts @@ -1,4 +1,4 @@ -export type SelectedUserDropdownIdsType = { +export type SelectedIdsType = { value: string; type: 'USER'|'USER_GROUP'; }; diff --git a/apps/web/src/schema/alert-manager/alert/model.ts b/apps/web/src/schema/alert-manager/alert/model.ts index 22ac9598e9..c1a6ce8ed6 100644 --- a/apps/web/src/schema/alert-manager/alert/model.ts +++ b/apps/web/src/schema/alert-manager/alert/model.ts @@ -28,6 +28,8 @@ export interface AlertModel { updated_at: string; acknowledged_at: string; resolved_at: string; + acknowledged_by: string, + resolved_by: string, } export interface AlertEventModel { diff --git a/apps/web/src/services/alert-manager/components/AlertDetailInfoTable.vue b/apps/web/src/services/alert-manager/components/AlertDetailInfoTable.vue index b059abccfc..7f9ebb3510 100644 --- a/apps/web/src/services/alert-manager/components/AlertDetailInfoTable.vue +++ b/apps/web/src/services/alert-manager/components/AlertDetailInfoTable.vue @@ -46,9 +46,9 @@ const tableState = reactive({ { name: 'triggered_by', label: i18n.t('ALERT_MANAGER.ALERTS.TRIGGERED_BY'), copyValueFormatter: () => storeState.alertInfo.triggered_by }, { name: 'service_id', label: i18n.t('ALERT_MANAGER.ALERTS.SERVICE'), disableCopy: true }, { name: 'resources', label: i18n.t('ALERT_MANAGER.ALERTS.RESOURCE'), disableCopy: true }, - { name: 'created_at', label: i18n.t('ALERT_MANAGER.ALERTS.CREATED'), disableCopy: true }, - { name: 'acknowledged_at', label: i18n.t('ALERT_MANAGER.ALERTS.ACKNOWLEDGED'), disableCopy: true }, - { name: 'resolved_at', label: i18n.t('ALERT_MANAGER.ALERTS.RESOLVED'), disableCopy: true }, + { name: 'created_at', label: i18n.t('ALERT_MANAGER.ALERTS.CREATED_AT'), disableCopy: true }, + { name: 'acknowledged_at', label: i18n.t('ALERT_MANAGER.ALERTS.ACKNOWLEDGED_AT'), disableCopy: true }, + { name: 'resolved_at', label: i18n.t('ALERT_MANAGER.ALERTS.RESOLVED_AT'), disableCopy: true }, ]), }); @@ -143,8 +143,8 @@ const getAssetInfo = (assetId: string) => { {{ value || '--' }} diff --git a/apps/web/src/services/alert-manager/components/NotificationsCreateForm.vue b/apps/web/src/services/alert-manager/components/NotificationsCreateForm.vue index 86d5e7db59..e8710c5251 100644 --- a/apps/web/src/services/alert-manager/components/NotificationsCreateForm.vue +++ b/apps/web/src/services/alert-manager/components/NotificationsCreateForm.vue @@ -16,7 +16,6 @@ import { assetUrlConverter } from '@/lib/helper/asset-helper'; import type { ScheduleSettingFormType } from '@/common/components/schedule-setting-form/schedule-setting-form'; import ScheduleSettingForm from '@/common/components/schedule-setting-form/ScheduleSettingForm.vue'; import { useFormValidator } from '@/common/composables/form-validator'; -import type { SelectedUserDropdownIdsType } from '@/common/modules/user/typte'; import UserSelectDropdown from '@/common/modules/user/UserSelectDropdown.vue'; import { useServiceCreateFormStore } from '@/services/alert-manager/stores/service-create-form-store'; @@ -54,13 +53,16 @@ const state = reactive({ }, ])), selectedRadioIdx: 0, - selectedMemberItems: [] as SelectedUserDropdownIdsType[], + selectedMemberItems: {} as Record, isSchemaDataValid: false, isMemberDataValid: computed(() => { if (state.selectedRadioIdx === 0) { return true; } - return state.selectedMemberItems.length > 0; + if (state.selectedRadioIdx === 1) { + return (state.selectedMemberItems.USER_GROUP || []).length > 0; + } + return (state.selectedMemberItems.USER || []).length > 0; }), }); @@ -85,6 +87,9 @@ const { }, }); +const handleFormattedSelectedIds = (value: Record) => { + state.selectedMemberItems = value; +}; const handleSchemaValidate = (isValid: boolean) => { state.isSchemaDataValid = isValid; }; @@ -92,7 +97,7 @@ const handleScheduleForm = (form: ScheduleSettingFormType) => { state.scheduleForm = form; }; const handleChangeRadio = () => { - state.selectedMemberItems = []; + state.selectedMemberItems = {}; }; watch([() => name.value, () => state.scheduleForm, () => state.selectedRadioIdx, () => state.selectedMemberItems, () => state.schemaForm], ( @@ -105,8 +110,8 @@ watch([() => name.value, () => state.scheduleForm, () => state.selectedRadioIdx, schedule: scheduleForm, data: !state.isForwardTypeProtocol ? schemaForm : { FORWARD_TYPE: state.radioMenuList[selectedRadioIdx].name, - USER_GROUP: selectedRadioIdx === 1 ? selectedMemberItems.map((item) => item.value) : undefined, - USER: selectedRadioIdx === 2 ? selectedMemberItems.map((item) => item.value) : undefined, + USER_GROUP: selectedRadioIdx === 1 ? selectedMemberItems.USER_GROUP : undefined, + USER: selectedRadioIdx === 2 ? selectedMemberItems.USER : undefined, }, }, isAllValid.value && (state.isForwardTypeProtocol ? state.isMemberDataValid : state.isSchemaDataValid), @@ -174,7 +179,7 @@ watch([() => name.value, () => state.scheduleForm, () => state.selectedRadioIdx, :show-category-title="false" :show-user-group-list="state.selectedRadioIdx === 1" :show-user-list="state.selectedRadioIdx === 2" - :selected-ids.sync="state.selectedMemberItems" + @formatted-selected-ids="handleFormattedSelectedIds" /> diff --git a/apps/web/src/services/alert-manager/components/ServiceCreateStep1.vue b/apps/web/src/services/alert-manager/components/ServiceCreateStep1.vue index 74eb7c5233..26fc647cc7 100644 --- a/apps/web/src/services/alert-manager/components/ServiceCreateStep1.vue +++ b/apps/web/src/services/alert-manager/components/ServiceCreateStep1.vue @@ -10,6 +10,7 @@ import { import type { ServiceCreateParameters } from '@/schema/alert-manager/service/api-verbs/create'; import type { ServiceModel } from '@/schema/alert-manager/service/model'; +import type { MembersType } from '@/schema/alert-manager/service/type'; import { i18n } from '@/translations'; import { useAllReferenceStore } from '@/store/reference/all-reference-store'; @@ -19,7 +20,6 @@ import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; import ErrorHandler from '@/common/composables/error/errorHandler'; import { useFormValidator } from '@/common/composables/form-validator'; -import type { SelectedUserDropdownIdsType } from '@/common/modules/user/typte'; import UserSelectDropdown from '@/common/modules/user/UserSelectDropdown.vue'; import ServiceCreateStepContainer from '@/services/alert-manager/components/ServiceCreateStepContainer.vue'; @@ -30,15 +30,13 @@ const allReferenceStore = useAllReferenceStore(); const allReferenceGetters = allReferenceStore.getters; const dropdownState = reactive({ - selectedMemberItems: [] as SelectedUserDropdownIdsType[], + selectedMemberItems: {} as Record, }); const storeState = reactive({ serviceListMap: computed(() => allReferenceGetters.service), }); const state = reactive({ isFocusedKey: false, - selectedWorkspaceMemberList: computed(() => dropdownState.selectedMemberItems.filter((i) => i.type === 'USER').map((i) => i.value)), - selectedUserGroupList: computed(() => dropdownState.selectedMemberItems.filter((i) => i.type === 'USER_GROUP').map((i) => i.value)), }); const { @@ -74,10 +72,13 @@ const { }, }); +const handleFormattedSelectedIds = (value: Record) => { + dropdownState.selectedMemberItems = value; +}; const convertToSnakeCase = (str): string => { const cleanedInput = str.replace(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/g, ''); return cleanedInput - .toLowerCase() + .toUpperCase() .split(' ') .filter((word) => word.trim() !== '') .join('_'); @@ -93,8 +94,8 @@ const handleCreateService = async () => { name: name.value, service_key: key.value, members: { - USER: state.selectedWorkspaceMemberList, - USER_GROUP: state.selectedUserGroupList, + USER: dropdownState.selectedMemberItems.USER, + USER_GROUP: dropdownState.selectedMemberItems.USER_GROUP, }, description: description.value, }); @@ -160,7 +161,7 @@ watch(() => state.isFocusedKey, (isFocusedKey) => { diff --git a/apps/web/src/services/alert-manager/components/ServiceDetailMemberModal.vue b/apps/web/src/services/alert-manager/components/ServiceDetailMemberModal.vue index 437ebfe275..a725108c81 100644 --- a/apps/web/src/services/alert-manager/components/ServiceDetailMemberModal.vue +++ b/apps/web/src/services/alert-manager/components/ServiceDetailMemberModal.vue @@ -25,7 +25,6 @@ import { showSuccessMessage } from '@/lib/helper/notice-alert-helper'; import ErrorHandler from '@/common/composables/error/errorHandler'; import { usePageEditableStatus } from '@/common/composables/page-editable-status'; import { useProxyValue } from '@/common/composables/proxy-state'; -import type { SelectedUserDropdownIdsType } from '@/common/modules/user/typte'; import UserSelectDropdown from '@/common/modules/user/UserSelectDropdown.vue'; import { indigo } from '@/styles/colors'; @@ -92,7 +91,7 @@ const state = reactive({ const userList = storeState.serviceInfo.members.USER.map((i) => { const user = storeState.userMap[i]; return { - roleType: user.data.roleInfo?.role_type, + roleType: user?.data.roleInfo?.role_type, label: user.label, type: MEMBERS_TYPE.USER, key: user.key, @@ -101,22 +100,26 @@ const state = reactive({ const userGroupList = storeState.serviceInfo.members.USER_GROUP.map((i) => { const userGroup = storeState.userGroupMap[i]; return { - label: userGroup.name, + label: userGroup?.name || '', type: MEMBERS_TYPE.USER_GROUP, - key: userGroup.key, + key: userGroup?.key, }; }); return [...userList, ...userGroupList]; }), userList: computed(() => state.memberList.filter((i) => i.type === 'USER').map((i) => i.key)), userGroupList: computed(() => state.memberList.filter((i) => i.type === 'USER_GROUP').map((i) => i.key)), - selectedMemberItems: [] as SelectedUserDropdownIdsType[], + excludedSelectedIds: [] as string[], + formattedMemberItems: {} as Record, }); +const handleFormattedSelectedIds = (value: Record) => { + state.formattedMemberItems = value; +}; const handleClickInviteButton = () => { - state.selectedMemberItems = [ - ...state.userList.map((i) => ({ type: 'USER', value: i })), - ...state.userGroupList.map((i) => ({ type: 'USER_GROUP', value: i })), + state.excludedSelectedIds = [ + ...state.userList.map((i) => i), + ...state.userGroupList.map((i) => i), ]; state.mode = 'invitation'; }; @@ -141,21 +144,18 @@ const inviteMember = async () => { state.loading = true; try { const [defaultUserList, defaultUserGroupList] = partition(state.memberList, { type: 'USER' }); - const [selectedUserList, selectedUserGroupList] = partition(state.selectedMemberItems, { type: 'USER' }); const _defaultUserList = map(defaultUserList, 'key'); const _defaultUserGroupList = map(defaultUserGroupList, 'key'); - const _selectedUserList = map(selectedUserList, 'value'); - const _selectedUserGroupList = map(selectedUserGroupList, 'value'); await fetcherChangeMembers( - [..._defaultUserList, ..._selectedUserList], - [..._defaultUserGroupList, ..._selectedUserGroupList], + [..._defaultUserList, ...state.formattedMemberItems.USER], + [..._defaultUserGroupList, ...state.formattedMemberItems.USER_GROUP], ); } finally { state.loading = false; state.mode = 'member'; - state.selectedMemberItems = []; + state.excludedSelectedIds = []; } }; @@ -264,7 +264,10 @@ const fetcherChangeMembers = async (userData: string[], userGroupData: string[]) diff --git a/apps/web/src/services/alert-manager/components/ServiceDetailTabsNotificationsUpdateModal.vue b/apps/web/src/services/alert-manager/components/ServiceDetailTabsNotificationsUpdateModal.vue index 0492176adf..03e94ba777 100644 --- a/apps/web/src/services/alert-manager/components/ServiceDetailTabsNotificationsUpdateModal.vue +++ b/apps/web/src/services/alert-manager/components/ServiceDetailTabsNotificationsUpdateModal.vue @@ -25,7 +25,6 @@ import ScheduleSettingForm from '@/common/components/schedule-setting-form/Sched import ErrorHandler from '@/common/composables/error/errorHandler'; import { useFormValidator } from '@/common/composables/form-validator'; import { useProxyValue } from '@/common/composables/proxy-state'; -import type { SelectedUserDropdownIdsType } from '@/common/modules/user/typte'; import UserSelectDropdown from '@/common/modules/user/UserSelectDropdown.vue'; import { useServiceDetailPageStore } from '@/services/alert-manager/stores/service-detail-page-store'; @@ -75,17 +74,20 @@ const state = reactive({ }, ])), selectedRadioIdx: 0, - selectedMemberItems: [] as SelectedUserDropdownIdsType[], + selectedMemberItems: {} as Record, isSchemaDataValid: false, isMemberDataValid: computed(() => { if (state.selectedRadioIdx === 0) { return true; } - return state.selectedMemberItems.length > 0; + if (state.selectedRadioIdx === 1) { + return (state.selectedMemberItems.USER_GROUP || []).length > 0; + } + return (state.selectedMemberItems.USER || []).length > 0; }), isAllFormValid: computed(() => { if (!name.value) return false; - return state.isForwardTypeProtocol ? state.isMemberDataValid : state.isSchemaDataValid; + return isAllValid && (state.isForwardTypeProtocol ? state.isMemberDataValid : state.isSchemaDataValid); }), }); @@ -127,8 +129,11 @@ const getProtocolInfo = (id: string): ProtocolInfo => { } : schema, }; }; +const handleFormattedSelectedIds = (value: Record) => { + state.selectedMemberItems = value; +}; const handleChangeRadio = () => { - state.selectedMemberItems = []; + state.selectedMemberItems = {} as Record; }; const handleScheduleForm = (form: ScheduleSettingFormType) => { state.scheduleForm = form; @@ -146,8 +151,8 @@ const handleConfirm = async () => { schedule: state.scheduleForm, data: !state.isForwardTypeProtocol ? state.schemaForm : { FORWARD_TYPE: state.radioMenuList[state.selectedRadioIdx].name, - USER_GROUP: state.selectedRadioIdx === 1 ? state.selectedMemberItems.map((item) => item.value) : undefined, - USER: state.selectedRadioIdx === 2 ? state.selectedMemberItems.map((item) => item.value) : undefined, + USER_GROUP: state.selectedRadioIdx === 1 ? state.selectedMemberItems.USER_GROUP : undefined, + USER: state.selectedRadioIdx === 2 ? state.selectedMemberItems.USER : undefined, }, }); showSuccessMessage(i18n.t('ALERT_MANAGER.SERVICE.ALT_S_UPDATE_SERVICE'), ''); @@ -164,17 +169,6 @@ watch(() => props.selectedItem, (selectedItem) => { if (selectedItem) { setForm('name', selectedItem.name); state.selectedRadioIdx = state.radioMenuList.findIndex((item) => item.name === selectedItem?.data.FORWARD_TYPE); - if (state.selectedRadioIdx !== 0) { - const userList: SelectedUserDropdownIdsType[] = selectedItem.data.USER?.map((i) => ({ - type: 'USER', - value: i, - })) || []; - const userGroupList: SelectedUserDropdownIdsType[] = selectedItem.data.USER_GROUP?.map((i) => ({ - type: 'USER_GROUP', - value: i, - })) || []; - state.selectedMemberItems = [...userList, ...userGroupList]; - } state.scheduleForm = selectedItem.schedule; if (selectedItem.channel_type === SERVICE_CHANNEL_TYPE.DIRECT) { state.schemaForm = selectedItem.data; @@ -188,7 +182,7 @@ watch(() => props.selectedItem, (selectedItem) => { :header-title="$t('ALERT_MANAGER.NOTIFICATIONS.MODAL_UPDATE_TITLE')" :visible.sync="state.proxyVisible" :loading="state.loading" - :disalbed="!isAllValid" + :disabled="!state.isAllFormValid" @confirm="handleConfirm" > diff --git a/apps/web/src/services/alert-manager/constants/alert-table-constant.ts b/apps/web/src/services/alert-manager/constants/alert-table-constant.ts index 459cc04233..f03d1539a6 100644 --- a/apps/web/src/services/alert-manager/constants/alert-table-constant.ts +++ b/apps/web/src/services/alert-manager/constants/alert-table-constant.ts @@ -20,9 +20,7 @@ export const ALERT_MANAGEMENT_TABLE_FIELDS: DataTableFieldType[] = [ { name: 'urgency', label: 'Urgency' }, { name: 'triggered_type', label: 'Category' }, { name: 'resources', label: 'Resource', width: '20rem' }, - // { name: 'updated_by', label: 'Updated by' }, - // { name: 'resolved_by', label: 'Resolved by' }, - // { name: 'acknowledged by', label: 'Acknowledged by' }, + { name: 'created_at', label: 'Created at' }, ]; export const ALERT_MANAGEMENT_TABLE_HANDLER: AlertManagementTableHandlerType = { keyItemSets: [{ diff --git a/packages/language-pack/console-translation-2.8.babel b/packages/language-pack/console-translation-2.8.babel index 2ed3820fa3..974bb58e2d 100644 --- a/packages/language-pack/console-translation-2.8.babel +++ b/packages/language-pack/console-translation-2.8.babel @@ -64,6 +64,27 @@ + + ACKNOWLEDGED_AT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + ADD_NOTE false @@ -379,6 +400,27 @@ + + CREATED_AT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + CREATE_ALERT false @@ -967,6 +1009,27 @@ + + RESOLVED_AT + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + RESOURCE false @@ -3570,6 +3633,27 @@ + + MODAL_MEMBER_PLACEHOLDER + false + + + + + + en-US + false + + + ja-JP + false + + + ko-KR + false + + + NO_DATA false diff --git a/packages/language-pack/en.json b/packages/language-pack/en.json index 82aa9b6a95..4f72c52f21 100644 --- a/packages/language-pack/en.json +++ b/packages/language-pack/en.json @@ -3,6 +3,7 @@ "ACTION": "Action", "ALERTS": { "ACKNOWLEDGED": "Acknowledged", + "ACKNOWLEDGED_AT": "Acknowledged at", "ADD_NOTE": "Add Note", "ALL": "All", "ALT_S_CREATE": "Alert successfully created", @@ -18,6 +19,7 @@ "COPIED": "Copied", "COPY_ALL": "Copy All", "CREATED": "Created", + "CREATED_AT": "Created at", "CREATE_ALERT": "Create Alert", "CRITICAL": "Critical", "DESC": "Description", @@ -46,6 +48,7 @@ "NO_EVENT": "No Event", "OPEN": "Open", "RESOLVED": "Resolved", + "RESOLVED_AT": "Resolved at", "RESOURCE": "Resources", "RESPONDER": "Responder", "RULE": "Rule", @@ -57,7 +60,7 @@ "TIMELINE": "Timeline", "TOOLTIP": "This is the data from the past year.", "TRIGGERED": "Triggered", - "TRIGGERED_BY": "Triggered By", + "TRIGGERED_BY": "Triggered by", "VALIDATION_NAME_UNIQUE": "An Alert with this name already exists.", "VIEW": "View", "VIEW_RESOURCE": "View resource", @@ -177,6 +180,7 @@ "MEMBERS": "Members", "MODAL_DELETE_TITLE": "Are you sure you want to delete this service?", "MODAL_EDIT_TITLE": "Edit Service Name", + "MODAL_MEMBER_PLACEHOLDER": "Select a member or more", "NO_DATA": "Create a new service.", "OPEN_ALERTS": "Open Alerts", "OVERVIEW": "Overview", diff --git a/packages/language-pack/ja.json b/packages/language-pack/ja.json index 48f3052fc4..98a27e7fda 100644 --- a/packages/language-pack/ja.json +++ b/packages/language-pack/ja.json @@ -3,6 +3,7 @@ "ACTION": "作業", "ALERTS": { "ACKNOWLEDGED": "確認", + "ACKNOWLEDGED_AT": "", "ADD_NOTE": "ノート追加", "ALL": "合計", "ALT_S_CREATE": "アラート作成に成功", @@ -18,6 +19,7 @@ "COPIED": "コピーしました", "COPY_ALL": "全てコピー", "CREATED": "作成", + "CREATED_AT": "", "CREATE_ALERT": "", "CRITICAL": "警告", "DESC": "説明", @@ -46,6 +48,7 @@ "NO_EVENT": "イベントがありません。", "OPEN": "発生", "RESOLVED": "完了", + "RESOLVED_AT": "", "RESOURCE": "リソース", "RESPONDER": "回答者", "RULE": "ルール", @@ -57,7 +60,7 @@ "TIMELINE": "タイムライン", "TOOLTIP": "", "TRIGGERED": "生成", - "TRIGGERED_BY": "生成", + "TRIGGERED_BY": "", "VALIDATION_NAME_UNIQUE": "", "VIEW": "ビュー", "VIEW_RESOURCE": "", @@ -177,6 +180,7 @@ "MEMBERS": "構成員", "MODAL_DELETE_TITLE": "", "MODAL_EDIT_TITLE": "", + "MODAL_MEMBER_PLACEHOLDER": "", "NO_DATA": "", "OPEN_ALERTS": "", "OVERVIEW": "概要", diff --git a/packages/language-pack/ko.json b/packages/language-pack/ko.json index 3fad08e55a..57e4fc3de1 100644 --- a/packages/language-pack/ko.json +++ b/packages/language-pack/ko.json @@ -3,6 +3,7 @@ "ACTION": "작업", "ALERTS": { "ACKNOWLEDGED": "확인", + "ACKNOWLEDGED_AT": "", "ADD_NOTE": "노트 추가", "ALL": "전체", "ALT_S_CREATE": "얼럿 생성 완료", @@ -18,6 +19,7 @@ "COPIED": "복사됨", "COPY_ALL": "모두 복사", "CREATED": "생성 ", + "CREATED_AT": "", "CREATE_ALERT": "", "CRITICAL": "위험 경고", "DESC": "설명", @@ -46,6 +48,7 @@ "NO_EVENT": "이벤트가 없습니다.", "OPEN": "오픈", "RESOLVED": "완료", + "RESOLVED_AT": "", "RESOURCE": "리소스", "RESPONDER": "응답자", "RULE": "규칙", @@ -57,7 +60,7 @@ "TIMELINE": "타임라인", "TOOLTIP": "", "TRIGGERED": "생성", - "TRIGGERED_BY": "생성", + "TRIGGERED_BY": "", "VALIDATION_NAME_UNIQUE": "", "VIEW": "보기", "VIEW_RESOURCE": "", @@ -177,6 +180,7 @@ "MEMBERS": "멤버", "MODAL_DELETE_TITLE": "", "MODAL_EDIT_TITLE": "", + "MODAL_MEMBER_PLACEHOLDER": "", "NO_DATA": "", "OPEN_ALERTS": "", "OVERVIEW": "전체 요약",