Merge pull request #906 from loadchange/fe/v1.0

feat: console add instance table column
This commit is contained in:
Fury Zhu 2019-03-15 13:54:09 +08:00 committed by GitHub
commit fed016468a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 32 deletions

View File

@ -134,6 +134,7 @@ const I18N_CONF = {
editor: 'Edit',
offline: 'Offline',
online: 'Online',
ephemeral: 'Ephemeral',
},
EditInstanceDialog: {
port: 'Port',

View File

@ -134,6 +134,7 @@ const I18N_CONF = {
editor: '编辑',
offline: '下线',
online: '上线',
ephemeral: '临时实例',
},
EditInstanceDialog: {
port: '端口',

View File

@ -129,6 +129,7 @@ class EditClusterDialog extends React.Component {
>
<Select.Option value="TCP">TCP</Select.Option>
<Select.Option value="HTTP">HTTP</Select.Option>
<Select.Option value="NONE">NONE</Select.Option>
</Select>
</Form.Item>
<Form.Item label={`${checkPort}:`}>
@ -144,34 +145,22 @@ class EditClusterDialog extends React.Component {
onChange={useIPPort4Check => this.onChangeCluster({ useIPPort4Check })}
/>
</Form.Item>
{type === 'HTTP' ? (
<div>
<div className="next-row next-form-item next-left next-medium">
<div className="next-col next-col-fixed-12 next-form-item-label">
<label>{`${checkPath}:`}</label>
</div>
<div className="next-col next-col-12 next-form-item-control">
{type === 'HTTP' && [
<Form.Item label={`${checkPath}:`}>
<Input
className="in-text"
value={path}
onChange={path => healthCheckerChange({ path })}
/>
</div>
</div>
<div className="next-row next-form-item next-left next-medium">
<div className="next-col next-col-fixed-12 next-form-item-label">
<label>{`${checkHeaders}:`}</label>
</div>
<div className="next-col next-col-12 next-form-item-control">
</Form.Item>,
<Form.Item label={`${checkHeaders}:`}>
<Input
className="in-text"
value={headers}
onChange={headers => healthCheckerChange({ headers })}
/>
</div>
</div>
</div>
) : null}
</Form.Item>,
]}
<Form.Item label={`${locale.metadata}:`}>
<MonacoEditor
language={'properties'}

View File

@ -113,6 +113,12 @@ class InstanceTable extends React.Component {
<Table dataSource={instance.list} loading={loading} getRowProps={this.rowColor}>
<Table.Column width={138} title="IP" dataIndex="ip" />
<Table.Column width={100} title={locale.port} dataIndex="port" />
<Table.Column
width={100}
title={locale.ephemeral}
dataIndex="ephemeral"
cell={val => `${val}`}
/>
<Table.Column width={100} title={locale.weight} dataIndex="weight" />
<Table.Column
width={100}

File diff suppressed because one or more lines are too long