mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-05-09 09:16:34 +00:00
14 lines
461 B
TypeScript
14 lines
461 B
TypeScript
import {Node} from './types';
|
|
|
|
/**
|
|
* @param {*status* object with a status field (most likely the row from the TableBody)}
|
|
* @returns the status text, as defined in https://kubernetes.io/docs/concepts/architecture/nodes/#condition
|
|
*/
|
|
function getReadyStatus({status}: Node) {
|
|
if (!status.conditions) return undefined;
|
|
const ready = status.conditions.find(y => y.type === 'Ready');
|
|
return ready && ready.status;
|
|
}
|
|
|
|
export default getReadyStatus;
|