Merge "fix: Fix for lb status render"
This commit is contained in:
commit
ec26595faf
@ -31,6 +31,7 @@ const successKeys = [
|
||||
'resolved',
|
||||
'power on',
|
||||
'complete',
|
||||
'online',
|
||||
];
|
||||
|
||||
const successKeysContain = ['complete'];
|
||||
@ -55,6 +56,7 @@ const errorKeys = [
|
||||
'firing',
|
||||
'power off',
|
||||
'error',
|
||||
'offline',
|
||||
];
|
||||
|
||||
const errorKeysContain = ['fail'];
|
||||
|
@ -388,6 +388,7 @@
|
||||
"Custom Trait": "Custom Trait",
|
||||
"Custom UDP Rule": "Custom UDP Rule",
|
||||
"DCCP": "DCCP",
|
||||
"DEGRADED: One or more of the entity’s components are in ERROR": "DEGRADED: One or more of the entity’s components are in ERROR",
|
||||
"DHCP": "DHCP",
|
||||
"DHCP Agents": "DHCP Agents",
|
||||
"DNAT Rules": "DNAT Rules",
|
||||
@ -398,6 +399,7 @@
|
||||
"DPD Interval (sec)": "DPD Interval (sec)",
|
||||
"DPD actions controls the use of Dead Peer Detection Protocol.": "DPD actions controls the use of Dead Peer Detection Protocol.",
|
||||
"DPD timeout (sec)": "DPD timeout (sec)",
|
||||
"DRAINING: The member is not accepting new connections": "DRAINING: The member is not accepting new connections",
|
||||
"DSCP Marking": "DSCP Marking",
|
||||
"Danger": "Danger",
|
||||
"Data Disk": "Data Disk",
|
||||
@ -409,6 +411,7 @@
|
||||
"Debian": "Debian",
|
||||
"Dedicated": "Dedicated",
|
||||
"Default Policy": "Default Policy",
|
||||
"Degraded": "Degraded",
|
||||
"Delay Interval(s)": "Delay Interval(s)",
|
||||
"Delete": "Delete",
|
||||
"Delete Allowed Address Pair": "Delete Allowed Address Pair",
|
||||
@ -517,6 +520,7 @@
|
||||
"Download canceled!": "Download canceled!",
|
||||
"Download current data": "Download current data",
|
||||
"Downloading": "Downloading",
|
||||
"Draining": "Draining",
|
||||
"Driver": "Driver",
|
||||
"Driver Info": "Driver Info",
|
||||
"Driver Interface": "Driver Interface",
|
||||
@ -1031,6 +1035,7 @@
|
||||
"Next Hop": "Next Hop",
|
||||
"No": "No",
|
||||
"No Console": "No Console",
|
||||
"No Monitor": "No Monitor",
|
||||
"No Raid": "No Raid",
|
||||
"No State": "No State",
|
||||
"No Task": "No Task",
|
||||
@ -1060,9 +1065,11 @@
|
||||
"OS Version": "OS Version",
|
||||
"OSPF": "OSPF",
|
||||
"Off": "Off",
|
||||
"Offline": "Offline",
|
||||
"On": "On",
|
||||
"One entry per line(e.g. 114.114.114.114)": "One entry per line(e.g. 114.114.114.114)",
|
||||
"One entry per line(e.g. {ip})": "One entry per line(e.g. {ip})",
|
||||
"Online": "Online",
|
||||
"Online Resize": "Online Resize",
|
||||
"Only a MAC address or an OpenFlow based datapath_id of the switch are accepted in this field": "Only a MAC address or an OpenFlow based datapath_id of the switch are accepted in this field",
|
||||
"Open External Gateway": "Open External Gateway",
|
||||
|
@ -388,6 +388,7 @@
|
||||
"Custom Trait": "自定义特性",
|
||||
"Custom UDP Rule": "定制UDP规则",
|
||||
"DCCP": "",
|
||||
"DEGRADED: One or more of the entity’s components are in ERROR": "降级:一个或多个实体的组件都处于错误状态",
|
||||
"DHCP": "",
|
||||
"DHCP Agents": "DHCP服务",
|
||||
"DNAT Rules": "DNAT规则",
|
||||
@ -398,6 +399,7 @@
|
||||
"DPD Interval (sec)": "DPD最大延迟(秒)",
|
||||
"DPD actions controls the use of Dead Peer Detection Protocol.": "DPD动作控制对失效对端协议的处理方式。",
|
||||
"DPD timeout (sec)": "DPD超时时间(秒)",
|
||||
"DRAINING: The member is not accepting new connections": "满载:该成员不接受新的连接",
|
||||
"DSCP Marking": "DSCP标记",
|
||||
"Danger": "危险",
|
||||
"Data Disk": "数据盘",
|
||||
@ -409,6 +411,7 @@
|
||||
"Debian": "",
|
||||
"Dedicated": "专用",
|
||||
"Default Policy": "默认策略",
|
||||
"Degraded": "降级",
|
||||
"Delay Interval(s)": "检查间隔(秒)",
|
||||
"Delete": "删除",
|
||||
"Delete Allowed Address Pair": "删除可用地址对",
|
||||
@ -517,6 +520,7 @@
|
||||
"Download canceled!": "下载已取消!",
|
||||
"Download current data": "下载当前数据",
|
||||
"Downloading": "下载中",
|
||||
"Draining": "满载",
|
||||
"Driver": "驱动",
|
||||
"Driver Info": "驱动信息",
|
||||
"Driver Interface": "驱动接口",
|
||||
@ -1031,6 +1035,7 @@
|
||||
"Next Hop": "下一跳",
|
||||
"No": "否",
|
||||
"No Console": "",
|
||||
"No Monitor": "无监控",
|
||||
"No Raid": "",
|
||||
"No State": "无状态",
|
||||
"No Task": "空闲",
|
||||
@ -1060,9 +1065,11 @@
|
||||
"OS Version": "系统版本",
|
||||
"OSPF": "",
|
||||
"Off": "关",
|
||||
"Offline": "离线",
|
||||
"On": "开",
|
||||
"One entry per line(e.g. 114.114.114.114)": "每行一条(例如: 114.114.114.114)",
|
||||
"One entry per line(e.g. {ip})": "每行一条(例如: {ip})",
|
||||
"Online": "在线",
|
||||
"Online Resize": "在线修改配置",
|
||||
"Only a MAC address or an OpenFlow based datapath_id of the switch are accepted in this field": "只可填写交换机的Mac地址或者交换机基于openflow的数据路径ID",
|
||||
"Open External Gateway": "开启公网网关",
|
||||
|
@ -15,6 +15,7 @@
|
||||
import React from 'react';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import Base from 'containers/List';
|
||||
import { provisioningStatusCodes } from 'resources/lb';
|
||||
import globalPoolMemberStore from 'stores/octavia/pool-member';
|
||||
import { actionConfigs, adminActions } from './Actions';
|
||||
// import { toJS } from 'mobx';
|
||||
@ -73,6 +74,7 @@ export default class Members extends Base {
|
||||
{
|
||||
title: t('Status'),
|
||||
dataIndex: 'provisioning_status',
|
||||
render: (data) => provisioningStatusCodes[data],
|
||||
isHideable: true,
|
||||
},
|
||||
{
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { ListenerStore } from 'stores/octavia/listener';
|
||||
import { provisioningStatusCodes } from 'resources/lb';
|
||||
import Base from 'containers/TabDetail';
|
||||
import BaseDetail from './BaseDetail';
|
||||
import Members from './Member';
|
||||
@ -59,6 +60,7 @@ export default class ListenerDetail extends Base {
|
||||
{
|
||||
title: t('Status'),
|
||||
dataIndex: 'provisioning_status',
|
||||
render: (t) => provisioningStatusCodes[t],
|
||||
},
|
||||
{
|
||||
title: t('Max connect'),
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import Base from 'containers/List';
|
||||
import { provisioningStatusCodes } from 'resources/lb';
|
||||
import { ListenerStore } from 'stores/octavia/listener';
|
||||
import { actionConfigs, adminActions } from './Actions';
|
||||
|
||||
@ -68,6 +69,7 @@ export default class Listeners extends Base {
|
||||
{
|
||||
title: t('Status'),
|
||||
dataIndex: 'provisioning_status',
|
||||
render: (t) => provisioningStatusCodes[t],
|
||||
isHideable: true,
|
||||
},
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import Base from 'containers/TabDetail';
|
||||
import { LbaasStore } from 'stores/octavia/loadbalancer';
|
||||
import { provisioningStatusCodes } from 'resources/lb';
|
||||
import Listeners from '../../Listener';
|
||||
import { actionConfigs, adminActions } from '../actions';
|
||||
|
||||
@ -60,7 +61,7 @@ export default class LoadBalancerDetail extends Base {
|
||||
{
|
||||
title: t('Status'),
|
||||
dataIndex: 'provisioning_status',
|
||||
// render: data => loadBalancerStatus[data] || '-',
|
||||
render: (data) => provisioningStatusCodes[data],
|
||||
},
|
||||
{
|
||||
title: t('Network'),
|
||||
|
@ -12,9 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import React from 'react';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import Base from 'containers/List';
|
||||
import { Col, Row } from 'antd';
|
||||
import { LbaasStore } from 'stores/octavia/loadbalancer';
|
||||
import { operatingStatusCodes, provisioningStatusCodes } from 'resources/lb';
|
||||
import { lbEndpoint } from 'client/client/constants';
|
||||
import { actionConfigs, adminActions } from './actions';
|
||||
|
||||
@ -102,10 +105,24 @@ export default class LoadBalancerInstance extends Base {
|
||||
{
|
||||
title: t('Operating Status'),
|
||||
dataIndex: 'operating_status',
|
||||
render: (t) => operatingStatusCodes[t],
|
||||
titleTip: (
|
||||
<Row>
|
||||
<Col>
|
||||
{t('DRAINING: The member is not accepting new connections')}
|
||||
</Col>
|
||||
<Col>
|
||||
{t(
|
||||
'DEGRADED: One or more of the entity’s components are in ERROR'
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t('Provisioning Status'),
|
||||
dataIndex: 'provisioning_status',
|
||||
render: (t) => provisioningStatusCodes[t],
|
||||
},
|
||||
{
|
||||
title: t('Listener Number'),
|
||||
|
17
src/resources/lb.js
Normal file
17
src/resources/lb.js
Normal file
@ -0,0 +1,17 @@
|
||||
export const operatingStatusCodes = {
|
||||
ONLINE: t('Online'),
|
||||
DRAINING: t('Draining'),
|
||||
OFFLINE: t('Offline'),
|
||||
DEGRADED: t('Degraded'),
|
||||
ERROR: t('Error'),
|
||||
NO_MONITOR: t('No Monitor'),
|
||||
};
|
||||
|
||||
export const provisioningStatusCodes = {
|
||||
ACTIVE: t('Active'),
|
||||
DELETED: t('Deleted'),
|
||||
ERROR: t('Error'),
|
||||
PENDING_CREATE: t('Pending Create'),
|
||||
PENDING_UPDATE: t('Pending Update'),
|
||||
PENDING_DELETE: t('Pending Delete'),
|
||||
};
|
Loading…
Reference in New Issue
Block a user