Skip to content

Commit

Permalink
[Fix-10002] Fix some bugs in datasource list (apache#10005)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rockfang authored May 12, 2022
1 parent 8d17fd2 commit 53cd700
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 53cd700

Please sign in to comment.