fix: select gpu stype when creating cluster from gpu service

This commit is contained in:
jialin
2026-06-17 12:35:24 +08:00
committed by jialin
parent 1f5678f781
commit aa49539210
7 changed files with 45 additions and 14 deletions
@@ -6,10 +6,10 @@ import ClusterCreate from './cluster-create';
interface ClusterModalProps {
open: boolean;
title: string;
// When set, ClusterCreate preselects this provider and skips the
// provider-catalog step. Used by feature pages (e.g. GPU Service)
// whose empty state already implies which kind of cluster is needed.
providerHint?: string;
pendingProviderHint?: {
providerHint?: string;
presetClusterType?: 'model' | 'gpu';
};
onClose: () => void;
}
@@ -17,7 +17,7 @@ const ClusterModal: React.FC<ClusterModalProps> = ({
open,
onClose,
title,
providerHint
pendingProviderHint
}) => {
const [currentTitle, setCurrentTitle] = React.useState<string>(title);
const handleCancel = () => {
@@ -46,7 +46,8 @@ const ClusterModal: React.FC<ClusterModalProps> = ({
<ClusterCreate
onClose={handleCancel}
action={PageAction.CREATE}
providerHint={providerHint}
providerHint={pendingProviderHint?.providerHint}
presetClusterType={pendingProviderHint?.presetClusterType}
setCurrentTitle={setCurrentTitle}
></ClusterCreate>
</GSDrawer>