Skip to content
Snippets Groups Projects
Commit ea9aba48 authored by juzhiyuan's avatar juzhiyuan
Browse files

fix: ant-design/ant-design/issues/27396

parent 5afc1392
No related branches found
Tags v2.0-rc2
No related merge requests found
import { pickBy, identity, omit } from 'lodash';
import { pickBy, identity, omit, pick } from 'lodash';
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
......@@ -62,6 +62,10 @@ export const transformRequest = (
}
if (nodes) {
// NOTE: https://github.com/ant-design/ant-design/issues/27396
data.nodes = data.nodes?.map((item) => {
return pick(item, ['host', 'port', 'weight']);
});
return data;
}
......
......@@ -15,7 +15,7 @@
* limitations under the License.
*/
declare namespace UpstreamModule {
type Node = Record<string, number>;
type Node = Record<string, number | string>;
type Type = 'roundrobin' | 'chash' | 'ewma';
type Timeout = Record<'connect' | 'send' | 'read', number>;
......@@ -66,7 +66,7 @@ declare namespace UpstreamModule {
id: string;
upstream_id: string;
type: Type;
nodes?: Node;
nodes?: Node[];
k8s_deployment_info?: K8SDeploymentInfo;
hash_on?: 'vars' | 'header' | 'cookie' | 'consumer';
key?: string;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment