mirror of https://github.com/portainer/portainer
kubernetes: improved the node view [r8s-47] (#108)
parent
08d77b4333
commit
e6577ca269
|
@ -14,7 +14,7 @@ export const conditions = columnHelper.accessor((row) => getConditions(row), {
|
|||
Conditions
|
||||
<Tooltip
|
||||
position="top"
|
||||
message="Green indicates the node is healthy. Orange indicates the node is experiencing MemoryPressure, DiskPressure, or PIDPressure."
|
||||
message="Empty indicates the node is healthy. Orange indicates the node is experiencing MemoryPressure, DiskPressure, NetworkUnavailable or PIDPressure."
|
||||
/>
|
||||
</>
|
||||
),
|
||||
|
@ -45,9 +45,9 @@ function ConditionsCell({
|
|||
|
||||
function getConditions(node: NodeRowData) {
|
||||
return (
|
||||
// exclude the Ready condition as it is already being utilised in the Status column
|
||||
// exclude the Ready condition and search for unhealthy conditions
|
||||
node.status?.conditions?.filter(
|
||||
(condition) => condition.type !== 'Ready'
|
||||
(condition) => condition.type !== 'Ready' && condition.status === 'True'
|
||||
) ?? []
|
||||
);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,9 @@ function StatusCell({
|
|||
|
||||
function getStatus(node: NodeRowData) {
|
||||
return (
|
||||
node.status?.conditions?.find((condition) => condition.status === 'True')
|
||||
?.type ?? 'Not ready'
|
||||
// only look for the ready type to identify if the node is either ready or not ready
|
||||
node.status?.conditions?.find(
|
||||
(condition) => condition.status === 'True' && condition.type === 'Ready'
|
||||
)?.type ?? 'Not Ready'
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue