mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Implement KubeObjectStatusText extension API (#1188)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
d15692a50e
commit
85c4a10114
64 files changed
+4050
-66
No files matched your search
@@ -3,5 +3,9 @@
|
||||
&.rules {
|
||||
flex-grow: 3.0;
|
||||
}
|
||||
|
||||
&.warning {
|
||||
@include table-cell-warning;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,11 @@ import React from "react"
|
||||
import { observer } from "mobx-react";
|
||||
import { RouteComponentProps } from "react-router-dom"
|
||||
import { IngressRouteParams } from "./ingresses.route"
|
||||
import { Ingress, ingressApi } from "../../api/endpoints/ingress.api"
|
||||
import { Ingress } from "../../api/endpoints/ingress.api"
|
||||
import { ingressStore } from "./ingress.store";
|
||||
import { KubeObjectMenu, KubeObjectMenuProps } from "../kube-object/kube-object-menu";
|
||||
import { KubeObjectListLayout } from "../kube-object";
|
||||
import { Trans } from "@lingui/macro";
|
||||
import { apiManager } from "../../api/api-manager";
|
||||
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
|
||||
|
||||
enum sortBy {
|
||||
name = "name",
|
||||
@@ -38,6 +37,7 @@ export class Ingresses extends React.Component<Props> {
|
||||
renderHeaderTitle={<Trans>Ingresses</Trans>}
|
||||
renderTableHeader={[
|
||||
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
|
||||
{ className: "warning" },
|
||||
{ title: <Trans>Namespace</Trans>, className: "namespace", sortBy: sortBy.namespace },
|
||||
{ title: <Trans>LoadBalancers</Trans>, className: "loadbalancers" },
|
||||
{ title: <Trans>Rules</Trans>, className: "rules" },
|
||||
@@ -45,6 +45,7 @@ export class Ingresses extends React.Component<Props> {
|
||||
]}
|
||||
renderTableContents={(ingress: Ingress) => [
|
||||
ingress.getName(),
|
||||
<KubeObjectStatusIcon object={ingress} />,
|
||||
ingress.getNs(),
|
||||
ingress.getLoadBalancers().map(lb => <p key={lb}>{lb}</p>),
|
||||
ingress.getRoutes().map(route => <p key={route}>{route}</p>),
|
||||
|
||||
Reference in new issue
Block a user