From 11653f9870e37bf5bb7d50c5a3a84e99796f5453 Mon Sep 17 00:00:00 2001 From: LiuYan <361112237@qq.com> Date: Mon, 25 Jul 2022 17:03:39 +0800 Subject: [PATCH] fix(RegistryConfigs): wait for sync registry configs before saving --- .../RegistryConfigs.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/shell/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue b/shell/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue index ae800fda9a..3d1338a691 100644 --- a/shell/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +++ b/shell/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue @@ -92,6 +92,19 @@ export default { 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); + } } }; @@ -116,7 +129,7 @@ export default {