Browse Source

improvement (#15018)

3.2.1-prepare
liyou 1 year ago committed by GitHub
parent
commit
d983e36ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 37
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/table-action.tsx
  2. 16
      dolphinscheduler-ui/src/views/projects/workflow/instance/components/table-action.tsx
  3. 12
      dolphinscheduler-ui/src/views/projects/workflow/instance/index.tsx
  4. 10
      dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx

37
dolphinscheduler-ui/src/views/projects/workflow/definition/components/table-action.tsx

@ -184,13 +184,6 @@ export default defineComponent({
? t('project.workflow.down_line') ? t('project.workflow.down_line')
: t('project.workflow.up_line'), : t('project.workflow.up_line'),
trigger: () => ( trigger: () => (
<NButton
size='small'
type={releaseState === 'ONLINE' ? 'warning' : 'error'}
tag='div'
circle
class='btn-publish'
>
<NPopconfirm onPositiveClick={this.handleReleaseWorkflow}> <NPopconfirm onPositiveClick={this.handleReleaseWorkflow}>
{{ {{
default: () => default: () =>
@ -198,6 +191,13 @@ export default defineComponent({
? t('project.workflow.confirm_to_offline') ? t('project.workflow.confirm_to_offline')
: t('project.workflow.confirm_to_online'), : t('project.workflow.confirm_to_online'),
trigger: () => ( trigger: () => (
<NButton
size='small'
type={releaseState === 'ONLINE' ? 'warning' : 'error'}
tag='div'
circle
class='btn-publish'
>
<NIcon> <NIcon>
{releaseState === 'ONLINE' ? ( {releaseState === 'ONLINE' ? (
<DownloadOutlined /> <DownloadOutlined />
@ -205,10 +205,10 @@ export default defineComponent({
<UploadOutlined /> <UploadOutlined />
)} )}
</NIcon> </NIcon>
</NButton>
) )
}} }}
</NPopconfirm> </NPopconfirm>
</NButton>
) )
}} }}
</NTooltip> </NTooltip>
@ -252,6 +252,13 @@ export default defineComponent({
<NTooltip trigger={'hover'}> <NTooltip trigger={'hover'}>
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => (
<NPopconfirm
disabled={releaseState === 'ONLINE'}
onPositiveClick={this.handleDeleteWorkflow}
>
{{
default: () => t('project.workflow.delete_confirm'),
trigger: () => ( trigger: () => (
<NButton <NButton
size='small' size='small'
@ -261,25 +268,13 @@ export default defineComponent({
disabled={releaseState === 'ONLINE'} disabled={releaseState === 'ONLINE'}
class='btn-delete' class='btn-delete'
> >
<NPopconfirm
disabled={releaseState === 'ONLINE'}
onPositiveClick={this.handleDeleteWorkflow}
>
{{
default: () => t('project.workflow.delete_confirm'),
icon: () => (
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
</NButton>
) )
}} }}
</NPopconfirm> </NPopconfirm>
</NButton>
) )
}} }}
</NTooltip> </NTooltip>

16
dolphinscheduler-ui/src/views/projects/workflow/instance/components/table-action.tsx

@ -20,7 +20,6 @@ import { NSpace, NTooltip, NButton, NIcon, NPopconfirm } from 'naive-ui'
import { import {
DeleteOutlined, DeleteOutlined,
FormOutlined, FormOutlined,
InfoCircleFilled,
SyncOutlined, SyncOutlined,
CloseOutlined, CloseOutlined,
CloseCircleOutlined, CloseCircleOutlined,
@ -249,6 +248,10 @@ export default defineComponent({
<NTooltip trigger={'hover'}> <NTooltip trigger={'hover'}>
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => (
<NPopconfirm onPositiveClick={this.handleDeleteInstance}>
{{
default: () => t('project.workflow.delete_confirm'),
trigger: () => ( trigger: () => (
<NButton <NButton
tag='div' tag='div'
@ -263,22 +266,13 @@ export default defineComponent({
this.row?.disabled this.row?.disabled
} }
> >
<NPopconfirm onPositiveClick={this.handleDeleteInstance}>
{{
default: () => t('project.workflow.delete_confirm'),
icon: () => (
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
</NButton>
) )
}} }}
</NPopconfirm> </NPopconfirm>
</NButton>
) )
}} }}
</NTooltip> </NTooltip>

12
dolphinscheduler-ui/src/views/projects/workflow/instance/index.tsx

@ -127,6 +127,10 @@ export default defineComponent({
<NTooltip> <NTooltip>
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => (
<NPopconfirm onPositiveClick={this.handleBatchDelete}>
{{
default: () => t('project.workflow.delete_confirm'),
trigger: () => ( trigger: () => (
<NButton <NButton
tag='div' tag='div'
@ -135,13 +139,11 @@ export default defineComponent({
style='position: absolute; bottom: 10px; left: 10px;' style='position: absolute; bottom: 10px; left: 10px;'
class='btn-delete-all' class='btn-delete-all'
> >
<NPopconfirm onPositiveClick={this.handleBatchDelete}> t('project.workflow.delete')
{{ </NButton>
default: () => t('project.workflow.delete_confirm'), )
trigger: () => t('project.workflow.delete')
}} }}
</NPopconfirm> </NPopconfirm>
</NButton>
) )
}} }}
</NTooltip> </NTooltip>

10
dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx

@ -23,7 +23,6 @@ import {
DownloadOutlined, DownloadOutlined,
FormOutlined, FormOutlined,
EditOutlined, EditOutlined,
InfoCircleFilled,
UploadOutlined UploadOutlined
} from '@vicons/antd' } from '@vicons/antd'
import _ from 'lodash' import _ from 'lodash'
@ -222,7 +221,6 @@ export default defineComponent({
{{ {{
default: () => t('resource.file.delete'), default: () => t('resource.file.delete'),
trigger: () => ( trigger: () => (
<NButton size='tiny' type='error' circle class='btn-delete'>
<NPopconfirm <NPopconfirm
positive-text={t('resource.file.confirm')} positive-text={t('resource.file.confirm')}
negative-text={t('resource.file.cancel')} negative-text={t('resource.file.cancel')}
@ -235,19 +233,15 @@ export default defineComponent({
> >
{{ {{
default: () => t('resource.file.delete_confirm'), default: () => t('resource.file.delete_confirm'),
icon: () => (
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => ( trigger: () => (
<NButton size='tiny' type='error' circle class='btn-delete'>
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
</NButton>
) )
}} }}
</NPopconfirm> </NPopconfirm>
</NButton>
) )
}} }}
</NTooltip> </NTooltip>

Loading…
Cancel
Save