diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index f785d3aaf7d..458a0b73884 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -948,6 +948,7 @@ "label.expunge": "Expunge", "label.expunged": "Expunged", "label.expunging": "Expunging", +"label.export.rules": "Export Rules", "label.external.link": "External link", "label.externalid": "External Id", "label.externalloadbalanceripaddress": "External load balancer IP address", diff --git a/ui/src/utils/mixin.js b/ui/src/utils/mixin.js index 88a579cfacb..e11cbdb3905 100644 --- a/ui/src/utils/mixin.js +++ b/ui/src/utils/mixin.js @@ -90,4 +90,20 @@ const AppDeviceEnquire = { } } -export { mixin, AppDeviceEnquire, mixinDevice } +const mixinForm = { + methods: { + handleRemoveFields (form) { + const formResult = {} + Object.keys(form).forEach(field => { + if (field in this.$refs && this.$refs[field] === null || this.$refs[field] === undefined) { + return true + } + formResult[field] = form[field] + }) + + return formResult + } + } +} + +export { mixin, AppDeviceEnquire, mixinDevice, mixinForm } diff --git a/ui/src/views/compute/CreateKubernetesCluster.vue b/ui/src/views/compute/CreateKubernetesCluster.vue index 01febe24ea4..ef7d7395b10 100644 --- a/ui/src/views/compute/CreateKubernetesCluster.vue +++ b/ui/src/views/compute/CreateKubernetesCluster.vue @@ -226,11 +226,13 @@