Display IP Address on RKE2 cluster nodes #5735 (#6062)

* Add IP address to RKE2 cluster machine pools list.
This commit is contained in:
Shavindra 2022-06-01 12:32:50 +02:00 committed by GitHub
parent da72a9c4b5
commit cfd6f6cf82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -251,6 +251,7 @@ export default {
formatter: 'LinkDetail',
formatterOpts: { reference: 'kubeNodeDetailLocation' }
},
IP_ADDRESS,
MACHINE_NODE_OS,
ROLES,
AGE,

View File

@ -1,4 +1,4 @@
import { CAPI, NODE } from '@shell/config/types';
import { ADDRESSES, CAPI, NODE } from '@shell/config/types';
import { CAPI as CAPI_LABELS, MACHINE_ROLES } from '@shell/config/labels-annotations';
import { NAME as EXPLORER } from '@shell/config/product/explorer';
import { listNodeRoles } from '@shell/models/cluster/node';
@ -241,4 +241,8 @@ export default class CapiMachine extends SteveModel {
get isRunning() {
return this.status.phase === 'Running';
}
get ipaddress() {
return this.status?.addresses?.find(({ type }) => type === ADDRESSES.INTERNAL_IP)?.address || '-';
}
}