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 1431f6664 [INLONG-7531][Dashboard] Clickhouse source supports filling 
life cycle (#7532)
1431f6664 is described below

commit 1431f6664df97dc6ed67e0f2a2d7c0ba7c1315a6
Author: Lizhen <[email protected]>
AuthorDate: Tue Mar 7 14:54:36 2023 +0800

    [INLONG-7531][Dashboard] Clickhouse source supports filling life cycle 
(#7532)
---
 .../src/metas/nodes/defaults/ClickHouse.ts         | 15 +++----
 .../src/metas/sinks/defaults/ClickHouse.ts         | 52 ++++++++++++++++++++++
 2 files changed, 59 insertions(+), 8 deletions(-)

diff --git a/inlong-dashboard/src/metas/nodes/defaults/ClickHouse.ts 
b/inlong-dashboard/src/metas/nodes/defaults/ClickHouse.ts
index d8e12ab6a..11439f5f3 100644
--- a/inlong-dashboard/src/metas/nodes/defaults/ClickHouse.ts
+++ b/inlong-dashboard/src/metas/nodes/defaults/ClickHouse.ts
@@ -36,21 +36,20 @@ export default class ClickHouseNode
   @I18n('meta.Nodes.ClickHouse.Username')
   username: string;
 
-  @FieldDecorator({
-    type: 'password',
-    rules: [{ required: true }],
-  })
-  @I18n('meta.Nodes.ClickHouse.Password')
-  token: string;
-
   @FieldDecorator({
     type: 'input',
     rules: [{ required: true }],
     props: values => ({
       disabled: [110, 130].includes(values?.status),
-      placeholder: 'jdbc:clickhouse://127.0.0.1:8123',
+      placeholder: '127.0.0.1:8123',
     }),
   })
   @I18n('meta.Nodes.ClickHouse.Url')
   url: string;
+
+  @FieldDecorator({
+    type: 'password',
+  })
+  @I18n('meta.Nodes.ClickHouse.Password')
+  token: string;
 }
diff --git a/inlong-dashboard/src/metas/sinks/defaults/ClickHouse.ts 
b/inlong-dashboard/src/metas/sinks/defaults/ClickHouse.ts
index a701d38a7..829cc7f1e 100644
--- a/inlong-dashboard/src/metas/sinks/defaults/ClickHouse.ts
+++ b/inlong-dashboard/src/metas/sinks/defaults/ClickHouse.ts
@@ -239,6 +239,58 @@ export default class ClickHouseSink
   @I18n('meta.Sinks.ClickHouse.PrimaryKey')
   primaryKey: string;
 
+  @FieldDecorator({
+    type: 'inputnumber',
+    suffix: {
+      type: 'select',
+      name: 'ttlUnit',
+      props: values => ({
+        disabled: [110, 130].includes(values?.status),
+        options: [
+          {
+            label: 'Second',
+            value: 'second',
+          },
+          {
+            label: 'Minute',
+            value: 'minute',
+          },
+          {
+            label: 'Hour',
+            value: 'hour',
+          },
+          {
+            label: 'Day',
+            value: 'day',
+          },
+          {
+            label: 'Week',
+            value: 'week',
+          },
+          {
+            label: 'Month',
+            value: 'month',
+          },
+          {
+            label: 'Quarter',
+            value: 'quarter',
+          },
+          {
+            label: 'Year',
+            value: 'year',
+          },
+        ],
+      }),
+    },
+    props: values => ({
+      min: 1,
+      precision: 0,
+      disabled: [110, 130].includes(values?.status),
+    }),
+  })
+  @I18n('Time To Live')
+  ttl: number;
+
   @FieldDecorator({
     type: EditableTable,
     props: values => ({

Reply via email to