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. 75
      dolphinscheduler-ui/src/views/projects/workflow/definition/components/table-action.tsx
  2. 48
      dolphinscheduler-ui/src/views/projects/workflow/instance/components/table-action.tsx
  3. 30
      dolphinscheduler-ui/src/views/projects/workflow/instance/index.tsx
  4. 42
      dolphinscheduler-ui/src/views/resource/components/resource/table/table-action.tsx

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

@ -184,20 +184,20 @@ 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 <NPopconfirm onPositiveClick={this.handleReleaseWorkflow}>
size='small' {{
type={releaseState === 'ONLINE' ? 'warning' : 'error'} default: () =>
tag='div' releaseState === 'ONLINE'
circle ? t('project.workflow.confirm_to_offline')
class='btn-publish' : t('project.workflow.confirm_to_online'),
> trigger: () => (
<NPopconfirm onPositiveClick={this.handleReleaseWorkflow}> <NButton
{{ size='small'
default: () => type={releaseState === 'ONLINE' ? 'warning' : 'error'}
releaseState === 'ONLINE' tag='div'
? t('project.workflow.confirm_to_offline') circle
: t('project.workflow.confirm_to_online'), class='btn-publish'
trigger: () => ( >
<NIcon> <NIcon>
{releaseState === 'ONLINE' ? ( {releaseState === 'ONLINE' ? (
<DownloadOutlined /> <DownloadOutlined />
@ -205,10 +205,10 @@ export default defineComponent({
<UploadOutlined /> <UploadOutlined />
)} )}
</NIcon> </NIcon>
) </NButton>
}} )
</NPopconfirm> }}
</NButton> </NPopconfirm>
) )
}} }}
</NTooltip> </NTooltip>
@ -253,33 +253,28 @@ export default defineComponent({
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => ( trigger: () => (
<NButton <NPopconfirm
size='small'
type='error'
tag='div'
circle
disabled={releaseState === 'ONLINE'} disabled={releaseState === 'ONLINE'}
class='btn-delete' onPositiveClick={this.handleDeleteWorkflow}
> >
<NPopconfirm {{
disabled={releaseState === 'ONLINE'} default: () => t('project.workflow.delete_confirm'),
onPositiveClick={this.handleDeleteWorkflow} trigger: () => (
> <NButton
{{ size='small'
default: () => t('project.workflow.delete_confirm'), type='error'
icon: () => ( tag='div'
<NIcon> circle
<InfoCircleFilled /> disabled={releaseState === 'ONLINE'}
</NIcon> class='btn-delete'
), >
trigger: () => (
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
) </NButton>
}} )
</NPopconfirm> }}
</NButton> </NPopconfirm>
) )
}} }}
</NTooltip> </NTooltip>

48
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,
@ -250,35 +249,30 @@ export default defineComponent({
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => ( trigger: () => (
<NButton <NPopconfirm onPositiveClick={this.handleDeleteInstance}>
tag='div' {{
size='small' default: () => t('project.workflow.delete_confirm'),
type='error' trigger: () => (
circle <NButton
disabled={ tag='div'
(state !== 'SUCCESS' && size='small'
state !== 'FAILURE' && type='error'
state !== 'STOP' && circle
state !== 'PAUSE') || disabled={
this.row?.disabled (state !== 'SUCCESS' &&
} state !== 'FAILURE' &&
> state !== 'STOP' &&
<NPopconfirm onPositiveClick={this.handleDeleteInstance}> state !== 'PAUSE') ||
{{ this.row?.disabled
default: () => t('project.workflow.delete_confirm'), }
icon: () => ( >
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
) </NButton>
}} )
</NPopconfirm> }}
</NButton> </NPopconfirm>
) )
}} }}
</NTooltip> </NTooltip>

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

@ -128,20 +128,22 @@ export default defineComponent({
{{ {{
default: () => t('project.workflow.delete'), default: () => t('project.workflow.delete'),
trigger: () => ( trigger: () => (
<NButton <NPopconfirm onPositiveClick={this.handleBatchDelete}>
tag='div' {{
type='primary' default: () => t('project.workflow.delete_confirm'),
disabled={this.checkedRowKeys.length <= 0} trigger: () => (
style='position: absolute; bottom: 10px; left: 10px;' <NButton
class='btn-delete-all' tag='div'
> type='primary'
<NPopconfirm onPositiveClick={this.handleBatchDelete}> disabled={this.checkedRowKeys.length <= 0}
{{ style='position: absolute; bottom: 10px; left: 10px;'
default: () => t('project.workflow.delete_confirm'), class='btn-delete-all'
trigger: () => t('project.workflow.delete') >
}} t('project.workflow.delete')
</NPopconfirm> </NButton>
</NButton> )
}}
</NPopconfirm>
) )
}} }}
</NTooltip> </NTooltip>

42
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,32 +221,27 @@ 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')} onPositiveClick={() => {
onPositiveClick={() => { this.handleDeleteFile({
this.handleDeleteFile({ fullName: this.row.fullName,
fullName: this.row.fullName, tenantCode: this.row.user_name
tenantCode: this.row.user_name })
}) }}
}} >
> {{
{{ default: () => t('resource.file.delete_confirm'),
default: () => t('resource.file.delete_confirm'), trigger: () => (
icon: () => ( <NButton size='tiny' type='error' circle class='btn-delete'>
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
<NIcon> <NIcon>
<DeleteOutlined /> <DeleteOutlined />
</NIcon> </NIcon>
) </NButton>
}} )
</NPopconfirm> }}
</NButton> </NPopconfirm>
) )
}} }}
</NTooltip> </NTooltip>

Loading…
Cancel
Save