1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Display toleration's value in pod-details (#3384)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-07-16 08:57:26 -04:00 committed by GitHub
parent e87b4836be
commit eef5dd5f9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,7 @@ export interface IToleration {
key?: string; key?: string;
operator?: string; operator?: string;
effect?: string; effect?: string;
value?: string;
tolerationSeconds?: number; tolerationSeconds?: number;
} }

View File

@ -35,6 +35,7 @@ enum sortBy {
Operator = "operator", Operator = "operator",
Effect = "effect", Effect = "effect",
Seconds = "seconds", Seconds = "seconds",
Value = "value",
} }
const sortingCallbacks = { const sortingCallbacks = {
@ -45,7 +46,7 @@ const sortingCallbacks = {
}; };
const getTableRow = (toleration: IToleration) => { const getTableRow = (toleration: IToleration) => {
const { key, operator, effect, tolerationSeconds } = toleration; const { key, operator, effect, tolerationSeconds, value } = toleration;
return ( return (
<TableRow <TableRow
@ -55,6 +56,7 @@ const getTableRow = (toleration: IToleration) => {
> >
<TableCell className="key">{key}</TableCell> <TableCell className="key">{key}</TableCell>
<TableCell className="operator">{operator}</TableCell> <TableCell className="operator">{operator}</TableCell>
<TableCell className="value">{value}</TableCell>
<TableCell className="effect">{effect}</TableCell> <TableCell className="effect">{effect}</TableCell>
<TableCell className="seconds">{tolerationSeconds}</TableCell> <TableCell className="seconds">{tolerationSeconds}</TableCell>
</TableRow> </TableRow>
@ -74,6 +76,7 @@ export function PodTolerations({ tolerations }: Props) {
<TableHead sticky={false}> <TableHead sticky={false}>
<TableCell className="key" sortBy={sortBy.Key}>Key</TableCell> <TableCell className="key" sortBy={sortBy.Key}>Key</TableCell>
<TableCell className="operator" sortBy={sortBy.Operator}>Operator</TableCell> <TableCell className="operator" sortBy={sortBy.Operator}>Operator</TableCell>
<TableCell className="value" sortBy={sortBy.Value}>Value</TableCell>
<TableCell className="effect" sortBy={sortBy.Effect}>Effect</TableCell> <TableCell className="effect" sortBy={sortBy.Effect}>Effect</TableCell>
<TableCell className="seconds" sortBy={sortBy.Seconds}>Seconds</TableCell> <TableCell className="seconds" sortBy={sortBy.Seconds}>Seconds</TableCell>
</TableHead> </TableHead>