fix: update open playground btn
This commit is contained in:
@@ -13,11 +13,12 @@ import { PageActionType } from '@/config/types';
|
||||
import useBodyScroll from '@/hooks/use-body-scroll';
|
||||
import useExpandedRowKeys from '@/hooks/use-expanded-row-keys';
|
||||
import useTableRowSelection from '@/hooks/use-table-row-selection';
|
||||
import useWatchList from '@/hooks/use-watch-list';
|
||||
import PageBox from '@/pages/_components/page-box';
|
||||
import useNoResourceResult from '@/pages/llmodels/hooks/use-no-resource-result';
|
||||
import { MODEL_ROUTE_TARGETS } from '@/pages/model-routes/apis';
|
||||
import { TargetStatusValueMap } from '@/pages/model-routes/config';
|
||||
import useOpenPlayground from '@/pages/model-routes/hooks/use-open-playground';
|
||||
import useQueryTargets from '@/pages/model-routes/services/use-query-targets';
|
||||
import useGranfanaLink from '@/pages/resources/hooks/use-grafana-link';
|
||||
import { handleBatchRequest } from '@/utils';
|
||||
import { DownOutlined, SearchOutlined, SyncOutlined } from '@ant-design/icons';
|
||||
@@ -166,11 +167,8 @@ const Models: React.FC<ModelsProps> = ({
|
||||
useFilterStatus({
|
||||
onStatusChange: onStatusChange
|
||||
});
|
||||
const { fetchData: fetchTargets, dataList: targetList } = useQueryTargets();
|
||||
const { watchDataList: targetList } = useWatchList(MODEL_ROUTE_TARGETS);
|
||||
|
||||
useEffect(() => {
|
||||
fetchTargets({});
|
||||
}, []);
|
||||
const { goToGrafana, ActionButton } = useGranfanaLink({
|
||||
type: 'model',
|
||||
dataList: dataSource || []
|
||||
@@ -554,7 +552,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
sortOrder,
|
||||
targetList: targetList
|
||||
};
|
||||
}, [handleSelect, clusterList, sortOrder]);
|
||||
}, [handleSelect, clusterList, sortOrder, targetList]);
|
||||
|
||||
const columns = useModelsColumns(options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user