From dda2213593060f03ea18ce6c1fb517a39a0a8ec6 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 8 Dec 2025 15:52:55 +0800 Subject: [PATCH] style: workers page no page container --- src/config/settings.ts | 2 +- src/hooks/use-update-chunk-list.ts | 1 + src/layouts/extraRender.tsx | 1 + src/layouts/index.tsx | 3 ++- src/pages/resources/hooks/use-worker-columns.tsx | 3 +-- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/config/settings.ts b/src/config/settings.ts index b61dec61..e5814673 100644 --- a/src/config/settings.ts +++ b/src/config/settings.ts @@ -7,5 +7,5 @@ export const DEFAULT_ENTER_PAGE = { login: '/login' }; -export const GPUSTACK_API_BASE_URL = 'v1'; +export const GPUSTACK_API_BASE_URL = 'v2'; export const OPENAI_COMPATIBLE = 'v1'; diff --git a/src/hooks/use-update-chunk-list.ts b/src/hooks/use-update-chunk-list.ts index 24c7f0cc..10808cf6 100644 --- a/src/hooks/use-update-chunk-list.ts +++ b/src/hooks/use-update-chunk-list.ts @@ -31,6 +31,7 @@ export function useUpdateChunkedList(options: { cacheDataListRef.current = [...(options.dataList || [])]; }, [options.dataList]); + // use to clear the table row selection after delete const setDeletedIds = (ids: number[]) => { deletedIdsRef.current = new Set([...deletedIdsRef.current, ...ids]); }; diff --git a/src/layouts/extraRender.tsx b/src/layouts/extraRender.tsx index 6860c38f..818dc85e 100644 --- a/src/layouts/extraRender.tsx +++ b/src/layouts/extraRender.tsx @@ -117,6 +117,7 @@ export const ExtraContent = (props: { isDarkTheme?: boolean }) => { const loginPath = DEFAULT_ENTER_PAGE.login; + // only admin can see upgrade info, and current version is a prod version(exclude dev/rc) const showUpgrade = useMemo(() => { return ( initialState?.currentUser?.is_admin && diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 75b124a9..e91667b5 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -45,7 +45,8 @@ const NO_CONTAINER_PAGES = [ 'image', 'text2images', 'clusterDetail', - 'clusterCreate' + 'clusterCreate', + 'workers' ]; const loginPath = DEFAULT_ENTER_PAGE.login; diff --git a/src/pages/resources/hooks/use-worker-columns.tsx b/src/pages/resources/hooks/use-worker-columns.tsx index 72898d7e..10b59815 100644 --- a/src/pages/resources/hooks/use-worker-columns.tsx +++ b/src/pages/resources/hooks/use-worker-columns.tsx @@ -6,7 +6,6 @@ import InfoColumn from '@/components/simple-table/info-column'; import StatusTag from '@/components/status-tag'; import { convertFileSize } from '@/utils'; import { - CodeOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, @@ -50,7 +49,7 @@ const ActionList = [ // key: 'logs', // icon: // }, - { label: 'common.button.terminal', key: 'terminal', icon: }, + // { label: 'common.button.terminal', key: 'terminal', icon: }, { label: 'common.button.delete', key: 'delete',