mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-05-19 14:16:57 +00:00
Use lodash _.has to check the master label in MetadataColumns
This commit is contained in:
@@ -72,8 +72,8 @@ export function MetadataColumns({item, href, includeNamespace, resourceClass}) {
|
||||
/>
|
||||
<div className='td_iconLabel'>{item.kind}</div>
|
||||
|
||||
{/** If the node is a master, display a simple "MASTER" label below the item.kind icon */}
|
||||
{item.metadata.labels && Object.entries(item.metadata.labels).some(([key, _]) => key === "node-role.kubernetes.io/master")
|
||||
{/** If the node is a master, display a simple "MASTER" label below the item.kind icon */
|
||||
_.has(item.metadata.labels, ['node-role.kubernetes.io/master'])
|
||||
&& <span className='td_iconLabel node-master'>MASTER</span>}
|
||||
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user