Browse Source

[Fix][UI] Hide the version control button in workflow instance (#9825)

3.0.0/version-upgrade
Devosend 3 years ago committed by GitHub
parent
commit
bb2d4d18e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx
  2. 15
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts
  3. 8
      dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/version-modal.tsx

1
dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/index.tsx

@ -328,6 +328,7 @@ export default defineComponent({
/>
{!!props.definition && (
<VersionModal
isInstance={props.instance ? true : false}
v-model:row={props.definition.processDefinition}
v-model:show={versionModalShow.value}
onUpdateList={refreshDetail}

15
dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/use-table.ts

@ -46,7 +46,7 @@ export function useTable(
loadingRef: ref(false)
})
const createColumns = (variables: any) => {
const createColumns = (variables: any, isInstance: boolean) => {
variables.columns = [
{
title: '#',
@ -79,12 +79,15 @@ export function useTable(
{
title: t('project.workflow.create_time'),
key: 'operateTime'
},
{
}
] as TableColumns<any>
if (!isInstance) {
variables.columns.push({
title: t('project.workflow.operation'),
key: 'operation',
className: styles.operation,
render: (_row) => {
render: (_row: any) => {
return h(NSpace, null, {
default: () => [
h(
@ -154,8 +157,8 @@ export function useTable(
]
})
}
}
] as TableColumns<any>
})
}
}
const getTableData = (row: any) => {

8
dolphinscheduler-ui-next/src/views/projects/workflow/definition/components/version-modal.tsx

@ -26,6 +26,10 @@ import styles from '../index.module.scss'
import type { IDefinitionData } from '../types'
const props = {
isInstance: {
type: Boolean as PropType<boolean>,
default: false
},
show: {
type: Boolean as PropType<boolean>,
default: false
@ -67,13 +71,13 @@ export default defineComponent({
watch(
() => props.show,
() => {
createColumns(variables)
createColumns(variables, props.isInstance)
requestData()
}
)
watch(useI18n().locale, () => {
createColumns(variables)
createColumns(variables, props.isInstance)
})
return {

Loading…
Cancel
Save