fix: closes #735

This commit is contained in:
LoadChange 2019-02-01 15:27:49 +08:00
parent e33f2b0f49
commit 589d6c3413
5 changed files with 21 additions and 10 deletions

View File

@ -110,6 +110,9 @@ const I18N_CONF = {
protectThreshold: 'Protect Threshold',
serviceName: 'Service Name',
editService: 'Edit Service',
healthCheckPatternService: 'Service',
healthCheckPatternClient: 'Client',
healthCheckPatternNone: 'None',
},
EditServiceDialog: {
createService: 'Create Service',

View File

@ -110,6 +110,9 @@ const I18N_CONF = {
protectThreshold: '保护阈值',
serviceName: '服务名',
editService: '编辑服务',
healthCheckPatternService: '服务端',
healthCheckPatternClient: '客户端',
healthCheckPatternNone: '禁止',
},
EditServiceDialog: {
createService: '创建服务',

View File

@ -91,6 +91,11 @@ class ServiceDetail extends React.Component {
const { locale = {} } = this.props;
const { serviceName, loading, service = {}, clusters } = this.state;
const { metadata = {}, selector = {} } = service;
const healthCheckMap = {
server: locale.healthCheckPatternService,
client: locale.healthCheckPatternClient,
none: locale.healthCheckPatternNone,
};
const metadataText = Object.keys(metadata)
.map(key => `${key}=${metadata[key]}`)
.join(',');
@ -134,7 +139,7 @@ class ServiceDetail extends React.Component {
<Input value={service.protectThreshold} readOnly />
</FormItem>
<FormItem label={`${locale.healthCheckPattern}:`}>
<Input value={service.healthCheckMode} readOnly />
<Input value={healthCheckMap[service.healthCheckMode]} readOnly />
</FormItem>
<FormItem label={`${locale.metadata}:`}>
<Input value={metadataText} readOnly />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long