From 6cdd9aa7e2bf22f1f49be2a65f0dca1779c3ead3 Mon Sep 17 00:00:00 2001 From: Qian Xia Date: Wed, 17 Apr 2024 19:56:54 +0800 Subject: [PATCH] [#2970]fix(UI): disabled update the location property of fileset catalog (#2995) ### What changes were proposed in this pull request? Disabled update the "location" property item for fileset catalog image ### Why are the changes needed? The "location" property of fileset catalog is immutable or reserved Fix: #2970 ### Does this PR introduce _any_ user-facing change? Edit a fileset catalog and open the dialog ### How was this patch tested? local e2e test image --- .../metalakes/metalake/rightContent/CreateCatalogDialog.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js b/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js index 25bb5108df6..f3005fcd4f5 100644 --- a/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js +++ b/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js @@ -386,7 +386,8 @@ const CreateCatalogDialog = props => { if (findPropIndex === -1) { let propItem = { key: item, - value: properties[item] + value: properties[item], + disabled: data.type === 'fileset' && item === 'location' && type === 'update' } propsItems.push(propItem) } @@ -552,7 +553,7 @@ const CreateCatalogDialog = props => { name='key' label='Key' value={item.key} - disabled={item.required} + disabled={item.required || item.disabled} onChange={event => handleFormChange({ index, event })} error={item.hasDuplicateKey} data-refer={`props-key-${index}`} @@ -591,7 +592,7 @@ const CreateCatalogDialog = props => { )} - {!item.required ? ( + {!(item.required || item.disabled) ? ( removeFields(index)}>