This is an automated email from the ASF dual-hosted git repository. dockerzhang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push: new 9eb74bd4ca [INLONG-8841][Dashboard] Support management of Iceberg sources (#8842) 9eb74bd4ca is described below commit 9eb74bd4cae7b6c7acb24a5b121067f63db54f4a Author: Lizhen <88174078+bluew...@users.noreply.github.com> AuthorDate: Wed Sep 6 20:38:19 2023 +0800 [INLONG-8841][Dashboard] Support management of Iceberg sources (#8842) --- .../src/plugins/sources/defaults/Iceberg.ts | 89 ++++++++++++++++++++++ .../src/plugins/sources/defaults/index.ts | 5 ++ inlong-dashboard/src/ui/locales/cn.json | 4 + inlong-dashboard/src/ui/locales/en.json | 4 + 4 files changed, 102 insertions(+) diff --git a/inlong-dashboard/src/plugins/sources/defaults/Iceberg.ts b/inlong-dashboard/src/plugins/sources/defaults/Iceberg.ts new file mode 100644 index 0000000000..582b8c7220 --- /dev/null +++ b/inlong-dashboard/src/plugins/sources/defaults/Iceberg.ts @@ -0,0 +1,89 @@ +/* + * 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 { DataWithBackend } from '@/plugins/DataWithBackend'; +import { RenderRow } from '@/plugins/RenderRow'; +import { RenderList } from '@/plugins/RenderList'; +import i18n from '@/i18n'; +import { SourceInfo } from '../common/SourceInfo'; + +const { I18n } = DataWithBackend; +const { FieldDecorator, SyncField } = RenderRow; +const { ColumnDecorator } = RenderList; + +export default class IcebergSource + extends SourceInfo + implements DataWithBackend, RenderRow, RenderList +{ + @FieldDecorator({ + type: 'input', + rules: [{ required: true }], + props: values => ({ + disabled: values?.status === 101, + }), + }) + @SyncField() + @ColumnDecorator() + @I18n('meta.Sources.Iceberg.Database') + database: number; + + @FieldDecorator({ + type: 'input', + rules: [{ required: true }], + props: values => ({ + disabled: values?.status === 101, + }), + }) + @SyncField() + @I18n('meta.Sources.Iceberg.TableName') + tableName: string; + + @FieldDecorator({ + type: 'input', + rules: [{ required: true }], + props: values => ({ + disabled: values?.status === 101, + }), + }) + @SyncField() + @I18n('meta.Sources.Iceberg.PrimaryKey') + primaryKey: string; + + @FieldDecorator({ + type: 'input', + rules: [{ required: true }], + props: values => ({ + disabled: values?.status === 101, + }), + }) + @SyncField() + @ColumnDecorator() + @I18n('Catalog URI') + uri: string; + + @FieldDecorator({ + type: 'input', + props: values => ({ + disabled: values?.status === 101, + }), + }) + @SyncField() + @I18n('meta.Sources.Iceberg.Warehouse') + warehouse: string; +} diff --git a/inlong-dashboard/src/plugins/sources/defaults/index.ts b/inlong-dashboard/src/plugins/sources/defaults/index.ts index 13f6e9717e..c9bbf3174e 100644 --- a/inlong-dashboard/src/plugins/sources/defaults/index.ts +++ b/inlong-dashboard/src/plugins/sources/defaults/index.ts @@ -74,4 +74,9 @@ export const allDefaultSources: MetaExportWithBackendList<SourceMetaType> = [ value: 'SQLSERVER', LoadEntity: () => import('./SQLServer'), }, + { + label: 'Iceberg', + value: 'ICEBERG', + LoadEntity: () => import('./Iceberg'), + }, ]; diff --git a/inlong-dashboard/src/ui/locales/cn.json b/inlong-dashboard/src/ui/locales/cn.json index 158a5877b3..538f74748b 100644 --- a/inlong-dashboard/src/ui/locales/cn.json +++ b/inlong-dashboard/src/ui/locales/cn.json @@ -114,6 +114,10 @@ "meta.Sources.Hudi.ReadStartCommitHelp": "指定 'yyyyMMddHHmmss'格式的起始commit(闭区间)", "meta.Sources.Hudi.ExtListHelper": "hudi 表的 DDL 属性需带前缀'ddl.'", "meta.Sources.Hudi.ExtList": "高级属性", + "meta.Sources.Iceberg.Database": "数据库名", + "meta.Sources.Iceberg.TableName": "表格名称", + "meta.Sources.Iceberg.PrimaryKey": "主键", + "meta.Sources.Iceberg.Warehouse": "仓库路径", "meta.Sinks.SinkName": "名称", "meta.Sinks.SinkNameRule": "只能包含英文字母、数字、点号(.)、中划线(-)、下划线(_)", "meta.Sinks.SinkType": "类型", diff --git a/inlong-dashboard/src/ui/locales/en.json b/inlong-dashboard/src/ui/locales/en.json index 09d707bca3..57ec0b8530 100644 --- a/inlong-dashboard/src/ui/locales/en.json +++ b/inlong-dashboard/src/ui/locales/en.json @@ -114,6 +114,10 @@ "meta.Sources.Hudi.ReadStartCommitHelp": "Specify the starting commit in the format of 'yyyyMMddHHmmss' (closed range)", "meta.Sources.Hudi.ExtListHelper": "The DDL attribute of the hudi table needs to be prefixed with 'ddl.'", "meta.Sources.Hudi.ExtList": "AdvancedProperties", + "meta.Sources.Iceberg.Database": "Database", + "meta.Sources.Iceberg.TableName": "TableName", + "meta.Sources.Iceberg.PrimaryKey": "PrimaryKey", + "meta.Sources.Iceberg.Warehouse": "Warehouse", "meta.Sinks.SinkName": "Name", "meta.Sinks.SinkNameRule": "Only English letters, numbers, dots(.), minus(-), and underscores(_)", "meta.Sinks.SinkType": "Type",