You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by xu...@apache.org on 2022/05/12 06:11:57 UTC

[dolphinscheduler] branch dev updated: [Fix-10002] Fix some bugs in datasource list (#10005)

This is an automated email from the ASF dual-hosted git repository.

xujunjie pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 53cd7009de [Fix-10002] Fix some bugs in datasource list (#10005)
53cd7009de is described below

commit 53cd7009deae072c5284ea881204ed2e8845b572
Author: rockfang <65...@qq.com>
AuthorDate: Thu May 12 14:11:52 2022 +0800

    [Fix-10002] Fix some bugs in datasource list (#10005)
    
    * fix: fix ellipsis bug in table column
    
    * fix ellipsis bug in table column
    
    * fix: json-highlight component support nested jsonstring
    
    * fix: make datasource description show
---
 .../src/views/datasource/list/json-highlight.tsx               | 10 +++++++---
 dolphinscheduler-ui/src/views/datasource/list/use-columns.ts   |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx b/dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx
index 017702217c..26a3b67aa8 100644
--- a/dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx
+++ b/dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx
@@ -56,9 +56,13 @@ const syntaxHighlight = (json: string) => {
     lines.push(
       <NText tag='div' class={styles['line']}>
         <NText type='error'>"{key}": </NText>
-        <NText type={type}>
-          "{value}"{i !== len - 1 ? ',' : ''}
-        </NText>
+        {isPlainObject(value) ? (
+          syntaxHighlight(JSON.stringify(value))
+        ) : (
+          <NText type={type}>
+            "{value}"{i !== len - 1 ? ',' : ''}
+          </NText>
+        )}
       </NText>
     )
   }
diff --git a/dolphinscheduler-ui/src/views/datasource/list/use-columns.ts b/dolphinscheduler-ui/src/views/datasource/list/use-columns.ts
index 604e2fd720..c43d71fa23 100644
--- a/dolphinscheduler-ui/src/views/datasource/list/use-columns.ts
+++ b/dolphinscheduler-ui/src/views/datasource/list/use-columns.ts
@@ -83,7 +83,7 @@ export function useColumns(onCallback: Function) {
         title: t('datasource.description'),
         key: 'note',
         ...COLUMN_WIDTH_CONFIG['note'],
-        render: (rowData) => rowData.description || '-'
+        render: (rowData) => rowData.note || '-'
       },
       {
         title: t('datasource.create_time'),