From 77e92432ed6501048b80b4a528635f1d01146462 Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 11 Jun 2026 18:45:02 +0800 Subject: [PATCH] fix: changed notice always display --- plugin.ts | 2 ++ src/pages/cluster-management/components/cluster-form.tsx | 4 ---- src/pages/cluster-management/components/k8s-pod-spec.tsx | 6 +++--- src/pages/cluster-management/step-forms/advance-config.tsx | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugin.ts b/plugin.ts index eee12a56..13556332 100644 --- a/plugin.ts +++ b/plugin.ts @@ -5,6 +5,8 @@ export default (api: IApi) => { const info = JSON.parse(process.env.VERSION || '{}'); const env = process.env.NODE_ENV; + $('html').attr('lang', 'en'); + $('html').attr('data-env', env); $('html').attr( diff --git a/src/pages/cluster-management/components/cluster-form.tsx b/src/pages/cluster-management/components/cluster-form.tsx index 1d9b6014..1d8f3f03 100644 --- a/src/pages/cluster-management/components/cluster-form.tsx +++ b/src/pages/cluster-management/components/cluster-form.tsx @@ -263,10 +263,6 @@ const ClusterForm: React.FC = forwardRef( name="description" rules={[{ required: false }]} - // For Kubernetes the cluster type selector follows directly, so - // fall back to the default item margin (matching the name field) - // to keep the description spacing symmetric; other providers keep - // the tighter gap before the advanced panel. style={{ marginBottom: provider === ProviderValueMap.Kubernetes ? undefined : 8 diff --git a/src/pages/cluster-management/components/k8s-pod-spec.tsx b/src/pages/cluster-management/components/k8s-pod-spec.tsx index 7e504739..289a0d69 100644 --- a/src/pages/cluster-management/components/k8s-pod-spec.tsx +++ b/src/pages/cluster-management/components/k8s-pod-spec.tsx @@ -56,7 +56,6 @@ export const OperatorImageForm: React.FC = () => { value || null} > { ({ sourceType, ...rest }: any) => rest ); } - return cloned; + return _.pickBy(cloned, (value: any) => !_.isNil(value)); }; // Custom comparator for isEqualWith: treats null, undefined, empty strings, @@ -312,7 +311,8 @@ const nullishCustomizer = (val1: any, val2: any) => { (val1 == null && val2 === '') || (val1 === '' && val2 == null) || (_.isEmpty(val1) && val2 == null) || - (val1 == null && _.isEmpty(val2)) + (val1 == null && _.isEmpty(val2)) || + (_.isNil(val1) && _.isNil(val2)) ) { return true; } diff --git a/src/pages/cluster-management/step-forms/advance-config.tsx b/src/pages/cluster-management/step-forms/advance-config.tsx index 64fc2bc7..0ab3a2b4 100644 --- a/src/pages/cluster-management/step-forms/advance-config.tsx +++ b/src/pages/cluster-management/step-forms/advance-config.tsx @@ -97,7 +97,6 @@ const ClusterAdvanceConfig: React.FC<{ this column). */} name="system_default_container_registry" - style={{ marginBottom: 16 }} normalize={(value) => value?.trim?.() || null} >