diff --git a/frontend/providers/applaunchpad/src/pages/api/platform/getInitData.ts b/frontend/providers/applaunchpad/src/pages/api/platform/getInitData.ts index c96f2e57091..9bdde7bf9b4 100644 --- a/frontend/providers/applaunchpad/src/pages/api/platform/getInitData.ts +++ b/frontend/providers/applaunchpad/src/pages/api/platform/getInitData.ts @@ -50,6 +50,14 @@ export const defaultAppConfig: AppConfigType = { } }; +process.on('unhandledRejection', (reason, promise) => { + console.error(`Caught unhandledRejection:`, reason, promise); +}); + +process.on('uncaughtException', (err) => { + console.error(`Caught uncaughtException:`, err); +}); + export default async function handler(req: NextApiRequest, res: NextApiResponse) { try { if (!global.AppConfig || process.env.NODE_ENV !== 'production') { diff --git a/frontend/providers/applaunchpad/src/store/static.ts b/frontend/providers/applaunchpad/src/store/static.ts index 6b5005026ac..185e66600af 100644 --- a/frontend/providers/applaunchpad/src/store/static.ts +++ b/frontend/providers/applaunchpad/src/store/static.ts @@ -40,7 +40,7 @@ export const serverLoadInitData = () => { try { SEALOS_DOMAIN = global.AppConfig.cloud.domain || 'cloud.sealos.io'; DOMAIN_PORT = global.AppConfig.cloud.port || ''; - INGRESS_SECRET = global.AppConfig.cloud.domain || 'wildcard-cert'; + INGRESS_SECRET = global.AppConfig.launchpad.ingressTlsSecretName || 'wildcard-cert'; SHOW_EVENT_ANALYZE = global.AppConfig.launchpad.eventAnalyze.enabled; } catch (error) {} }; diff --git a/frontend/providers/workorder/src/api/user.ts b/frontend/providers/workorder/src/api/user.ts index 99137f9c4a0..8bfef9a00eb 100644 --- a/frontend/providers/workorder/src/api/user.ts +++ b/frontend/providers/workorder/src/api/user.ts @@ -3,7 +3,9 @@ import { RegionDB } from '@/types/region'; import { AppSession, UserDB } from '@/types/user'; export const findUserById = ({ orderId }: { orderId: string }) => - GET<{ user: UserDB; regionInfo: RegionDB }>('/api/auth/findById', { orderId: orderId }); + GET<{ user: UserDB; regionInfo: RegionDB; workorderLink: string }>('/api/auth/findById', { + orderId: orderId + }); export const AuthByDesktopSession = (payload: { token: string }) => POST('/api/auth/desktop', payload); diff --git a/frontend/providers/workorder/src/pages/api/auth/findById.ts b/frontend/providers/workorder/src/pages/api/auth/findById.ts index 16d91582d91..b78d235a557 100644 --- a/frontend/providers/workorder/src/pages/api/auth/findById.ts +++ b/frontend/providers/workorder/src/pages/api/auth/findById.ts @@ -33,7 +33,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) jsonRes(res, { data: { user: result?.userInfo, - regionInfo: regionInfo + regionInfo: regionInfo, + workorderLink: `https://hzh.sealos.run/?openapp=system-workorder?orderId=${orderId}` } }); } catch (error) { diff --git a/frontend/providers/workorder/src/pages/workorder/detail/components/AppBaseInfo.tsx b/frontend/providers/workorder/src/pages/workorder/detail/components/AppBaseInfo.tsx index ede9d888800..9d11d1acb96 100644 --- a/frontend/providers/workorder/src/pages/workorder/detail/components/AppBaseInfo.tsx +++ b/frontend/providers/workorder/src/pages/workorder/detail/components/AppBaseInfo.tsx @@ -31,7 +31,7 @@ const AppBaseInfo = ({ app }: { app: WorkOrderDB }) => { window.open(fileUrl); }; - const { data: userInfo } = useQuery( + const { data: workorderInfo } = useQuery( ['findUserById'], () => findUserById({ orderId: app?.orderId || '' }), { @@ -158,17 +158,20 @@ const AppBaseInfo = ({ app }: { app: WorkOrderDB }) => { gap={'4px'} cursor={'pointer'} > - copyData(userInfo?.user?.userId || '')}> - userID: {userInfo?.user?.userId} + copyData(workorderInfo?.user?.userId || '')}> + userID: {workorderInfo?.user?.userId} - copyData(userInfo?.user?.userCrName || '')}> - userCrName: {userInfo?.user?.userCrName} + copyData(workorderInfo?.user?.userCrName || '')}> + userCrName: {workorderInfo?.user?.userCrName} - copyData(userInfo?.user?.workspaceId || '')}> - workspaceId: {userInfo?.user?.workspaceId} + copyData(workorderInfo?.user?.workspaceId || '')}> + workspaceId: {workorderInfo?.user?.workspaceId} - copyData(userInfo?.regionInfo?.sealosRegionDomain || '')}> - region: {userInfo?.regionInfo?.sealosRegionDomain} + copyData(workorderInfo?.regionInfo?.sealosRegionDomain || '')}> + region: {workorderInfo?.regionInfo?.sealosRegionDomain} + + copyData(workorderInfo?.workorderLink || '')}> + workorderLink: {workorderInfo?.workorderLink} diff --git a/frontend/providers/workorder/src/pages/workorders/components/List.tsx b/frontend/providers/workorder/src/pages/workorders/components/List.tsx index cf0c2abbf89..8c0541a4ced 100644 --- a/frontend/providers/workorder/src/pages/workorders/components/List.tsx +++ b/frontend/providers/workorder/src/pages/workorders/components/List.tsx @@ -75,7 +75,13 @@ const OrderList = ({ key: 'description', render: (item: WorkOrderDB) => { return ( - + {item.description} );