Browse Source

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

3.0.0/version-upgrade
Devosend 2 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 && ( {!!props.definition && (
<VersionModal <VersionModal
isInstance={props.instance ? true : false}
v-model:row={props.definition.processDefinition} v-model:row={props.definition.processDefinition}
v-model:show={versionModalShow.value} v-model:show={versionModalShow.value}
onUpdateList={refreshDetail} 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) loadingRef: ref(false)
}) })
const createColumns = (variables: any) => { const createColumns = (variables: any, isInstance: boolean) => {
variables.columns = [ variables.columns = [
{ {
title: '#', title: '#',
@ -79,12 +79,15 @@ export function useTable(
{ {
title: t('project.workflow.create_time'), title: t('project.workflow.create_time'),
key: 'operateTime' key: 'operateTime'
}, }
{ ] as TableColumns<any>
if (!isInstance) {
variables.columns.push({
title: t('project.workflow.operation'), title: t('project.workflow.operation'),
key: 'operation', key: 'operation',
className: styles.operation, className: styles.operation,
render: (_row) => { render: (_row: any) => {
return h(NSpace, null, { return h(NSpace, null, {
default: () => [ default: () => [
h( h(
@ -154,8 +157,8 @@ export function useTable(
] ]
}) })
} }
} })
] as TableColumns<any> }
} }
const getTableData = (row: 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' import type { IDefinitionData } from '../types'
const props = { const props = {
isInstance: {
type: Boolean as PropType<boolean>,
default: false
},
show: { show: {
type: Boolean as PropType<boolean>, type: Boolean as PropType<boolean>,
default: false default: false
@ -67,13 +71,13 @@ export default defineComponent({
watch( watch(
() => props.show, () => props.show,
() => { () => {
createColumns(variables) createColumns(variables, props.isInstance)
requestData() requestData()
} }
) )
watch(useI18n().locale, () => { watch(useI18n().locale, () => {
createColumns(variables) createColumns(variables, props.isInstance)
}) })
return { return {

Loading…
Cancel
Save