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 v-else>
|
||||||
-
|
-
|
||||||
</template>
|
</template>
|
||||||
|
/
|
||||||
<template>
|
<template>
|
||||||
<template v-if="isIp(row.internalIp) && internalSameAsExternal">
|
<template v-if="internalSameAsExternal && isIp(row.internalIp)">
|
||||||
/ {{ t('tableHeaders.internalIpSameAsExternal') }}
|
{{ t('tableHeaders.internalIpSameAsExternal') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="isIp(row.internalIp)">
|
<template v-else-if="isIp(row.internalIp)">
|
||||||
/<CopyToClipboard
|
{{ row.internalIp }}<CopyToClipboard
|
||||||
label-as="tooltip"
|
label-as="tooltip"
|
||||||
:text="row.internalIp"
|
:text="row.internalIp"
|
||||||
class="icon-btn"
|
class="icon-btn"
|
||||||
|
|
|
||||||
|
|
@ -243,12 +243,14 @@ export default class CapiMachine extends SteveModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
get internalIp() {
|
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 }) => {
|
const internal = this.status?.addresses?.find(({ type }) => {
|
||||||
return type === ADDRESSES.INTERNAL_IP;
|
return type === ADDRESSES.INTERNAL_IP;
|
||||||
});
|
})?.address;
|
||||||
|
|
||||||
if (internal) {
|
if (internal) {
|
||||||
return internal.address;
|
return internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.t('generic.none');
|
return this.t('generic.none');
|
||||||
|
|
@ -257,10 +259,10 @@ export default class CapiMachine extends SteveModel {
|
||||||
get externalIp() {
|
get externalIp() {
|
||||||
const external = this.status?.addresses?.find(({ type }) => {
|
const external = this.status?.addresses?.find(({ type }) => {
|
||||||
return type === ADDRESSES.EXTERNAL_IP;
|
return type === ADDRESSES.EXTERNAL_IP;
|
||||||
});
|
})?.address;
|
||||||
|
|
||||||
if (external) {
|
if (external) {
|
||||||
return external.address;
|
return external;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.t('generic.none');
|
return this.t('generic.none');
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,8 @@ export default class MgmtNode extends HybridModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
get internalIp() {
|
get internalIp() {
|
||||||
// This shows in the IP address column for the list of
|
// This shows in the IP address column for RKE1 nodes in the
|
||||||
// nodes in the cluster detail page of Cluster Management.
|
// list of nodes in the cluster detail page of Cluster Management.
|
||||||
|
|
||||||
const internal = this.status?.addresses?.find(({ type }) => {
|
const internal = this.status?.addresses?.find(({ type }) => {
|
||||||
return type === ADDRESSES.INTERNAL_IP;
|
return type === ADDRESSES.INTERNAL_IP;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue