Skip to content

Commit

Permalink
Merge pull request alibaba#738 from loadchange/issues-735
Browse files Browse the repository at this point in the history
Fix Issues alibaba#735
  • Loading branch information
jameslcj authored Feb 28, 2019
2 parents f62c66e + 589d6c3 commit 04bc0e2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ const I18N_CONF = {
protectThreshold: '保护阈值',
serviceName: '服务名',
editService: '编辑服务',
healthCheckPatternService: '服务端',
healthCheckPatternClient: '客户端',
healthCheckPatternNone: '禁止',
},
EditServiceDialog: {
createService: '创建服务',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(',');
Expand Down Expand Up @@ -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 />
Expand Down
2 changes: 1 addition & 1 deletion console/src/main/resources/static/css/main.css

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.

0 comments on commit 04bc0e2

Please sign in to comment.