mirror of https://github.com/rancher/dashboard.git
Merge pull request #7690 from catherineluse/ip
IP addresses render properly in Cluster Management
This commit is contained in:
commit
0011efd896
|
|
@ -37,13 +37,13 @@ export default {
|
|||
<template v-else>
|
||||
-
|
||||
</template>
|
||||
|
||||
/
|
||||
<template>
|
||||
<template v-if="isIp(row.internalIp) && internalSameAsExternal">
|
||||
/ {{ t('tableHeaders.internalIpSameAsExternal') }}
|
||||
<template v-if="internalSameAsExternal && isIp(row.internalIp)">
|
||||
{{ t('tableHeaders.internalIpSameAsExternal') }}
|
||||
</template>
|
||||
<template v-else-if="isIp(row.internalIp)">
|
||||
/<CopyToClipboard
|
||||
{{ row.internalIp }}<CopyToClipboard
|
||||
label-as="tooltip"
|
||||
:text="row.internalIp"
|
||||
class="icon-btn"
|
||||
|
|
|
|||
|
|
@ -243,12 +243,14 @@ export default class CapiMachine extends SteveModel {
|
|||
}
|
||||
|
||||
get internalIp() {
|
||||
// This shows in the IP address column for RKE2 nodes in the
|
||||
// list of nodes in the cluster detail page of Cluster Management.
|
||||
const internal = this.status?.addresses?.find(({ type }) => {
|
||||
return type === ADDRESSES.INTERNAL_IP;
|
||||
});
|
||||
})?.address;
|
||||
|
||||
if (internal) {
|
||||
return internal.address;
|
||||
return internal;
|
||||
}
|
||||
|
||||
return this.t('generic.none');
|
||||
|
|
@ -257,10 +259,10 @@ export default class CapiMachine extends SteveModel {
|
|||
get externalIp() {
|
||||
const external = this.status?.addresses?.find(({ type }) => {
|
||||
return type === ADDRESSES.EXTERNAL_IP;
|
||||
});
|
||||
})?.address;
|
||||
|
||||
if (external) {
|
||||
return external.address;
|
||||
return external;
|
||||
}
|
||||
|
||||
return this.t('generic.none');
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ export default class MgmtNode extends HybridModel {
|
|||
}
|
||||
|
||||
get internalIp() {
|
||||
// This shows in the IP address column for the list of
|
||||
// nodes in the cluster detail page of Cluster Management.
|
||||
// This shows in the IP address column for RKE1 nodes in the
|
||||
// list of nodes in the cluster detail page of Cluster Management.
|
||||
|
||||
const internal = this.status?.addresses?.find(({ type }) => {
|
||||
return type === ADDRESSES.INTERNAL_IP;
|
||||
|
|
|
|||
Loading…
Reference in New Issue