Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3257] fix(web): add a default optional properties for fileset catalog #3393

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const CreateCatalogDialog = props => {
let properties = {}

const prevProperties = innerProps
.filter(i => i.key.trim() !== '')
.filter(i => (typeSelect === 'fileset' && i.key === 'location' ? i.value.trim() !== '' : i.key.trim() !== ''))
.reduce((acc, item) => {
acc[item.key] = item.value

Expand Down Expand Up @@ -363,7 +363,7 @@ const CreateCatalogDialog = props => {
setProviderTypes(providersItems)

const providerItem = providersItems.find(i => i.value === data.provider)
let propsItems = [...providerItem.defaultProps]
let propsItems = [...providerItem.defaultProps].filter(i => i.required)

propsItems = propsItems.map((it, idx) => {
let propItem = {
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/rootLayout/VersionView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const VersionView = () => {
const store = useAppSelector(state => state.sys)

return (
<Typography variant='subtitle2' id='gravitino_version' className={'twc-flex twc-justify-end'} sx={{ width: 200 }}>
<Typography variant='subtitle2' id='gravitino_version' className={'twc-flex twc-justify-end'}>
{store.version}
</Typography>
)
Expand Down
9 changes: 8 additions & 1 deletion web/src/lib/utils/initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ export const filesetProviders = [
{
label: 'hadoop',
value: 'hadoop',
defaultProps: []
defaultProps: [
{
key: 'location',
value: '',
required: false,
description: 'The storage location of the fileset'
}
]
}
]

Expand Down
Loading