mirror of https://github.com/rancher/dashboard.git
Add IP address to cluster machine pools list. (#5869)
* Add IP address to cluster machine pools list.
This commit is contained in:
parent
6766947720
commit
f912874410
|
|
@ -4602,6 +4602,7 @@ tableHeaders:
|
|||
ingressDefaultBackend: Default
|
||||
ingressTarget: Target
|
||||
internalExternalIp: External/Internal IP
|
||||
ipaddress: IP Address
|
||||
jobs: Jobs
|
||||
key: Key
|
||||
keys: Data
|
||||
|
|
|
|||
|
|
@ -906,3 +906,10 @@ export const FLEET_BUNDLE_TYPE = {
|
|||
sort: ['bundleType'],
|
||||
width: 100,
|
||||
};
|
||||
|
||||
export const IP_ADDRESS = {
|
||||
name: 'ipaddress',
|
||||
value: 'ipaddress',
|
||||
labelKey: 'tableHeaders.ipaddress',
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -290,4 +290,9 @@ export const HCI = {
|
|||
|
||||
export const VIRTUAL_HARVESTER_PROVIDER = 'harvester';
|
||||
|
||||
export const ADDRESSES = {
|
||||
HOSTNAME: 'Hostname',
|
||||
INTERNAL_IP: 'InternalIP'
|
||||
};
|
||||
|
||||
export const DEFAULT_WORKSPACE = 'fleet-default';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Tab from '@shell/components/Tabbed/Tab';
|
|||
import { allHash } from '@shell/utils/promise';
|
||||
import { CAPI, MANAGEMENT, NORMAN, SNAPSHOT } from '@shell/config/types';
|
||||
import {
|
||||
STATE, NAME as NAME_COL, AGE, AGE_NORMAN, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME
|
||||
STATE, NAME as NAME_COL, AGE, AGE_NORMAN, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME, IP_ADDRESS
|
||||
} from '@shell/config/table-headers';
|
||||
import CustomCommand from '@shell/edit/provisioning.cattle.io.cluster/CustomCommand';
|
||||
import AsyncButton from '@shell/components/AsyncButton.vue';
|
||||
|
|
@ -267,6 +267,7 @@ export default {
|
|||
formatter: 'LinkDetail',
|
||||
formatterOpts: { reference: 'kubeNodeDetailLocation' }
|
||||
},
|
||||
IP_ADDRESS,
|
||||
MANAGEMENT_NODE_OS,
|
||||
ROLES,
|
||||
AGE
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import { MANAGEMENT_NODE } from '@shell/config/labels-annotations';
|
||||
import { CAPI, MANAGEMENT, NODE, NORMAN } from '@shell/config/types';
|
||||
import {
|
||||
ADDRESSES, CAPI, MANAGEMENT, NODE, NORMAN
|
||||
} from '@shell/config/types';
|
||||
import { NAME as EXPLORER } from '@shell/config/product/explorer';
|
||||
import { listNodeRoles } from '@shell/models/cluster/node';
|
||||
import { insertAt } from '@shell/utils/array';
|
||||
|
|
@ -129,6 +131,10 @@ export default class MgmtNode extends HybridModel {
|
|||
return false;
|
||||
}
|
||||
|
||||
get ipaddress() {
|
||||
return this.status.internalNodeStatus?.addresses?.find(({ type }) => type === ADDRESSES.INTERNAL_IP)?.address || '-';
|
||||
}
|
||||
|
||||
get canScaleDown() {
|
||||
const isInOnlyPool = this.pool?.provisioningCluster?.pools?.length === 1;
|
||||
const isOnlyNode = this.pool?.nodes?.length === 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue