This is an automated email from the ASF dual-hosted git repository.
lauraxia pushed a commit to branch antdUI-gravitino-base1.1.0
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/antdUI-gravitino-base1.1.0 by
this push:
new 4f515ffd62
[#9621][#9661][#9664][#9674][#9675][#9676][#9677][#9679][#9680][#9681][#9682][#9685][#9686][#9687][#9688][#9692][#9693][#9695][#9701][#9702]
fix issues
4f515ffd62 is described below
commit 4f515ffd62b345caa5919205dedb2a87709ef141
Author: Qian Xia <[email protected]>
AuthorDate: Wed Jan 14 19:11:23 2026 +0800
[#9621][#9661][#9664][#9674][#9675][#9676][#9677][#9679][#9680][#9681][#9682][#9685][#9686][#9687][#9688][#9692][#9693][#9695][#9701][#9702]
fix issues
---
web/web/src/app/access/roles/CreateRoleDialog.js | 2 +-
.../app/access/userGroups/AddUserGroupDialog.js | 2 +-
.../userGroups/GrantRolesForUserGroupDialog.js | 2 +-
web/web/src/app/access/users/AddUserDialog.js | 2 +-
.../app/access/users/GrantRolesForUserDialog.js | 2 +-
.../catalogs/rightContent/CreateCatalogDialog.js | 27 +++++----
.../catalogs/rightContent/CreateFilesetDialog.js | 2 +-
.../catalogs/rightContent/CreateSchemaDialog.js | 2 +-
.../app/catalogs/rightContent/CreateTableDialog.js | 12 ++--
.../app/catalogs/rightContent/CreateTopicDialog.js | 2 +-
.../catalogs/rightContent/RegisterModelDialog.js | 2 +-
.../rightContent/entitiesContent/CatalogsPage.js | 1 +
.../entitiesContent/SchemaDetailsPage.js | 2 +-
.../app/compliance/policies/CreatePolicyDialog.js | 6 +-
web/web/src/app/compliance/tags/CreateTagDialog.js | 2 +-
web/web/src/app/jobTemplates/page.js | 17 +++++-
web/web/src/app/jobs/CreateJobDialog.js | 6 +-
web/web/src/app/jobs/RegisterJobTemplateDialog.js | 18 +++---
web/web/src/app/jobs/page.js | 2 +-
web/web/src/app/login/components/DefaultLogin.js | 2 +-
web/web/src/app/metalakes/CreateMetalakeDialog.js | 2 +-
web/web/src/app/rootLayout/UserSetting.js | 21 +++++--
web/web/src/components/EntityPropertiesFormItem.js | 2 +-
.../src/components/SecurableObjectFormFields.js | 12 ++--
web/web/src/components/SetOwnerDialog.js | 16 ++++--
.../src/components/SpecialColumnTypeComponent.js | 2 +-
web/web/src/config/catalog.js | 64 ++++++++++++----------
web/web/src/config/index.js | 4 +-
web/web/src/config/regex.js | 24 --------
web/web/src/lib/styles/antdStyles/globals.css | 4 +-
web/web/src/lib/utils/index.js | 15 +++++
web/web/src/lib/utils/regex.js | 2 +
32 files changed, 164 insertions(+), 117 deletions(-)
diff --git a/web/web/src/app/access/roles/CreateRoleDialog.js
b/web/web/src/app/access/roles/CreateRoleDialog.js
index 8847793ff7..03ac8872de 100644
--- a/web/web/src/app/access/roles/CreateRoleDialog.js
+++ b/web/web/src/app/access/roles/CreateRoleDialog.js
@@ -24,7 +24,7 @@ import Icons from '@/components/Icons'
import SecurableObjectFormFields from '@/components/SecurableObjectFormFields'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages, mismatchName } from '@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { useScrolling } from 'react-use'
import { dialogContentMaxHeigth } from '@/config'
diff --git a/web/web/src/app/access/userGroups/AddUserGroupDialog.js
b/web/web/src/app/access/userGroups/AddUserGroupDialog.js
index 676e5f6b95..e16a311e9e 100644
--- a/web/web/src/app/access/userGroups/AddUserGroupDialog.js
+++ b/web/web/src/app/access/userGroups/AddUserGroupDialog.js
@@ -20,7 +20,7 @@
import React, { useState } from 'react'
import { Form, Input, Modal, Typography } from 'antd'
import { validateMessages, mismatchName } from '@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { createUserGroup } from '@/lib/store/userGroups'
import { useAppDispatch } from '@/lib/hooks/useStore'
diff --git a/web/web/src/app/access/userGroups/GrantRolesForUserGroupDialog.js
b/web/web/src/app/access/userGroups/GrantRolesForUserGroupDialog.js
index dd4b9c2d88..e2ec0b45ee 100644
--- a/web/web/src/app/access/userGroups/GrantRolesForUserGroupDialog.js
+++ b/web/web/src/app/access/userGroups/GrantRolesForUserGroupDialog.js
@@ -94,7 +94,7 @@ export default function CreateRoleDialog({ ...props }) {
confirmLoading={confirmLoading}
onCancel={handleCancel}
>
- <Paragraph type='secondary'>Grant the role to user
{userGroup.name}.</Paragraph>
+ <Paragraph type='secondary'>Grant the role to user group
{userGroup.name}.</Paragraph>
<Form
form={form}
initialValues={defaultValues}
diff --git a/web/web/src/app/access/users/AddUserDialog.js
b/web/web/src/app/access/users/AddUserDialog.js
index 11b048c78f..197974a347 100644
--- a/web/web/src/app/access/users/AddUserDialog.js
+++ b/web/web/src/app/access/users/AddUserDialog.js
@@ -20,7 +20,7 @@
import React, { useState } from 'react'
import { Form, Input, Modal, Typography } from 'antd'
import { validateMessages, mismatchName } from '@/config'
-import { usernameRegex } from '@/config/regex'
+import { usernameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { createUser } from '@/lib/store/users'
import { useAppDispatch } from '@/lib/hooks/useStore'
diff --git a/web/web/src/app/access/users/GrantRolesForUserDialog.js
b/web/web/src/app/access/users/GrantRolesForUserDialog.js
index 980f4a61bb..f2e2c34f4f 100644
--- a/web/web/src/app/access/users/GrantRolesForUserDialog.js
+++ b/web/web/src/app/access/users/GrantRolesForUserDialog.js
@@ -90,7 +90,7 @@ export default function GrantRolesForUserDialog({ ...props })
{
confirmLoading={confirmLoading}
onCancel={handleCancel}
>
- <Paragraph type='secondary'>{`Grant the role to user group
${user.name}.`}</Paragraph>
+ <Paragraph type='secondary'>{`Grant the role to user
${user.name}.`}</Paragraph>
<Form
form={form}
initialValues={defaultValues}
diff --git a/web/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
b/web/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
index eba0a921ea..2cac92bd8a 100644
--- a/web/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
+++ b/web/web/src/app/catalogs/rightContent/CreateCatalogDialog.js
@@ -42,7 +42,7 @@ import {
regionOptions,
relationalProviders
} from '@/config/catalog'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
@@ -75,6 +75,7 @@ export default function CreateCatalogDialog({ ...props }) {
const authType = Form.useWatch('authentication.type', { form, preserve: true
})
const values = Form.useWatch([], form)
const dispatch = useAppDispatch()
+ const isShowTestConnect = ['fileset', 'model'].includes(catalogType) ||
currentProvider === 'lakehouse-generic'
const defaultValues = {
name: '',
@@ -84,6 +85,18 @@ export default function CreateCatalogDialog({ ...props }) {
properties: []
}
+ const getDialogDescription = () => {
+ if (editCatalog) {
+ return `Edit the catalog ${editCatalog}.`
+ }
+
+ if (step === 0 && !['model', 'fileset'].includes(catalogType)) {
+ return 'Select a data source provider to create the data catalog.'
+ }
+
+ return 'Fill-in the information into the following fields to create a data
catalog.'
+ }
+
useResetFormOnCloseModal(
{
form,
@@ -413,13 +426,7 @@ export default function CreateCatalogDialog({ ...props }) {
onCancel={handleCancel}
footer={null}
>
- <Paragraph type='secondary'>
- {step === 0
- ? 'Select a data source provider to create the data catalog.'
- : !editCatalog
- ? 'Fill-in the information into the following fields to create a
data catalog.'
- : `Edit the catalog ${editCatalog}.`}
- </Paragraph>
+ <Paragraph type='secondary'>{getDialogDescription()}</Paragraph>
<Flex gap='middle' align='start'>
<Steps
current={step}
@@ -538,7 +545,7 @@ export default function CreateCatalogDialog({ ...props }) {
)}
</Form.List>
</Form.Item>
- {!editCatalog && !['fileset',
'model'].includes(catalogType) && (
+ {!editCatalog && !isShowTestConnect && (
<Tooltip
title='Test the connection to the source system with
the given information.'
placement='right'
@@ -554,7 +561,7 @@ export default function CreateCatalogDialog({ ...props }) {
</Button>
</Tooltip>
)}
- {testResult.code !== -1 && !['fileset',
'model'].includes(catalogType) && (
+ {testResult.code !== -1 && !isShowTestConnect && (
<p
ref={testRef}
style={{ color: testResult.code === 0 ?
token.colorSuccessText : token.colorWarningText }}
diff --git a/web/web/src/app/catalogs/rightContent/CreateFilesetDialog.js
b/web/web/src/app/catalogs/rightContent/CreateFilesetDialog.js
index 561cbe61bf..fe5a63fee6 100644
--- a/web/web/src/app/catalogs/rightContent/CreateFilesetDialog.js
+++ b/web/web/src/app/catalogs/rightContent/CreateFilesetDialog.js
@@ -29,7 +29,7 @@ import Icons from '@/components/Icons'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { dialogContentMaxHeigth, validateMessages, mismatchName } from
'@/config'
import { filesetLocationProviders } from '@/config/catalog'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
diff --git a/web/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
b/web/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
index b44a450958..2e290a5106 100644
--- a/web/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
+++ b/web/web/src/app/catalogs/rightContent/CreateSchemaDialog.js
@@ -28,7 +28,7 @@ import { TreeRefContext } from '../page'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { dialogContentMaxHeigth, validateMessages, mismatchName } from
'@/config'
import { filesetLocationProviders } from '@/config/catalog'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
diff --git a/web/web/src/app/catalogs/rightContent/CreateTableDialog.js
b/web/web/src/app/catalogs/rightContent/CreateTableDialog.js
index 3d0bdfeee7..dc34685399 100644
--- a/web/web/src/app/catalogs/rightContent/CreateTableDialog.js
+++ b/web/web/src/app/catalogs/rightContent/CreateTableDialog.js
@@ -67,7 +67,7 @@ import {
transformsLimitMap
} from '@/config'
import { tableDefaultProps } from '@/config/catalog'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { capitalizeFirstLetter, genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
import { createTable, updateTable, getTableDetails } from
'@/lib/store/metalakes'
@@ -584,7 +584,7 @@ export default function CreateTableDialog({ ...props }) {
default:
column['defaultValue'] = {
type: 'literal',
- dataType: 'string',
+ dataType: col.defaultValue?.dataType || 'string',
value: col.defaultValue?.value
}
}
@@ -857,7 +857,7 @@ export default function CreateTableDialog({ ...props }) {
if (autoIncrementInfo.uniqueCheck) {
const names = form
.getFieldValue('indexes')
- ?.filter(idx =>
idx?.indexType?.toLowerCase() === 'unique_key')
+ ?.filter(idx => ['unique_key',
'primary_key'].includes(idx?.indexType?.toLowerCase()))
.map(col => col?.fieldName)
?.flat()
if
(!names?.includes(form.getFieldValue('columns')[subField.name].name)) {
@@ -1299,7 +1299,11 @@ export default function CreateTableDialog({ ...props }) {
<Form.Item
name='name'
label='Table Name'
- rules={[{ required: true }, { type: 'string', max: 64 }, {
pattern: new RegExp(nameRegex) }]}
+ rules={[
+ { required: true, message: `Please enter the table name!`
},
+ { type: 'string', max: 64 },
+ { pattern: new RegExp(nameRegex) }
+ ]}
>
<Input data-refer='table-name-field'
placeholder={mismatchName} disabled={init} />
</Form.Item>
diff --git a/web/web/src/app/catalogs/rightContent/CreateTopicDialog.js
b/web/web/src/app/catalogs/rightContent/CreateTopicDialog.js
index 143e03d46b..4a2646ea5c 100644
--- a/web/web/src/app/catalogs/rightContent/CreateTopicDialog.js
+++ b/web/web/src/app/catalogs/rightContent/CreateTopicDialog.js
@@ -25,7 +25,7 @@ import { useScrolling } from 'react-use'
import { TreeRefContext } from '../page'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages, dialogContentMaxHeigth, mismatchName } from
'@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
diff --git a/web/web/src/app/catalogs/rightContent/RegisterModelDialog.js
b/web/web/src/app/catalogs/rightContent/RegisterModelDialog.js
index 817395c019..0fe81620f9 100644
--- a/web/web/src/app/catalogs/rightContent/RegisterModelDialog.js
+++ b/web/web/src/app/catalogs/rightContent/RegisterModelDialog.js
@@ -28,7 +28,7 @@ import { TreeRefContext } from '../page'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages, mismatchName } from '@/config'
import { dialogContentMaxHeigth } from '@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
diff --git
a/web/web/src/app/catalogs/rightContent/entitiesContent/CatalogsPage.js
b/web/web/src/app/catalogs/rightContent/entitiesContent/CatalogsPage.js
index e019769b4a..33dff4aa2f 100644
--- a/web/web/src/app/catalogs/rightContent/entitiesContent/CatalogsPage.js
+++ b/web/web/src/app/catalogs/rightContent/entitiesContent/CatalogsPage.js
@@ -88,6 +88,7 @@ export default function CatalogsPage() {
}) || []
const providerFitlers = [...store.tableData]
+ .filter(catalog => catalog.type === catalogType)
?.map(catalog => catalog.provider)
.filter((value, index, self) => self.indexOf(value) === index)
.map(p => {
diff --git
a/web/web/src/app/catalogs/rightContent/entitiesContent/SchemaDetailsPage.js
b/web/web/src/app/catalogs/rightContent/entitiesContent/SchemaDetailsPage.js
index 080539b5ae..b5d75a43a9 100644
--- a/web/web/src/app/catalogs/rightContent/entitiesContent/SchemaDetailsPage.js
+++ b/web/web/src/app/catalogs/rightContent/entitiesContent/SchemaDetailsPage.js
@@ -129,7 +129,7 @@ export default function SchemaDetailsPage() {
: [{ label: 'Tables', key: 'Tables' }]
)
setTabKey('Tables')
- setCreateBtn('Create table')
+ setCreateBtn('Create Table')
setNameCol('Table Name')
setEntityType('table')
break
diff --git a/web/web/src/app/compliance/policies/CreatePolicyDialog.js
b/web/web/src/app/compliance/policies/CreatePolicyDialog.js
index 80437dbf04..c7098aef21 100644
--- a/web/web/src/app/compliance/policies/CreatePolicyDialog.js
+++ b/web/web/src/app/compliance/policies/CreatePolicyDialog.js
@@ -23,7 +23,7 @@ import { Button, Flex, Form, Input, Modal, Select, Switch,
Typography } from 'an
import Icons from '@/components/Icons'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages, supportedObjectTypesMap, mismatchName } from
'@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
@@ -205,7 +205,7 @@ export default function CreatePolicyDialog({ ...props }) {
<Form.Item
{...restField}
name={[name, 'ruleName']}
- rules={[{ required: true, message: 'Please input
the rule name!' }]}
+ rules={[{ required: true, message: 'Please enter
the rule name!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Rule Name' />
@@ -213,7 +213,7 @@ export default function CreatePolicyDialog({ ...props }) {
<Form.Item
{...restField}
name={[name, 'ruleContent']}
- rules={[{ required: true, message: 'Please input
the rule content!' }]}
+ rules={[{ required: true, message: 'Please enter
the rule content!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Rule Content' />
diff --git a/web/web/src/app/compliance/tags/CreateTagDialog.js
b/web/web/src/app/compliance/tags/CreateTagDialog.js
index 68e6a9caec..d85b8493c2 100644
--- a/web/web/src/app/compliance/tags/CreateTagDialog.js
+++ b/web/web/src/app/compliance/tags/CreateTagDialog.js
@@ -22,7 +22,7 @@ import { ColorPicker, Form, Input, Modal, Space, Typography }
from 'antd'
import Icons from '@/components/Icons'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages, mismatchName } from '@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates, generateRandomColor } from '@/lib/utils'
import { useAppDispatch } from '@/lib/hooks/useStore'
diff --git a/web/web/src/app/jobTemplates/page.js
b/web/web/src/app/jobTemplates/page.js
index d9c3caa73d..f5b38dbdf2 100644
--- a/web/web/src/app/jobTemplates/page.js
+++ b/web/web/src/app/jobTemplates/page.js
@@ -235,7 +235,7 @@ export default function JobTemplatesPage() {
<div className='flex w-1/3 gap-4'>
<Search name='searchCatalogInput' placeholder='Search...'
onChange={onSearchTable} />
<Button type='primary' icon={<PlusOutlined />}
onClick={handleJobTemplate}>
- Create a new job template
+ Register Job Template
</Button>
</div>
</Flex>
@@ -416,6 +416,21 @@ export default function JobTemplatesPage() {
</div>
</>
)}
+ <div className='my-4'>
+ <div className='text-sm text-slate-400'>Details</div>
+ <div className='flex justify-between'>
+ <span className='text-sm'>Creator: </span>
+ <span
className='text-sm'>{currentJobTemplate?.audit?.creator}</span>
+ </div>
+ <div className='flex justify-between'>
+ <span className='text-sm'>Created At: </span>
+ <span
className='text-sm'>{formatToDateTime(currentJobTemplate?.audit?.createTime)}</span>
+ </div>
+ <div className='flex justify-between'>
+ <span className='text-sm'>Updated At: </span>
+ <span
className='text-sm'>{formatToDateTime(currentJobTemplate?.audit?.lastModifiedTime)}</span>
+ </div>
+ </div>
</>
</Drawer>
)}
diff --git a/web/web/src/app/jobs/CreateJobDialog.js
b/web/web/src/app/jobs/CreateJobDialog.js
index 05d1e45ba2..313206ad1f 100644
--- a/web/web/src/app/jobs/CreateJobDialog.js
+++ b/web/web/src/app/jobs/CreateJobDialog.js
@@ -160,7 +160,7 @@ export default function CreateJobDialog({ ...props }) {
return (
<>
<Modal
- title='Create Job'
+ title='Run Job'
open={open}
onOk={handleSubmit}
okText='Submit'
@@ -221,7 +221,7 @@ export default function CreateJobDialog({ ...props }) {
<Form.Item
{...restField}
name={[name, 'key']}
- rules={[{ required: true, message: 'Please input
the job config key!' }]}
+ rules={[{ required: true, message: 'Please enter
the job config key!' }]}
className='mb-0 w-full grow'
>
<Input disabled placeholder='Job Config Key' />
@@ -229,7 +229,7 @@ export default function CreateJobDialog({ ...props }) {
<Form.Item
{...restField}
name={[name, 'value']}
- rules={[{ required: true, message: 'Please input
the job config value!' }]}
+ rules={[{ required: true, message: 'Please enter
the job config value!' }]}
className='mb-0 w-full grow'
>
<Input
diff --git a/web/web/src/app/jobs/RegisterJobTemplateDialog.js
b/web/web/src/app/jobs/RegisterJobTemplateDialog.js
index e1d7f31fe1..02b781cc89 100644
--- a/web/web/src/app/jobs/RegisterJobTemplateDialog.js
+++ b/web/web/src/app/jobs/RegisterJobTemplateDialog.js
@@ -23,7 +23,7 @@ import { Button, Flex, Form, Input, Modal, Radio, Select,
Spin, Typography } fro
import { useScrolling } from 'react-use'
import Icons from '@/components/Icons'
import { dialogContentMaxHeigth, validateMessages, mismatchName } from
'@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { genUpdates } from '@/lib/utils'
import { cn } from '@/lib/utils/tailwind'
@@ -253,7 +253,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
</Form.Item>
<Form.Item
name='executable'
- rules={[{ required: true, message: 'Please input the
executable!' }]}
+ rules={[{ required: true, message: 'Please enter the
executable!' }]}
label='Executable'
>
<Input />
@@ -272,7 +272,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'envName']}
- rules={[{ required: true, message: 'Please
input environment variable name!' }]}
+ rules={[{ required: true, message: 'Please
enter environment variable name!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Env Var Name' />
@@ -280,7 +280,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'envValue']}
- rules={[{ required: true, message: 'Please
input environment variable value!' }]}
+ rules={[{ required: true, message: 'Please
enter environment variable value!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Env Var Value' />
@@ -313,7 +313,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'fieldName']}
- rules={[{ required: true, message: 'Please
input custom field name!' }]}
+ rules={[{ required: true, message: 'Please
enter custom field name!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Field Name' />
@@ -321,7 +321,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'fieldValue']}
- rules={[{ required: true, message: 'Please
input custom field value!' }]}
+ rules={[{ required: true, message: 'Please
enter custom field value!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Field Value' />
@@ -352,7 +352,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<>
<Form.Item
name='className'
- rules={[{ required: true, message: 'Please input the
class name!' }]}
+ rules={[{ required: true, message: 'Please enter the
class name!' }]}
label='Class Name'
>
<Input />
@@ -377,7 +377,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'configName']}
- rules={[{ required: true, message:
'Please input config name!' }]}
+ rules={[{ required: true, message:
'Please enter config name!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Config Name' />
@@ -385,7 +385,7 @@ export default function RegisterJobTemplateDialog({
...props }) {
<Form.Item
{...restField}
name={[name, 'configValue']}
- rules={[{ required: true, message:
'Please input config value!' }]}
+ rules={[{ required: true, message:
'Please enter config value!' }]}
className='mb-0 w-full grow'
>
<Input placeholder='Config Value' />
diff --git a/web/web/src/app/jobs/page.js b/web/web/src/app/jobs/page.js
index 7ac78b6abd..05c745c5e1 100644
--- a/web/web/src/app/jobs/page.js
+++ b/web/web/src/app/jobs/page.js
@@ -329,7 +329,7 @@ export default function JobsPage() {
>
<>
<div className='my-4'>
- <div className='text-sm text-slate-400'>Job Id</div>
+ <div className='text-sm text-slate-400'>Job ID</div>
<span className='break-words
text-base'>{currentJob?.jobId}</span>
</div>
<div className='my-4'>
diff --git a/web/web/src/app/login/components/DefaultLogin.js
b/web/web/src/app/login/components/DefaultLogin.js
index fe29c01143..a1df78df83 100644
--- a/web/web/src/app/login/components/DefaultLogin.js
+++ b/web/web/src/app/login/components/DefaultLogin.js
@@ -75,7 +75,7 @@ function DefaultLogin() {
rules={[{ required: true, message: 'Grant Type is required' }]}
className='mt-4'
>
- <Input disabled placeholder='' />
+ <Input disabled placeholder='Please enter the grant type' />
</Form.Item>
<Form.Item
diff --git a/web/web/src/app/metalakes/CreateMetalakeDialog.js
b/web/web/src/app/metalakes/CreateMetalakeDialog.js
index 5185de0e82..2905dc6441 100644
--- a/web/web/src/app/metalakes/CreateMetalakeDialog.js
+++ b/web/web/src/app/metalakes/CreateMetalakeDialog.js
@@ -22,7 +22,7 @@ import React, { useEffect, useState } from 'react'
import { Form, Input, Modal, Select, Spin, Typography } from 'antd'
import RenderPropertiesFormItem from '@/components/EntityPropertiesFormItem'
import { validateMessages } from '@/config'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { useResetFormOnCloseModal } from '@/lib/hooks/use-reset'
import { createMetalake, getMetalakeDetails, updateMetalake } from
'@/lib/store/metalakes'
import { genUpdates } from '@/lib/utils'
diff --git a/web/web/src/app/rootLayout/UserSetting.js
b/web/web/src/app/rootLayout/UserSetting.js
index b7547a2324..42aff8ce04 100644
--- a/web/web/src/app/rootLayout/UserSetting.js
+++ b/web/web/src/app/rootLayout/UserSetting.js
@@ -99,9 +99,19 @@ export default function UserSetting() {
data-refer={`select-option-${metalake.name}`}
className='flex w-[200px] justify-between'
onClick={() => {
- if (metalake.properties['in-use'] === 'true') {
-
router.push(`/catalogs?metalake=${metalake.name}&catalogType=relational`)
+ const isCatalogsPage = pathname.includes('/catalogs')
+
+ // If on catalogs page, check if metalake is in-use
+ if (isCatalogsPage && metalake.properties['in-use'] !==
'true') {
+ return
}
+
+ // Build new searchParams with updated metalake, preserving
other params
+ const params = new URLSearchParams(searchParams.toString())
+ params.set('metalake', metalake.name)
+
+ // Preserve pathname and only update metalake in query string
+ router.push(`${pathname}?${params.toString()}`)
}}
>
<span
@@ -131,12 +141,15 @@ export default function UserSetting() {
]
: [])
],
- [authUser, serviceAdmins, store.metalakes, currentMetalake, anthEnable]
+ [authUser, serviceAdmins, store.metalakes, currentMetalake, anthEnable,
searchParams]
)
return (
<>
- <Dropdown menu={{ items }}>
+ <Dropdown
+ menu={{ items }}
+ overlayClassName='[&_.ant-dropdown-menu-item-group-list]:max-h-[300px]
[&_.ant-dropdown-menu-item-group-list]:overflow-y-auto'
+ >
<div role={'button'} tabIndex={0} data-refer='select-metalake'>
<Avatar
shape='square'
diff --git a/web/web/src/components/EntityPropertiesFormItem.js
b/web/web/src/components/EntityPropertiesFormItem.js
index 31a1f79b15..a2fcf16826 100644
--- a/web/web/src/components/EntityPropertiesFormItem.js
+++ b/web/web/src/components/EntityPropertiesFormItem.js
@@ -25,7 +25,7 @@ import { Button, Dropdown, Flex, Form, Input, Select, Space }
from 'antd'
import Icons from '@/components/Icons'
import { getPropInfo, mismatchForKey } from '@/config'
import { filesetLocationProviders, locationDefaultProps, rangerDefaultProps }
from '@/config/catalog'
-import { keyRegex } from '@/config/regex'
+import { keyRegex } from '@/lib/utils/regex'
import { cn } from '@/lib/utils/tailwind'
import { mapValues } from 'lodash-es'
import { useAppSelector } from '@/lib/hooks/useStore'
diff --git a/web/web/src/components/SecurableObjectFormFields.js
b/web/web/src/components/SecurableObjectFormFields.js
index a98f8eb5f1..9e7dcad2ad 100644
--- a/web/web/src/components/SecurableObjectFormFields.js
+++ b/web/web/src/components/SecurableObjectFormFields.js
@@ -95,7 +95,7 @@ export default function SecurableObjectFormFields({
fieldName, fieldKey, metalak
} else if (t === 'job_template' || t === 'job template') {
const [err, r] = await to(dispatch(fetchJobTemplates({ metalake,
details: true })))
if (err || !r) return
- res = (r?.payload?.jobTemplates || []).map(j => ({ label: j.name,
value: j.name }))
+ res = (r?.payload?.jobTemplatesRes?.jobTemplates || []).map(j => ({
label: j.name, value: j.name }))
}
if (res) setLocalRemoteOptions(prev => ({ ...prev, [t]: res }))
@@ -290,8 +290,12 @@ export default function SecurableObjectFormFields({
fieldName, fieldKey, metalak
setLocalSchemaVal(schemaSelected || undefined)
setLocalResourceVal(resourceSelected || undefined)
- if (catalogSelected) loadSchemasForCatalog(catalogSelected)
- else setSchemasOptions([])
+ const shouldLoadSchemas = ['schema', 'table', 'topic', 'fileset',
'model'].includes(currentType)
+ if (shouldLoadSchemas && catalogSelected) {
+ loadSchemasForCatalog(catalogSelected)
+ } else {
+ setSchemasOptions([])
+ }
// clear privileges when type changes
}, [catalogSelected])
@@ -765,7 +769,7 @@ export default function SecurableObjectFormFields({
fieldName, fieldKey, metalak
return (
<Input
- placeholder={`Please input ${currentType} name`}
+ placeholder={`Please enter ${currentType || ''} name`}
value={displayValue}
onChange={e => {
const v = e.target.value
diff --git a/web/web/src/components/SetOwnerDialog.js
b/web/web/src/components/SetOwnerDialog.js
index 38a147c9ef..10aa704b6f 100644
--- a/web/web/src/components/SetOwnerDialog.js
+++ b/web/web/src/components/SetOwnerDialog.js
@@ -30,7 +30,7 @@ import { useEffect } from 'react'
const { Paragraph } = Typography
export default function SetOwnerDialog({ ...props }) {
- const { open, setOpen, metalake, metadataObjectType, metadataObjectFullName
} = props
+ const { open, setOpen, metalake, metadataObjectType, metadataObjectFullName,
mutateOwner } = props
const [confirmLoading, setConfirmLoading] = useState(false)
const cascaderOwnerRef = useRef(null)
const dispatch = useAppDispatch()
@@ -45,10 +45,15 @@ export default function SetOwnerDialog({ ...props }) {
})
useEffect(() => {
- if (open) {
- const { payload } = dispatch(getCurrentEntityOwner({ metalake,
metadataObjectType, metadataObjectFullName }))
+ const initLoad = async () => {
+ const { payload } = await dispatch(
+ getCurrentEntityOwner({ metalake, metadataObjectType,
metadataObjectFullName })
+ )
setOwnerData(payload?.owner)
}
+ if (open) {
+ initLoad()
+ }
}, [open])
const defaultValues = {
@@ -70,7 +75,8 @@ export default function SetOwnerDialog({ ...props }) {
await dispatch(setEntityOwner({ metalake, metadataObjectType,
metadataObjectFullName, data: submitData }))
setConfirmLoading(false)
- setOpen(false, true)
+ mutateOwner && mutateOwner()
+ setOpen(false)
})
.catch(info => {
console.error(info)
@@ -79,7 +85,7 @@ export default function SetOwnerDialog({ ...props }) {
}
const handleCancel = () => {
- setOpen(false, false)
+ setOpen(false)
}
return (
diff --git a/web/web/src/components/SpecialColumnTypeComponent.js
b/web/web/src/components/SpecialColumnTypeComponent.js
index e2118fea9d..34952aa05b 100644
--- a/web/web/src/components/SpecialColumnTypeComponent.js
+++ b/web/web/src/components/SpecialColumnTypeComponent.js
@@ -22,7 +22,7 @@ import { PlusOutlined } from '@ant-design/icons'
import { Button, Form, Input, Pagination, Switch } from 'antd'
import Icons from '@/components/Icons'
import ColumnTypeComponent from '@/components/ColumnTypeComponent'
-import { nameRegex } from '@/config/regex'
+import { nameRegex } from '@/lib/utils/regex'
import { cn } from '@/lib/utils/tailwind'
export default function SpecialColumnTypeComponent({ ...props }) {
diff --git a/web/web/src/config/catalog.js b/web/web/src/config/catalog.js
index c0391baa3a..7c866b6b4b 100644
--- a/web/web/src/config/catalog.js
+++ b/web/web/src/config/catalog.js
@@ -302,7 +302,7 @@ export const providerBase = {
select: ['hive', 'jdbc']
},
{
- label: 'Uri',
+ label: 'URI',
key: 'uri',
value: '',
required: true,
@@ -316,7 +316,7 @@ export const providerBase = {
description: 'Apache Iceberg catalog warehouse config'
},
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
@@ -326,7 +326,7 @@ export const providerBase = {
'"com.mysql.jdbc.Driver" or "com.mysql.cj.jdbc.Driver" for MySQL,
"org.postgresql.Driver" for PostgreSQL'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true,
@@ -334,7 +334,7 @@ export const providerBase = {
hide: ['hive']
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true,
@@ -374,27 +374,27 @@ export const providerBase = {
label: 'MySQL',
defaultProps: [
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
description: 'e.g. com.mysql.jdbc.Driver or com.mysql.cj.jdbc.Driver'
},
{
- label: 'Jdbc Url',
+ label: 'JDBC Url',
key: 'jdbc-url',
value: '',
required: true,
description: 'e.g. jdbc:mysql://localhost:3306'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true
@@ -405,33 +405,33 @@ export const providerBase = {
label: 'PostgreSQL',
defaultProps: [
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
description: 'e.g. org.postgresql.Driver'
},
{
- label: 'Jdbc Url',
+ label: 'JDBC Url',
key: 'jdbc-url',
value: '',
required: true,
description: 'e.g. jdbc:postgresql://localhost:5432/your_database'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true
},
{
- label: 'Jdbc Database',
+ label: 'JDBC Database',
key: 'jdbc-database',
value: '',
required: true
@@ -442,27 +442,27 @@ export const providerBase = {
label: 'Apache Doris',
defaultProps: [
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
description: 'e.g. com.mysql.jdbc.Driver or com.mysql.cj.jdbc.Driver'
},
{
- label: 'Jdbc Url',
+ label: 'JDBC Url',
key: 'jdbc-url',
value: '',
required: true,
description: 'e.g. jdbc:mysql://localhost:9030'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true
@@ -473,27 +473,27 @@ export const providerBase = {
label: 'StarRocks',
defaultProps: [
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
description: 'e.g. com.mysql.jdbc.Driver or com.mysql.cj.jdbc.Driver'
},
{
- label: 'Jdbc Url',
+ label: 'JDBC Url',
key: 'jdbc-url',
value: '',
required: true,
description: 'e.g. jdbc:mysql://localhost:9030'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true
@@ -512,7 +512,7 @@ export const providerBase = {
description: 'paimonBackendDesc'
},
{
- label: 'Uri',
+ label: 'URI',
key: 'uri',
value: '',
required: true,
@@ -528,7 +528,7 @@ export const providerBase = {
description: 'e.g. file:/user/hive/warehouse-paimon/ or
hdfs://namespace/hdfs/path'
},
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
@@ -538,7 +538,7 @@ export const providerBase = {
'"com.mysql.jdbc.Driver" or "com.mysql.cj.jdbc.Driver" for MySQL,
"org.postgresql.Driver" for PostgreSQL'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true,
@@ -546,7 +546,7 @@ export const providerBase = {
hide: ['hive', 'filesystem']
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true,
@@ -582,6 +582,10 @@ export const providerBase = {
}
]
},
+ 'lakehouse-generic': {
+ label: 'Lakehouse Generic',
+ defaultProps: []
+ },
'lakehouse-hudi': {
label: 'Apache Hudi',
defaultProps: [
@@ -594,7 +598,7 @@ export const providerBase = {
select: ['hms']
},
{
- label: 'Uri',
+ label: 'URI',
key: 'uri',
value: '',
required: true,
@@ -606,27 +610,27 @@ export const providerBase = {
label: 'OceanBase',
defaultProps: [
{
- label: 'Jdbc Driver',
+ label: 'JDBC Driver',
key: 'jdbc-driver',
value: '',
required: true,
description: 'e.g. com.mysql.jdbc.Driver or com.mysql.cj.jdbc.Driver
or com.oceanbase.jdbc.Driver'
},
{
- label: 'Jdbc Url',
+ label: 'JDBC Url',
key: 'jdbc-url',
value: '',
required: true,
description: 'e.g. jdbc:mysql://localhost:2881 or
jdbc:oceanbase://localhost:2881'
},
{
- label: 'Jdbc User',
+ label: 'JDBC User',
key: 'jdbc-user',
value: '',
required: true
},
{
- label: 'Jdbc Password',
+ label: 'JDBC Password',
key: 'jdbc-password',
value: '',
required: true
diff --git a/web/web/src/config/index.js b/web/web/src/config/index.js
index 4015c48e8e..82d9908400 100644
--- a/web/web/src/config/index.js
+++ b/web/web/src/config/index.js
@@ -22,7 +22,7 @@ export const dialogContentMaxHeigth = 500
export const maxTreeWidth = 700
export const mismatchName =
- 'Must start with a letter/underscore(_), contain only alphanumeric
characters (Aa-Zz,0-9) or underscores (_)!'
+ 'Must start with a letter, digit, or underscore, can include alphanumeric
characters, underscores, slashes (/), equal signs (=), or hyphens (-), and must
be between 1 and 64 characters long!'
export const mismatchUsername =
'Must start with a letter/underscore (_), contain only alphanumeric
characters (Aa-Zz,0-9), underscore (_), center (-), dot (.) or the ‘@’
character.'
@@ -31,7 +31,7 @@ export const mismatchForKey =
'Must start with a letter/underscore(_), contain only alphanumeric
characters (Aa-Zz,0-9) or underscores (_), hyphens(-), or dots(.)!'
export const validateMessages = () => ({
- required: `Please input the ${label}!`,
+ required: `Please enter the ${label}!`,
string: {
max: `The ${label} must be less than ${max} characters!`
},
diff --git a/web/web/src/config/regex.js b/web/web/src/config/regex.js
deleted file mode 100644
index 490f03d3bf..0000000000
--- a/web/web/src/config/regex.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-export const nameRegex = /^\w[\w]*$/
-
-export const usernameRegex = /^\w[\w-.@]*$/
-
-export const keyRegex = /^\w[\w-.]*$/
diff --git a/web/web/src/lib/styles/antdStyles/globals.css
b/web/web/src/lib/styles/antdStyles/globals.css
index 2c1c1fa688..31d4f3a4b5 100644
--- a/web/web/src/lib/styles/antdStyles/globals.css
+++ b/web/web/src/lib/styles/antdStyles/globals.css
@@ -63,9 +63,9 @@
}
}
.step-icon-default-theme {
- @apply bg-[color:theme(colors.defaultPrimary)] text-white;
+ @apply bg-gray-100 text-defaultPrimary;
&:hover {
- @apply text-white;
+ @apply text-defaultPrimary;
}
}
}
diff --git a/web/web/src/lib/utils/index.js b/web/web/src/lib/utils/index.js
index 374e11bc29..2856f37812 100644
--- a/web/web/src/lib/utils/index.js
+++ b/web/web/src/lib/utils/index.js
@@ -21,6 +21,7 @@ import _, { intersectionWith, isEqual, mergeWith, unionWith }
from 'lodash-es'
import { isArray, isObject } from './is'
import { ColumnSpesicalType } from '@/config'
import dayjs from 'dayjs'
+import { original } from '@reduxjs/toolkit'
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'
@@ -112,6 +113,13 @@ export const genUpdates = (originalData, newData,
disableUpdate = false) => {
updates.push({ '@type': 'updateComment', newComment: newData.comment })
}
+ const originalContent = originalData.content || {}
+ const newContent = newData.content || {}
+
+ if (JSON.stringify(originalContent) !== JSON.stringify(newContent)) {
+ updates.push({ '@type': 'updateContent', policyType: 'custom', newContent:
newContent })
+ }
+
const originalProperties = originalData.properties || {}
const newProperties = newData.properties || {}
@@ -175,6 +183,13 @@ export const genUpdates = (originalData, newData,
disableUpdate = false) => {
nullable: newColumnsMap[key].nullable
})
}
+ if (JSON.stringify(originalColumnsMap[key].defaultValue) !==
JSON.stringify(newColumnsMap[key].defaultValue)) {
+ updates.push({
+ '@type': 'updateColumnDefaultValue',
+ fieldName: [newColumnsMap[key].name],
+ newDefaultValue: newColumnsMap[key].defaultValue
+ })
+ }
if (
(!originalColumnsMap[key].comment && newColumnsMap[key].comment) ||
(originalColumnsMap[key].comment && !newColumnsMap[key].comment) ||
diff --git a/web/web/src/lib/utils/regex.js b/web/web/src/lib/utils/regex.js
index 161253367f..8fe271bf9d 100644
--- a/web/web/src/lib/utils/regex.js
+++ b/web/web/src/lib/utils/regex.js
@@ -22,4 +22,6 @@ export const nameRegex = /^\w[\w/=-]{0,63}$/
export const nameRegexDesc =
'This field must start with a letter, digit, or underscore, can include
alphanumeric characters, underscores, slashes (/), equal signs (=), or hyphens
(-), and must be between 1 and 64 characters long.'
+export const usernameRegex = /^\w[\w-.@]*$/
+
export const keyRegex = /^[a-zA-Z_][a-zA-Z0-9-_.]*$/