diff --git a/src/components/Forms/Route/RouteRules/RuleForm/index.jsx b/src/components/Forms/Route/RouteRules/RuleForm/index.jsx index f9b644a1046..0c20388e788 100644 --- a/src/components/Forms/Route/RouteRules/RuleForm/index.jsx +++ b/src/components/Forms/Route/RouteRules/RuleForm/index.jsx @@ -108,8 +108,8 @@ export default class RuleForm extends React.Component { const { gateway } = this.props const service = get(data, 'http.paths[0].backend.serviceName') const _host = gateway.isHostName - ? gateway.loadBalancerIngress - : `${service}.${namespace}.${gateway.loadBalancerIngress}.nip.io` + ? gateway.defaultIngress + : `${service}.${namespace}.${gateway.defaultIngress}.nip.io` const namespace = gateway.namespace return host === _host ? 'auto' : 'specify' @@ -164,8 +164,8 @@ export default class RuleForm extends React.Component { ...data, protocol: 'http', host: gateway.isHostName - ? gateway.loadBalancerIngress - : `${service}.${namespace}.${gateway.loadBalancerIngress}.nip.io`, + ? gateway.defaultIngress + : `${service}.${namespace}.${gateway.defaultIngress}.nip.io`, }) } else { onSave(data) diff --git a/src/core/containers/Base/Detail/BaseInfo/Attributes/index.scss b/src/core/containers/Base/Detail/BaseInfo/Attributes/index.scss index 3b10ea540c7..7fa5869164f 100644 --- a/src/core/containers/Base/Detail/BaseInfo/Attributes/index.scss +++ b/src/core/containers/Base/Detail/BaseInfo/Attributes/index.scss @@ -32,8 +32,8 @@ display: block; margin-left: 111px; color: $text-color; - @include break-all; + white-space: pre-wrap; } } } diff --git a/src/pages/clusters/containers/Workload/Routes/index.jsx b/src/pages/clusters/containers/Workload/Routes/index.jsx index a0e1c4b48de..ee2b50b31b8 100644 --- a/src/pages/clusters/containers/Workload/Routes/index.jsx +++ b/src/pages/clusters/containers/Workload/Routes/index.jsx @@ -132,13 +132,7 @@ export default class Routers extends React.Component { dataIndex: 'loadBalancerIngress', isHideable: true, width: '22%', - render: loadBalancerIngress => ( -
- {loadBalancerIngress.map((item, index) => ( -

{item.ip || item.hostname}

- ))} -
- ), + render: loadBalancerIngress => loadBalancerIngress.join('; '), }, { title: t('Project'), diff --git a/src/pages/clusters/containers/Workload/Services/index.jsx b/src/pages/clusters/containers/Workload/Services/index.jsx index 1e6e6da5460..90c3c8ded89 100644 --- a/src/pages/clusters/containers/Workload/Services/index.jsx +++ b/src/pages/clusters/containers/Workload/Services/index.jsx @@ -23,6 +23,7 @@ import { Avatar, Text } from 'components/Base' import Banner from 'components/Cards/Banner' import { withClusterList, ListPage } from 'components/HOCs/withList' import ResourceTable from 'clusters/components/ResourceTable' +import ServiceAccess from 'projects/components/ServiceAccess' import { getLocalTime, getDisplayName } from 'utils' import { ICON_TYPES, SERVICE_TYPES } from 'utils/constants' @@ -162,30 +163,7 @@ export default class Services extends React.Component { dataIndex: 'specType', isHideable: true, width: '20%', - render: (type, record) => { - if (type === 'ClusterIP') { - return '-' - } - - if (type === 'NodePort') { - return ( - port.nodePort) - .map(port => `${port.port}:${port.nodePort}/${port.protocol}`) - .join(';')} - /> - ) - } - - return ( - - ) - }, + render: (_, record) => , }, { title: t('Created Time'), diff --git a/src/pages/fedprojects/containers/AdvancedSettings/InternetAccess/Access/index.jsx b/src/pages/fedprojects/containers/AdvancedSettings/InternetAccess/Access/index.jsx index 3e498c044e6..1835eeec68d 100644 --- a/src/pages/fedprojects/containers/AdvancedSettings/InternetAccess/Access/index.jsx +++ b/src/pages/fedprojects/containers/AdvancedSettings/InternetAccess/Access/index.jsx @@ -127,7 +127,7 @@ class InternetAccess extends React.Component { let ip = '-' if (isEmpty(gateway.externalIPs)) { - ip = gateway.loadBalancerIngress + ip = gateway.loadBalancerIngresses.join(', ') } else { ip = gateway.externalIPs.join(', ') } @@ -199,7 +199,7 @@ class InternetAccess extends React.Component { {gateway.type === 'NodePort' ? ( <> `${port.name}:${port.nodePort}`).join(', ') + return gateway.ports.map(port => `${port.name}:${port.nodePort}`).join('; ') } getExternalIP(gateway) { let ip = '-' if (isEmpty(gateway.externalIPs)) { - ip = gateway.loadBalancerIngress + ip = gateway.loadBalancerIngress.join('; ') } else { - ip = gateway.externalIPs.join(', ') + ip = gateway.externalIPs.join('; ') } return ip || '-' diff --git a/src/pages/fedprojects/containers/Routes/Detail/ResourceStatus/Item/index.jsx b/src/pages/fedprojects/containers/Routes/Detail/ResourceStatus/Item/index.jsx index 0515f0372c5..76ec11f25dc 100644 --- a/src/pages/fedprojects/containers/Routes/Detail/ResourceStatus/Item/index.jsx +++ b/src/pages/fedprojects/containers/Routes/Detail/ResourceStatus/Item/index.jsx @@ -42,16 +42,16 @@ export default class Item extends React.Component { return '-' } - return gateway.ports.map(port => `${port.name}:${port.nodePort}`).join(', ') + return gateway.ports.map(port => `${port.name}:${port.nodePort}`).join('; ') } getExternalIP(gateway) { let ip = '-' if (isEmpty(gateway.externalIPs)) { - ip = gateway.loadBalancerIngress + ip = gateway.loadBalancerIngress.join('; ') } else { - ip = gateway.externalIPs.join(', ') + ip = gateway.externalIPs.join('; ') } return ip || '-' diff --git a/src/pages/fedprojects/containers/Services/Detail/Ports/index.jsx b/src/pages/fedprojects/containers/Services/Detail/Ports/index.jsx index aad085fef84..a17055486bb 100644 --- a/src/pages/fedprojects/containers/Services/Detail/Ports/index.jsx +++ b/src/pages/fedprojects/containers/Services/Detail/Ports/index.jsx @@ -69,11 +69,9 @@ export default class Ports extends Component { - {gateway.loadBalancerIngress && ( + {gateway.defaultIngress && (