Skip to content

Commit 337cf17

Browse files
committed
feat(ui): show hostnames for Gateway resource in node info summary
Display the attribute on Gateway objects by reading from the live resource state, consistent with how hostnames are shown for Service resources. Closes #26962 Signed-off-by: Farhan Ramadhan <nak.rokesselalu@gmail.com>
1 parent e1bb509 commit 337cf17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/src/app/applications/components/application-node-info/application-node-info.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ export const ApplicationNodeInfo = (props: {
156156
attributes.push({title: 'HOSTNAMES', value: hostNames});
157157
} else if (props.node.kind === 'ReplicaSet') {
158158
attributes.push({title: 'REPLICAS', value: `${props.live.spec?.replicas || 0}/${props.live.status?.readyReplicas || 0}/${props.live.status?.replicas || 0}`});
159+
} else if (props.node.kind === 'Gateway') {
160+
let hostNames = '';
161+
const status = props.live.status;
162+
if (status && status.addresses) {
163+
hostNames = (status.addresses || []).map((item: any) => item.value).join(', ');
164+
}
165+
attributes.push({title: 'HOSTNAMES', value: hostNames});
159166
}
160167
}
161168

0 commit comments

Comments
 (0)