mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use string representation of a BigInt as sortingCallback for ClusterIP.
- Re-order sortingCallbacks object to follow column order. Signed-off-by: devodev <abalexandrebarone@gmail.com>
This commit is contained in:
parent
e3783054a8
commit
9aff5fb7d4
@ -30,6 +30,7 @@ import { Badge } from "../badge";
|
|||||||
import { serviceStore } from "./services.store";
|
import { serviceStore } from "./services.store";
|
||||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||||
import type { ServicesRouteParams } from "../../../common/routes";
|
import type { ServicesRouteParams } from "../../../common/routes";
|
||||||
|
import { ipAddressStringToBigInt } from "../../utils";
|
||||||
|
|
||||||
enum columnId {
|
enum columnId {
|
||||||
name = "name",
|
name = "name",
|
||||||
@ -57,10 +58,10 @@ export class Services extends React.Component<Props> {
|
|||||||
sortingCallbacks={{
|
sortingCallbacks={{
|
||||||
[columnId.name]: (service: Service) => service.getName(),
|
[columnId.name]: (service: Service) => service.getName(),
|
||||||
[columnId.namespace]: (service: Service) => service.getNs(),
|
[columnId.namespace]: (service: Service) => service.getNs(),
|
||||||
[columnId.selector]: (service: Service) => service.getSelector(),
|
|
||||||
[columnId.ports]: (service: Service) => (service.spec.ports || []).map(({ port }) => port)[0],
|
|
||||||
[columnId.clusterIp]: (service: Service) => service.getClusterIp(),
|
|
||||||
[columnId.type]: (service: Service) => service.getType(),
|
[columnId.type]: (service: Service) => service.getType(),
|
||||||
|
[columnId.clusterIp]: (service: Service) => ipAddressStringToBigInt(service.getClusterIp()).toString(),
|
||||||
|
[columnId.ports]: (service: Service) => (service.spec.ports || []).map(({ port }) => port)[0],
|
||||||
|
[columnId.selector]: (service: Service) => service.getSelector(),
|
||||||
[columnId.age]: (service: Service) => service.getTimeDiffFromNow(),
|
[columnId.age]: (service: Service) => service.getTimeDiffFromNow(),
|
||||||
[columnId.status]: (service: Service) => service.getStatus(),
|
[columnId.status]: (service: Service) => service.getStatus(),
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user