balibabu commited on
Commit
aaea411
·
1 Parent(s): b03b316

Feat: Limit the iteration start node to only be the source node #4242 (#4260)

Browse files

### What problem does this PR solve?

Feat: Limit the iteration start node to only be the source node #4242

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/src/locales/en.ts CHANGED
@@ -1093,6 +1093,9 @@ This delimiter is used to split the input text into several text pieces echo of
1093
  minus: 'Minus',
1094
  semicolon: 'Semicolon',
1095
  },
 
 
 
1096
  },
1097
  footer: {
1098
  profile: 'All rights reserved @ React',
 
1093
  minus: 'Minus',
1094
  semicolon: 'Semicolon',
1095
  },
1096
+ addVariable: 'Add variable',
1097
+ variableSettings: 'Variable settings',
1098
+ globalVariables: 'Global variables',
1099
  },
1100
  footer: {
1101
  profile: 'All rights reserved @ React',
web/src/locales/zh-traditional.ts CHANGED
@@ -1030,6 +1030,8 @@ export default {
1030
  minus: '減號',
1031
  semicolon: '分號',
1032
  },
 
 
1033
  },
1034
  footer: {
1035
  profile: '“保留所有權利 @ react”',
 
1030
  minus: '減號',
1031
  semicolon: '分號',
1032
  },
1033
+ addVariable: '新增變數',
1034
+ variableSettings: '變數設定',
1035
  },
1036
  footer: {
1037
  profile: '“保留所有權利 @ react”',
web/src/locales/zh.ts CHANGED
@@ -1074,6 +1074,8 @@ export default {
1074
  minus: '减号',
1075
  semicolon: '分号',
1076
  },
 
 
1077
  },
1078
  footer: {
1079
  profile: 'All rights reserved @ React',
 
1074
  minus: '减号',
1075
  semicolon: '分号',
1076
  },
1077
+ addVariable: '新增变量',
1078
+ variableSettings: '变量设置',
1079
  },
1080
  footer: {
1081
  profile: 'All rights reserved @ React',
web/src/pages/flow/canvas/edge/index.tsx CHANGED
@@ -44,8 +44,6 @@ export function ButtonEdge({
44
  };
45
 
46
  // highlight the nodes that the workflow passes through
47
- // const queryClient = useQueryClient();
48
- // const flowDetail = queryClient.getQueryData<IFlow>(['flowDetail']);
49
  const { data: flowDetail } = useFetchFlow();
50
 
51
  const graphPath = useMemo(() => {
 
44
  };
45
 
46
  // highlight the nodes that the workflow passes through
 
 
47
  const { data: flowDetail } = useFetchFlow();
48
 
49
  const graphPath = useMemo(() => {
web/src/pages/flow/canvas/node/iteration-node.tsx CHANGED
@@ -109,6 +109,7 @@ export function IterationStartNode({
109
  isConnectable={isConnectable}
110
  className={styles.handle}
111
  style={RightHandleStyle}
 
112
  ></Handle>
113
  <div>
114
  <ListRestart className="size-7" />
 
109
  isConnectable={isConnectable}
110
  className={styles.handle}
111
  style={RightHandleStyle}
112
+ isConnectableEnd={false}
113
  ></Handle>
114
  <div>
115
  <ListRestart className="size-7" />
web/src/pages/flow/form/begin-form/paramater-modal.tsx CHANGED
@@ -3,6 +3,7 @@ import { IModalProps } from '@/interfaces/common';
3
  import { Form, Input, Modal, Select, Switch } from 'antd';
4
  import { DefaultOptionType } from 'antd/es/select';
5
  import { useEffect, useMemo } from 'react';
 
6
  import { BeginQueryType, BeginQueryTypeIconMap } from '../../constant';
7
  import { BeginQuery } from '../../interface';
8
  import BeginDynamicOptions from './begin-dynamic-options';
@@ -16,6 +17,7 @@ export const ModalForm = ({
16
  initialValue: BeginQuery;
17
  otherThanCurrentQuery: BeginQuery[];
18
  }) => {
 
19
  const [form] = Form.useForm();
20
  const options = useMemo(() => {
21
  return Object.values(BeginQueryType).reduce<DefaultOptionType[]>(
@@ -56,7 +58,7 @@ export const ModalForm = ({
56
 
57
  return (
58
  <Modal
59
- title="Begin query"
60
  open={visible}
61
  onOk={onOk}
62
  onCancel={hideModal}
 
3
  import { Form, Input, Modal, Select, Switch } from 'antd';
4
  import { DefaultOptionType } from 'antd/es/select';
5
  import { useEffect, useMemo } from 'react';
6
+ import { useTranslation } from 'react-i18next';
7
  import { BeginQueryType, BeginQueryTypeIconMap } from '../../constant';
8
  import { BeginQuery } from '../../interface';
9
  import BeginDynamicOptions from './begin-dynamic-options';
 
17
  initialValue: BeginQuery;
18
  otherThanCurrentQuery: BeginQuery[];
19
  }) => {
20
+ const { t } = useTranslation();
21
  const [form] = Form.useForm();
22
  const options = useMemo(() => {
23
  return Object.values(BeginQueryType).reduce<DefaultOptionType[]>(
 
58
 
59
  return (
60
  <Modal
61
+ title={t('flow.variableSettings')}
62
  open={visible}
63
  onOk={onOk}
64
  onCancel={hideModal}
web/src/pages/flow/form/components/dynamic-input-variable.tsx CHANGED
@@ -91,7 +91,7 @@ const DynamicVariableForm = ({ node }: IProps) => {
91
  icon={<PlusOutlined />}
92
  className={styles.addButton}
93
  >
94
- {t('flow.addItem')}
95
  </Button>
96
  </Form.Item>
97
  </>
 
91
  icon={<PlusOutlined />}
92
  className={styles.addButton}
93
  >
94
+ {t('flow.addVariable')}
95
  </Button>
96
  </Form.Item>
97
  </>