Skip to content

Commit 0e32650

Browse files
authored
[Bug][dinky-web] Remove slash checks for jm url (#4414)
1 parent e07349a commit 0e32650

5 files changed

Lines changed: 6 additions & 11 deletions

File tree

dinky-web/src/locales/en-US/pages.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ export default {
931931
'rc.ci.jmha.tips':
932932
'Add the RestApi address of the JobManager of the Flink cluster. In HA mode, the addresses are separated by commas, for example: 192.168.123.101:8081',
933933
'rc.ci.jmha.validate.port': 'Does not meet the rules! Port number range [0-65535]',
934-
'rc.ci.jmha.validate.slash': 'Does not comply with the rules! Cannot contain /',
935934
'rc.ci.jmhaPlaceholder': 'Please enter the JobManager HA address!',
936935
'rc.ci.management': 'Cluster Instance Management',
937936
'rc.ci.modify': 'Modify cluster Instance',

dinky-web/src/locales/zh-CN/pages.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,6 @@ export default {
855855
'rc.ci.jmha.tips':
856856
'添加 Flink 集群的 JobManager 的 RestApi 地址。当 HA 模式时,地址间用英文逗号分隔,例如:192.168.123.101:8081',
857857
'rc.ci.jmha.validate.port': '不符合规则! 端口号区间[0-65535]',
858-
'rc.ci.jmha.validate.slash': '不符合规则! 不能包含/',
859858
'rc.ci.jmhaPlaceholder': '请输入 JobManager HA 地址!',
860859
'rc.ci.management': '集群实例管理',
861860
'rc.ci.modify': '修改集群',

dinky-web/src/pages/DevOps/JobDetail/JobOperator/components/EditJobInstanceForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { CLUSTER_INSTANCE_TYPE } from '@/pages/RegCenter/Cluster/constants';
21-
import { validatorJMHAAdderess } from '@/pages/RegCenter/Cluster/Instance/components/function';
21+
import { validatorJMHAAddress } from '@/pages/RegCenter/Cluster/Instance/components/function';
2222
import { handleAddOrUpdate } from '@/services/BusinessCrud';
2323
import { API_CONSTANTS } from '@/services/endpoints';
2424
import { Jobs } from '@/types/DevOps/data';
@@ -97,7 +97,7 @@ const EditJobInstanceForm = (props: {
9797
rules={[
9898
{
9999
required: true,
100-
validator: (rule, hostsValue) => validatorJMHAAdderess(rule, hostsValue)
100+
validator: (rule, hostsValue) => validatorJMHAAddress(rule, hostsValue)
101101
}
102102
]}
103103
placeholder={l('rc.ci.jmhaPlaceholder')}

dinky-web/src/pages/RegCenter/Cluster/Instance/components/InstanceModal/InstanceForm/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { ClusterType, CLUSTER_INSTANCE_TYPE } from '@/pages/RegCenter/Cluster/constants';
21-
import { validatorJMHAAdderess } from '@/pages/RegCenter/Cluster/Instance/components/function';
21+
import { validatorJMHAAddress } from '@/pages/RegCenter/Cluster/Instance/components/function';
2222
import { Cluster } from '@/types/RegCenter/data.d';
2323
import { l } from '@/utils/intl';
2424
import {
@@ -82,7 +82,7 @@ const InstanceForm: React.FC<InstanceFormProps> = (props) => {
8282
rules={[
8383
{
8484
required: true,
85-
validator: (rule, hostsValue) => validatorJMHAAdderess(rule, hostsValue)
85+
validator: (rule, hostsValue) => validatorJMHAAddress(rule, hostsValue)
8686
}
8787
]}
8888
placeholder={l('rc.ci.jmhaPlaceholder')}

dinky-web/src/pages/RegCenter/Cluster/Instance/components/function.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,17 @@ import { RuleObject } from 'rc-field-form/es/interface';
2727
const { Text, Paragraph, Link } = Typography;
2828

2929
/**
30-
* validatorJMHAAdderess
30+
* validatorJMHAAddress
3131
* @param rule
3232
* @param value
3333
*/
34-
export const validatorJMHAAdderess = (rule: RuleObject, value = '') => {
34+
export const validatorJMHAAddress = (rule: RuleObject, value = '') => {
3535
let hostArray = [];
3636
if (value.trim().length === 0) {
3737
return Promise.reject(new Error(l('rc.ci.jmhaPlaceholder')));
3838
} else {
3939
hostArray = value.split(',');
4040
for (let i = 0; i < hostArray.length; i++) {
41-
if (hostArray[i].includes('/')) {
42-
return Promise.reject(new Error(l('rc.ci.jmha.validate.slash')));
43-
}
4441
if (parseInt(hostArray[i].split(':')[1]) >= 65535) {
4542
return Promise.reject(new Error(l('rc.ci.jmha.validate.port')));
4643
}

0 commit comments

Comments
 (0)