Browse Source

support to resize the columns (#13123)

3.2.0-release
calvin 2 years ago committed by GitHub
parent
commit
26b7541d95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      dolphinscheduler-ui/src/views/projects/task/definition/use-table.ts
  2. 12
      dolphinscheduler-ui/src/views/projects/task/instance/use-table.ts
  3. 16
      dolphinscheduler-ui/src/views/projects/workflow/instance/use-table.ts

20
dolphinscheduler-ui/src/views/projects/task/definition/use-table.ts

@ -67,6 +67,9 @@ export function useTable(onEdit: Function) {
title: t('project.task.task_name'), title: t('project.task.task_name'),
key: 'taskName', key: 'taskName',
...COLUMN_WIDTH_CONFIG['linkName'], ...COLUMN_WIDTH_CONFIG['linkName'],
resizable: true,
minWidth: 200,
maxWidth: 600,
render: (row: IRecord) => render: (row: IRecord) =>
h( h(
ButtonLink, ButtonLink,
@ -75,18 +78,23 @@ export function useTable(onEdit: Function) {
}, },
{ {
default: () => default: () =>
h( h(
NEllipsis, NEllipsis,
COLUMN_WIDTH_CONFIG['linkEllipsis'], {
() => row.taskName style: 'max-width: 580px;line-height: 1.5'
) },
() => row.taskName
)
} }
) )
}, },
{ {
title: t('project.task.workflow_name'), title: t('project.task.workflow_name'),
key: 'processDefinitionName', key: 'processDefinitionName',
...COLUMN_WIDTH_CONFIG['name'] ...COLUMN_WIDTH_CONFIG['name'],
resizable: true,
minWidth: 200,
maxWidth: 600
}, },
{ {
title: t('project.task.workflow_state'), title: t('project.task.workflow_state'),

12
dolphinscheduler-ui/src/views/projects/task/instance/use-table.ts

@ -95,12 +95,18 @@ export function useTable() {
{ {
title: t('project.task.task_name'), title: t('project.task.task_name'),
key: 'name', key: 'name',
...COLUMN_WIDTH_CONFIG['name'] ...COLUMN_WIDTH_CONFIG['name'],
resizable: true,
minWidth: 200,
maxWidth: 600,
}, },
{ {
title: t('project.task.workflow_instance'), title: t('project.task.workflow_instance'),
key: 'processInstanceName', key: 'processInstanceName',
...COLUMN_WIDTH_CONFIG['linkName'], ...COLUMN_WIDTH_CONFIG['linkName'],
resizable: true,
minWidth: 300,
maxWidth: 600,
render: (row: { render: (row: {
processInstanceId: number processInstanceId: number
processInstanceName: string processInstanceName: string
@ -119,7 +125,9 @@ export function useTable() {
default: () => default: () =>
h( h(
NEllipsis, NEllipsis,
COLUMN_WIDTH_CONFIG['linkEllipsis'], {
style: 'max-width: 580px;line-height: 1.5'
},
() => row.processInstanceName () => row.processInstanceName
) )
} }

16
dolphinscheduler-ui/src/views/projects/workflow/instance/use-table.ts

@ -85,6 +85,10 @@ export function useTable() {
key: 'name', key: 'name',
...COLUMN_WIDTH_CONFIG['linkName'], ...COLUMN_WIDTH_CONFIG['linkName'],
className: 'workflow-name', className: 'workflow-name',
resizable: true,
width: 300,
minWidth: 300,
maxWidth: 600,
render: (row: IWorkflowInstance) => render: (row: IWorkflowInstance) =>
h( h(
ButtonLink, ButtonLink,
@ -98,11 +102,13 @@ export function useTable() {
}, },
{ {
default: () => default: () =>
h( h(
NEllipsis, NEllipsis,
COLUMN_WIDTH_CONFIG['linkEllipsis'], {
() => row.name style: 'max-width: 580px;line-height: 1.5'
) },
() => row.name
)
} }
) )
}, },

Loading…
Cancel
Save