Browse Source

[Improvement-14111][UI] Add a tooltip for the copy button of workflow definition. (#14116)

3.2.0-release
calvin 2 years ago committed by GitHub
parent
commit
f384d71da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui/src/locales/en_US/project.ts
  2. 1
      dolphinscheduler-ui/src/locales/zh_CN/project.ts
  3. 54
      dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts

1
dolphinscheduler-ui/src/locales/en_US/project.ts

@ -80,6 +80,7 @@ export default {
up_line: 'Online',
down_line: 'Offline',
copy_workflow: 'Copy Workflow',
copy_workflow_name: 'Copy workflow name',
cron_manage: 'Cron manage',
delete: 'Delete',
tree_view: 'Tree View',

1
dolphinscheduler-ui/src/locales/zh_CN/project.ts

@ -82,6 +82,7 @@ export default {
up_line: '上线',
down_line: '下线',
copy_workflow: '复制工作流',
copy_workflow_name: '复制工作流名称',
cron_manage: '定时管理',
delete: '删除',
tree_view: '工作流树形图',

54
dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts

@ -31,7 +31,7 @@ import {
} from '@/service/modules/process-definition'
import TableAction from './components/table-action'
import styles from './index.module.scss'
import { NTag, NSpace, NIcon, NButton, NEllipsis } from 'naive-ui'
import { NTag, NSpace, NIcon, NButton, NEllipsis, NTooltip } from 'naive-ui'
import { CopyOutlined } from '@vicons/antd'
import ButtonLink from '@/components/button-link'
import {
@ -129,17 +129,21 @@ export function useTable() {
key: 'copy',
...COLUMN_WIDTH_CONFIG['copy'],
render: (row) =>
h(
NButton,
{
quaternary: true,
circle: true,
type: 'info',
size: 'tiny',
onClick: () => void copy(row.name)
},
{ icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
)
h(NTooltip, null, {
trigger: () =>
h(
NButton,
{
quaternary: true,
circle: true,
type: 'info',
size: 'tiny',
onClick: () => void copy(row.name)
},
{ icon: () => h(NIcon, { size: 16 }, () => h(CopyOutlined)) }
),
default: () => t('project.workflow.copy_workflow_name')
})
},
{
title: t('project.workflow.status'),
@ -148,19 +152,19 @@ export function useTable() {
render: (row) =>
row.releaseState === 'ONLINE'
? h(
NTag,
{ type: 'success', size: 'small' },
{
default: () => t('project.workflow.up_line')
}
)
NTag,
{ type: 'success', size: 'small' },
{
default: () => t('project.workflow.up_line')
}
)
: h(
NTag,
{ type: 'warning', size: 'small' },
{
default: () => t('project.workflow.down_line')
}
)
NTag,
{ type: 'warning', size: 'small' },
{
default: () => t('project.workflow.down_line')
}
)
},
{
title: t('project.workflow.schedule_publish_status'),
@ -309,7 +313,7 @@ export function useTable() {
})
}
const batchCopyWorkflow = () => { }
const batchCopyWorkflow = () => {}
const releaseWorkflow = (row: any) => {
const data = {

Loading…
Cancel
Save