You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2023/05/12 04:48:47 UTC
[inlong] 02/08: [INLONG-8001][Dashboard] Support postgreSQL node management (#8002)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/inlong.git
commit 40ce0aea6ebde57a68beb70bc68c20319e91ece0
Author: Lizhen <88...@users.noreply.github.com>
AuthorDate: Thu May 11 16:44:50 2023 +0800
[INLONG-8001][Dashboard] Support postgreSQL node management (#8002)
---
CHANGES.md | 1 +
.../src/plugins/nodes/defaults/PostgreSQL.ts | 55 ++++++++++++++++++++++
.../src/plugins/nodes/defaults/index.ts | 5 ++
inlong-dashboard/src/ui/locales/cn.json | 3 ++
inlong-dashboard/src/ui/locales/en.json | 3 ++
5 files changed, 67 insertions(+)
diff --git a/CHANGES.md b/CHANGES.md
index bec978dcb..3b98e9017 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -187,6 +187,7 @@
| [INLONG-7630](https://github.com/apache/inlong/issues/7630) | [Bug][Dashboard] The page flickers when the route is switched |
| [INLONG-7004](https://github.com/apache/inlong/issues/7004) | [Feature][Dashboard][Manager] Creating schema of StreamSource by Statement |
| [INLONG-7971](https://github.com/apache/inlong/issues/7971) | [Feature][Dashboard] Support batch import fields by Excel |
+| [INLONG-8001](https://github.com/apache/inlong/issues/8001) | [Feature][Dashboard] Support postgreSQL node management |
### Other
| ISSUE | Summary |
diff --git a/inlong-dashboard/src/plugins/nodes/defaults/PostgreSQL.ts b/inlong-dashboard/src/plugins/nodes/defaults/PostgreSQL.ts
new file mode 100644
index 000000000..86932f8aa
--- /dev/null
+++ b/inlong-dashboard/src/plugins/nodes/defaults/PostgreSQL.ts
@@ -0,0 +1,55 @@
+/*
+ * 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 { NodeInfo } from '../common/NodeInfo';
+
+const { I18n } = DataWithBackend;
+const { FieldDecorator } = RenderRow;
+
+export default class PostgreSQLNode
+ extends NodeInfo
+ implements DataWithBackend, RenderRow, RenderList
+{
+ @FieldDecorator({
+ type: 'input',
+ rules: [{ required: true }],
+ })
+ @I18n('meta.Nodes.PostgreSQL.Username')
+ username: string;
+
+ @FieldDecorator({
+ type: 'password',
+ rules: [{ required: true }],
+ })
+ @I18n('meta.Nodes.PostgreSQL.Password')
+ token: string;
+
+ @FieldDecorator({
+ type: 'input',
+ rules: [{ required: true }],
+ props: {
+ placeholder: 'jdbc:postgresql://127.0.0.1:8123',
+ },
+ })
+ @I18n('meta.Nodes.PostgreSQL.Url')
+ url: string;
+}
diff --git a/inlong-dashboard/src/plugins/nodes/defaults/index.ts b/inlong-dashboard/src/plugins/nodes/defaults/index.ts
index a14a85d59..caaee7a72 100644
--- a/inlong-dashboard/src/plugins/nodes/defaults/index.ts
+++ b/inlong-dashboard/src/plugins/nodes/defaults/index.ts
@@ -56,6 +56,11 @@ export const allDefaultNodes: MetaExportWithBackendList<NodeMetaType> = [
value: 'MYSQL',
LoadEntity: () => import('./MySQL'),
},
+ {
+ label: 'PostgreSQL',
+ value: 'POSTGRESQL',
+ LoadEntity: () => import('./PostgreSQL'),
+ },
{
label: 'Redis',
value: 'REDIS',
diff --git a/inlong-dashboard/src/ui/locales/cn.json b/inlong-dashboard/src/ui/locales/cn.json
index 9fb0c9802..96cc47376 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -460,6 +460,9 @@
"meta.Nodes.MySQL.Password": "密码",
"meta.Nodes.MySQL.Url": "地址",
"meta.Nodes.MySQL.BackupUrl": "备份地址",
+ "meta.Nodes.PostgreSQL.Username": "用户名",
+ "meta.Nodes.PostgreSQL.Password": "密码",
+ "meta.Nodes.PostgreSQL.Url": "地址",
"meta.Nodes.ES.Host": "主机",
"meta.Nodes.ES.HostHelp": "要连接到的一台或多台 Elasticsearch 主机,例如 'http://host_name:9092;http://host_name:9093'",
"meta.Nodes.ES.Username": "用户名",
diff --git a/inlong-dashboard/src/ui/locales/en.json b/inlong-dashboard/src/ui/locales/en.json
index 64c4977cb..b76aabad5 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -460,6 +460,9 @@
"meta.Nodes.MySQL.Password": "Password",
"meta.Nodes.MySQL.Url": "URL",
"meta.Nodes.MySQL.BackupUrl": "Backup URL",
+ "meta.Nodes.PostgreSQL.Username": "Username",
+ "meta.Nodes.PostgreSQL.Password": "Password",
+ "meta.Nodes.PostgreSQL.Url": "URL",
"meta.Nodes.ES.Host": "Host",
"meta.Nodes.ES.HostHelp": "One or more Elasticsearch hosts to connect to, e.g. 'http://host_name:9092;http://host_name:9093'",
"meta.Nodes.ES.Username": "Username",