mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-05-19 06:06:42 +00:00
Display taints in node panel
This commit is contained in:
@@ -75,6 +75,7 @@ export default class Node extends Base {
|
||||
<Field name='Container Runtime' value={item.status.nodeInfo.containerRuntimeVersion} />
|
||||
<Field name='Kubelet' value={item.status.nodeInfo.kubeletVersion} />
|
||||
<Field name='Kube Proxy' value={item.status.nodeInfo.kubeProxyVersion} />
|
||||
<Field name='Taints'>{getTaints(item)}</Field>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -118,6 +119,15 @@ export default class Node extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render "taints" divs from the node spec
|
||||
*
|
||||
* @param spec spec from a node item
|
||||
*/
|
||||
function getTaints({ spec }) {
|
||||
return _.map(spec.taints, ({key, effect}) => <div key={key}> <span>{key}</span> • <span title={key}> {effect} </span></div>);
|
||||
}
|
||||
|
||||
function getUptime({status}) {
|
||||
const ready = status.conditions.find(y => y.type === 'Ready');
|
||||
if (!ready) return 'N/A';
|
||||
|
||||
Reference in New Issue
Block a user