Implement KubeObjectStatusText extension API (#1188)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-11-11 08:57:15 +02:00
1 parent d15692a50e
commit 85c4a10114
64 files changed
+4050 -66

No files matched your search

@@ -7,6 +7,10 @@
text-overflow: ellipsis;
}
&.warning {
@include table-cell-warning;
}
&.cpu {
flex: 1.0;
align-self: center;
+3
View File
@@ -16,6 +16,7 @@ import { bytesToUnits } from "../../utils/convertMemory";
import { Tooltip, TooltipPosition } from "../tooltip";
import kebabCase from "lodash/kebabCase";
import upperFirst from "lodash/upperFirst";
import { KubeObjectStatusIcon } from "../kube-object-status-icon";
enum sortBy {
name = "name",
@@ -148,6 +149,7 @@ export class Nodes extends React.Component<Props> {
renderHeaderTitle={<Trans>Nodes</Trans>}
renderTableHeader={[
{ title: <Trans>Name</Trans>, className: "name", sortBy: sortBy.name },
{ className: "warning" },
{ title: <Trans>CPU</Trans>, className: "cpu", sortBy: sortBy.cpu },
{ title: <Trans>Memory</Trans>, className: "memory", sortBy: sortBy.memory },
{ title: <Trans>Disk</Trans>, className: "disk", sortBy: sortBy.disk },
@@ -161,6 +163,7 @@ export class Nodes extends React.Component<Props> {
const tooltipId = `node-taints-${node.getId()}`;
return [
node.getName(),
<KubeObjectStatusIcon object={node} />,
this.renderCpuUsage(node),
this.renderMemoryUsage(node),
this.renderDiskUsage(node),