From eab53fc9b0a5d6cd9a02f511564b9d859d3d508c Mon Sep 17 00:00:00 2001 From: nayeongkim Date: Fri, 3 Jan 2025 14:44:30 +0900 Subject: [PATCH 1/2] feat: apply opsFlow route at v1 Signed-off-by: NaYeong,Kim --- apps/web/src/router/alert-manager-v1-admin-routes.ts | 2 ++ apps/web/src/router/alert-manager-v1-workspace-routes.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/web/src/router/alert-manager-v1-admin-routes.ts b/apps/web/src/router/alert-manager-v1-admin-routes.ts index ef54c9fca9..50d262496d 100644 --- a/apps/web/src/router/alert-manager-v1-admin-routes.ts +++ b/apps/web/src/router/alert-manager-v1-admin-routes.ts @@ -6,6 +6,7 @@ import adminCostExplorerRoutes from '@/services/cost-explorer/routes/admin/route import adminDashboardsRoutes from '@/services/dashboards/routes/admin/routes'; import adminIamRoutes from '@/services/iam/routes/admin/routes'; import adminInfoRoute from '@/services/info/routes/admin/routes'; +import adminOpsFlowRoutes from '@/services/ops-flow/routes/admin/routes'; import adminWorkspaceHomeRoutes from '@/services/workspace-home/routes/admin/routes'; @@ -17,4 +18,5 @@ export const alertManagerV1AdminRoutes: RouteConfig[] = [ adminIamRoutes, adminAdvancedRoutes, adminInfoRoute, + adminOpsFlowRoutes, ]; diff --git a/apps/web/src/router/alert-manager-v1-workspace-routes.ts b/apps/web/src/router/alert-manager-v1-workspace-routes.ts index b1ab71d2c1..51aa16aa08 100644 --- a/apps/web/src/router/alert-manager-v1-workspace-routes.ts +++ b/apps/web/src/router/alert-manager-v1-workspace-routes.ts @@ -6,6 +6,7 @@ import costExplorerRoute from '@/services/cost-explorer/routes/routes'; import dashboardsRoute from '@/services/dashboards/routes/routes'; import iamRoutes from '@/services/iam/routes/routes'; import infoRoute from '@/services/info/routes/routes'; +import opsFlowRoutes from '@/services/ops-flow/routes/routes'; import projectRouteV1 from '@/services/project-v1/routes/routes'; import workspaceHomeRoute from '@/services/workspace-home/routes/routes'; @@ -19,4 +20,5 @@ export const alertManagerV1WorkspaceRoutes: RouteConfig[] = [ alertManagerRouteV1, costExplorerRoute, infoRoute, + opsFlowRoutes, ]; From da1d152ad94e87b2b2c4d6a2f3b5fe4f59d21069 Mon Sep 17 00:00:00 2001 From: nayeongkim Date: Fri, 3 Jan 2025 15:12:48 +0900 Subject: [PATCH 2/2] feat: apply user select dropdown at opsFlow Signed-off-by: NaYeong,Kim --- .../modules/user/UserSelectDropdown.vue | 38 ++++++++++++------- .../ops-flow/components/BoardTaskFilters.vue | 12 ++++-- .../ops-flow/components/TaskTypeForm.vue | 6 ++- .../field-templates/UserTaskField.vue | 6 ++- 4 files changed, 41 insertions(+), 21 deletions(-) diff --git a/apps/web/src/common/modules/user/UserSelectDropdown.vue b/apps/web/src/common/modules/user/UserSelectDropdown.vue index 75d508a833..352691532d 100644 --- a/apps/web/src/common/modules/user/UserSelectDropdown.vue +++ b/apps/web/src/common/modules/user/UserSelectDropdown.vue @@ -37,13 +37,16 @@ const props = withDefaults(defineProps<{ selectedId?: string; selectedIds?: string[]; selectionType?: 'single'|'multiple'; + appearanceType?: 'badge'|'stack'; + styleType?: string; + block?: boolean; useFixedMenuStyle?: boolean; + selectionLabel?: string; invalid?: boolean; disabled?: boolean; readonly?: boolean; userPool?: string[]; userGroupPool?: string[]; - appearanceType?: 'badge'|'stack'; showUserList?: boolean; showUserGroupList?: boolean; showCategoryTitle?: boolean; @@ -53,12 +56,16 @@ const props = withDefaults(defineProps<{ selectedId: undefined, selectedIds: undefined, selectionType: 'single', + appearanceType: 'stack', + styleType: undefined, + block: undefined, useFixedMenuStyle: false, + selectionLabel: undefined, invalid: false, disabled: false, + readonly: false, userPool: undefined, userGroupPool: undefined, - appearanceType: 'badge', showUserList: true, showUserGroupList: true, showCategoryTitle: true, @@ -134,7 +141,7 @@ const state = reactive({ 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 _totalCount = Number((pageStart - 1 || 0) + pageLimit); const filterItems = (items: SelectDropdownMenuItem[]) => items.filter((item) => getTextHighlightRegex(keyword).test(item.name)).slice(pageStart - 1, _totalCount); if (resultIndex === undefined) { @@ -149,7 +156,7 @@ const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, page } return { results: _slicedItems, - more: _totalCount < items.length, + more: pageLimit <= _slicedItems.length - 1 && _totalCount < items.length, }; }); } @@ -160,7 +167,7 @@ const menuItemsHandler = (): AutocompleteHandler => async (keyword: string, page if (i !== resultIndex) return { results: [], title: c.title }; return { results: _slicedItems, - more: _totalCount < items.length, + more: pageLimit <= _slicedItems.length - 1 && _totalCount < items.length, }; }); }; @@ -248,20 +255,23 @@ watch([() => props.selectedId, () => props.selectedIds], ([newUserId, newUserIds