Browse Source

[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
3.1.0-release
rockfang 3 years ago committed by GitHub
parent
commit
53cd7009de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      dolphinscheduler-ui/src/views/datasource/list/json-highlight.tsx
  2. 2
      dolphinscheduler-ui/src/views/datasource/list/use-columns.ts

10
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>
)
}

2
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'),

Loading…
Cancel
Save