fix(frontend): fixed incorrect loading of labels

pull/81/head
Samuel Rowe 3 years ago
parent 0a3da96798
commit b6ec438d4f

@ -113,10 +113,12 @@ export const getInitialValues = (node?: INetworkNodeItem): IEditNetworkForm => {
value: ipam?.options?.[key].toString() ?? "" value: ipam?.options?.[key].toString() ?? ""
}; };
}), }),
labels: Object.entries(labels as any).map(([key, value]: any) => ({ labels: labels
? Object.entries(labels as any).map(([key, value]: any) => ({
key, key,
value value
})) }))
: []
}; };
}; };

@ -135,10 +135,12 @@ export const getInitialValues = (node?: IServiceNodeItem): IEditServiceForm => {
return { hostPort, containerPort, protocol } as any; return { hostPort, containerPort, protocol } as any;
}), }),
labels: Object.entries(labels as any).map(([key, value]: any) => ({ labels: labels
? Object.entries(labels as any).map(([key, value]: any) => ({
key, key,
value value
})) }))
: []
}; };
}; };

@ -39,10 +39,12 @@ export const getInitialValues = (node?: IVolumeNodeItem): IEditVolumeForm => {
...initialValues, ...initialValues,
entryName: node_name, entryName: node_name,
volumeName: name, volumeName: name,
labels: Object.entries(labels as any).map(([key, value]: any) => ({ labels: labels
? Object.entries(labels as any).map(([key, value]: any) => ({
key, key,
value value
})) }))
: []
}; };
}; };

Loading…
Cancel
Save