Skip to content

Commit

Permalink
[apache#2970]fix(UI): disabled update the location property of filese…
Browse files Browse the repository at this point in the history
…t catalog (apache#2995)

### What changes were proposed in this pull request?

Disabled update  the "location" property item for fileset catalog
<img width="765" alt="image"
src="https://github.com/datastrato/gravitino/assets/9210625/1a5cf4f8-e659-4893-aa46-c74cbd35cacd">


### Why are the changes needed?
The "location" property of fileset catalog is immutable or reserved

Fix: apache#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
<img width="359" alt="image"
src="https://github.com/datastrato/gravitino/assets/9210625/02e8afcf-4ed0-432d-87a2-1e3e952f647d">
  • Loading branch information
LauraXia123 authored Apr 17, 2024
1 parent e2d1fd0 commit 6cdd9aa
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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}`}
Expand Down Expand Up @@ -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' />
Expand Down

0 comments on commit 6cdd9aa

Please sign in to comment.