mirror of https://github.com/rancher/dashboard.git
fix(RegistryConfigs): wait for sync registry configs before saving
This commit is contained in:
parent
6759fe5d95
commit
11653f9870
|
|
@ -92,6 +92,19 @@ export default {
|
||||||
|
|
||||||
set(this.value, 'spec.rkeConfig.registries.configs', configs);
|
set(this.value, 'spec.rkeConfig.registries.configs', configs);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
wrapRegisterBeforeHook(fn, ...args) {
|
||||||
|
async function wrapFn(...params) {
|
||||||
|
const result = await fn(...params);
|
||||||
|
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(result);
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.clusterRegisterBeforeHook(wrapFn, ...args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -116,7 +129,7 @@ export default {
|
||||||
|
|
||||||
<SelectOrCreateAuthSecret
|
<SelectOrCreateAuthSecret
|
||||||
v-model="row.value.authConfigSecretName"
|
v-model="row.value.authConfigSecretName"
|
||||||
:register-before-hook="clusterRegisterBeforeHook"
|
:register-before-hook="wrapRegisterBeforeHook"
|
||||||
:append-unique-id-to-hook="true"
|
:append-unique-id-to-hook="true"
|
||||||
in-store="management"
|
in-store="management"
|
||||||
:allow-ssh="false"
|
:allow-ssh="false"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue