Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#2970]fix(UI): disabled update the location property of fileset catalog (#2995)

Qian Xia6cdd9aa7e2bf
diff --git a/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js b/web/src/app/metalakes/metalake/rightContent/CreateCatalogDialog.js
index 25bb5108df..f3005fcd4f 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 => {
)}
</Box>
- {!item.required ? (
+ {!(item.required || item.disabled) ? (
<Box sx={{ minWidth: 40 }}>
<IconButton onClick={() => removeFields(index)}>
<Icon icon='mdi:minus-circle-outline' />