diff --git a/paimon-web-ui-new/src/locales/en/index.ts b/paimon-web-ui-new/src/locales/en/index.ts index c4475e9d7..502978f9a 100644 --- a/paimon-web-ui-new/src/locales/en/index.ts +++ b/paimon-web-ui-new/src/locales/en/index.ts @@ -19,10 +19,12 @@ import layout from './modules/layout' import login from './modules/login' import playground from './modules/playground' import metadata from './modules/metadata' +import cdc from './modules/cdc' export default { login, layout, playground, - metadata + metadata, + cdc, } diff --git a/paimon-web-ui-new/src/locales/en/modules/cdc.ts b/paimon-web-ui-new/src/locales/en/modules/cdc.ts new file mode 100644 index 000000000..a7eeed8c8 --- /dev/null +++ b/paimon-web-ui-new/src/locales/en/modules/cdc.ts @@ -0,0 +1,31 @@ +/* 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 default { + synchronous_job_definition: 'Synchronous Job Definition', + create_synchronous_job: 'Create Synchronous Job', + job_name: 'Job Name', + synchronization_type: 'Synchronization type', + job_description: 'Job Description', + create_user: 'Create User', + create_time: 'Create Time', + update_time: 'Update Time', + operation: 'Operation', + edit: 'Edit', + run: 'Run', + delete: 'Delete', +} diff --git a/paimon-web-ui-new/src/locales/zh/index.ts b/paimon-web-ui-new/src/locales/zh/index.ts index c4475e9d7..8b37fa14a 100644 --- a/paimon-web-ui-new/src/locales/zh/index.ts +++ b/paimon-web-ui-new/src/locales/zh/index.ts @@ -19,10 +19,12 @@ import layout from './modules/layout' import login from './modules/login' import playground from './modules/playground' import metadata from './modules/metadata' +import cdc from './modules/cdc' export default { login, layout, playground, - metadata + metadata, + cdc } diff --git a/paimon-web-ui-new/src/locales/zh/modules/cdc.ts b/paimon-web-ui-new/src/locales/zh/modules/cdc.ts new file mode 100644 index 000000000..0a2c7c467 --- /dev/null +++ b/paimon-web-ui-new/src/locales/zh/modules/cdc.ts @@ -0,0 +1,31 @@ +/* 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 default { + synchronous_job_definition: '同步任务定义', + create_synchronous_job: '创建同步作业', + job_name: '作业名称', + synchronization_type: '同步类型', + job_description: '作业描述', + create_user: '创建用户', + create_time: '创建时间', + update_time: '更新时间', + operation: '操作', + edit: '编辑', + run: '运行', + delete: '删除', +} diff --git a/paimon-web-ui-new/src/views/cdc/components/list/index.module.scss b/paimon-web-ui-new/src/views/cdc/components/list/index.module.scss new file mode 100644 index 000000000..463450605 --- /dev/null +++ b/paimon-web-ui-new/src/views/cdc/components/list/index.module.scss @@ -0,0 +1,20 @@ +/* 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. */ + +.list-page { + width: 100%; +} diff --git a/paimon-web-ui-new/src/views/cdc/components/list/index.tsx b/paimon-web-ui-new/src/views/cdc/components/list/index.tsx new file mode 100644 index 000000000..d0799ccee --- /dev/null +++ b/paimon-web-ui-new/src/views/cdc/components/list/index.tsx @@ -0,0 +1,91 @@ +/* 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. */ + +import styles from './index.module.scss'; +import TableAction from '../table-action'; + +export default defineComponent({ + name: 'ListPage', + setup() { + const { t } = useLocaleHooks() + const tableVariables = reactive({ + columns: [ + { + title: computed(() => t('cdc.job_name')), + key: 'name', + resizable: true + }, + { + title: computed(() => t('cdc.synchronization_type')), + key: 'type', + resizable: true + }, + { + title: computed(() => t('cdc.job_description')), + key: 'description', + resizable: true + }, + { + title: computed(() => t('cdc.create_user')), + key: 'create_user', + resizable: true + }, + { + title: computed(() => t('cdc.create_time')), + key: 'create_time', + resizable: true + }, + { + title: computed(() => t('cdc.update_time')), + key: 'update_time', + resizable: true + }, + { + title: computed(() => t('cdc.operation')), + key: 'actions', + render: (row: any) => + h(TableAction, { + row, + }) + } + ], + data: [ + { name: 1, type: 'Single table synchronization', create_user: 'admin' }, + { name: 2, type: "Whole library synchronization", create_user: 'admin' }, + ], + pagination: { + pageSize: 10 + } + }) + return { + t, + ...toRefs(tableVariables) + } + }, + render() { + return ( +