fix: cluster worker config issues

This commit is contained in:
jialin
2025-12-18 17:29:07 +08:00
parent e83bff6923
commit 78368e9979
21 changed files with 112 additions and 43 deletions
@@ -30,7 +30,7 @@ const Container = styled.div`
* clusterList and onClusterChange are only required when from worker page.
*/
type AddWorkerProps = {
isModal?: boolean;
actionSource?: 'modal' | 'page';
provider: ProviderType;
clusterList?: Global.BaseOption<number, ClusterListItem>[];
clusterLoading?: boolean;
@@ -51,7 +51,7 @@ type AddWorkerProps = {
*/
const AddWorkerSteps: React.FC<AddWorkerProps> = (props) => {
const {
isModal = false,
actionSource,
registrationInfo,
provider,
clusterList,
@@ -81,10 +81,12 @@ const AddWorkerSteps: React.FC<AddWorkerProps> = (props) => {
}, [stepList]);
React.useEffect(() => {
if (!isModal) {
// this effect is only triggered when used in cluster create page
console.log('actionSource:', actionSource);
if (actionSource === 'page') {
createModelsChunkRequest();
}
}, [isModal]);
}, [actionSource]);
return (
<AddWorkerContext.Provider