Browse Source

improvement (#15018)

3.2.1-prepare
liyou 12 months 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.up_line'),
trigger: () => (
<NButton
size='small'
type={releaseState === 'ONLINE' ? 'warning' : 'error'}
tag='div'
circle
class='btn-publish'
>
<NPopconfirm onPositiveClick={this.handleReleaseWorkflow}>
{{
default: () =>
releaseState === 'ONLINE'
? t('project.workflow.confirm_to_offline')
: t('project.workflow.confirm_to_online'),
trigger: () => (
<NPopconfirm onPositiveClick={this.handleReleaseWorkflow}>
{{
default: () =>
releaseState === 'ONLINE'
? t('project.workflow.confirm_to_offline')
: t('project.workflow.confirm_to_online'),
trigger: () => (
<NButton
size='small'
type={releaseState === 'ONLINE' ? 'warning' : 'error'}
tag='div'
circle
class='btn-publish'
>
<NIcon>
{releaseState === 'ONLINE' ? (
<DownloadOutlined />
@ -205,10 +205,10 @@ export default defineComponent({
<UploadOutlined />
)}
</NIcon>
)
}}
</NPopconfirm>
</NButton>
</NButton>
)
}}
</NPopconfirm>
)
}}
</NTooltip>
@ -253,33 +253,28 @@ export default defineComponent({
{{
default: () => t('project.workflow.delete'),
trigger: () => (
<NButton
size='small'
type='error'
tag='div'
circle
<NPopconfirm
disabled={releaseState === 'ONLINE'}
class='btn-delete'
onPositiveClick={this.handleDeleteWorkflow}
>
<NPopconfirm
disabled={releaseState === 'ONLINE'}
onPositiveClick={this.handleDeleteWorkflow}
>
{{
default: () => t('project.workflow.delete_confirm'),
icon: () => (
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
{{
default: () => t('project.workflow.delete_confirm'),
trigger: () => (
<NButton
size='small'
type='error'
tag='div'
circle
disabled={releaseState === 'ONLINE'}
class='btn-delete'
>
<NIcon>
<DeleteOutlined />
</NIcon>
)
}}
</NPopconfirm>
</NButton>
</NButton>
)
}}
</NPopconfirm>
)
}}
</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 {
DeleteOutlined,
FormOutlined,
InfoCircleFilled,
SyncOutlined,
CloseOutlined,
CloseCircleOutlined,
@ -250,35 +249,30 @@ export default defineComponent({
{{
default: () => t('project.workflow.delete'),
trigger: () => (
<NButton
tag='div'
size='small'
type='error'
circle
disabled={
(state !== 'SUCCESS' &&
state !== 'FAILURE' &&
state !== 'STOP' &&
state !== 'PAUSE') ||
this.row?.disabled
}
>
<NPopconfirm onPositiveClick={this.handleDeleteInstance}>
{{
default: () => t('project.workflow.delete_confirm'),
icon: () => (
<NIcon>
<InfoCircleFilled />
</NIcon>
),
trigger: () => (
<NPopconfirm onPositiveClick={this.handleDeleteInstance}>
{{
default: () => t('project.workflow.delete_confirm'),
trigger: () => (
<NButton
tag='div'
size='small'
type='error'
circle
disabled={
(state !== 'SUCCESS' &&
state !== 'FAILURE' &&
state !== 'STOP' &&
state !== 'PAUSE') ||
this.row?.disabled
}
>
<NIcon>
<DeleteOutlined />
</NIcon>
)
}}
</NPopconfirm>
</NButton>
</NButton>
)
}}
</NPopconfirm>
)
}}
</NTooltip>

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

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

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

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

Loading…
Cancel
Save