fix: add worker token do not update
This commit is contained in:
@@ -36,6 +36,7 @@ import PoolRows from './components/pool-rows';
|
||||
import { ProviderType, ProviderValueMap } from './config';
|
||||
import {
|
||||
ClusterListItem,
|
||||
CredentialListItem,
|
||||
ClusterFormData as FormData,
|
||||
ClusterListItem as ListItem,
|
||||
NodePoolFormData
|
||||
@@ -231,7 +232,7 @@ const Clusters: React.FC = () => {
|
||||
useEffect(() => {
|
||||
const fetchCredentialList = async () => {
|
||||
const data = await queryCredentialList({ page: -1 });
|
||||
const list = data?.items?.map((item) => ({
|
||||
const list = data?.items?.map((item: CredentialListItem) => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
}));
|
||||
|
||||
@@ -79,6 +79,9 @@ const AddWorker: React.FC<AddWorkerProps> = (props) => {
|
||||
if (open && cluster_id && firstLoad.current) {
|
||||
handleOnClusterChange(cluster_id);
|
||||
}
|
||||
return () => {
|
||||
firstLoad.current = true;
|
||||
};
|
||||
}, [open, cluster_id]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user