|
|
@@ -1,5 +1,5 @@
|
|
|
import React, {Component} from 'react';
|
|
|
-import {Input, Collapse, Button, Radio, Icon} from 'antd';
|
|
|
+import {Input, Collapse, Button, Radio, Icon, Tooltip} from 'antd';
|
|
|
import {ADD_APIGROUP, UPDATE_APIGROUP} from "../../../../gql";
|
|
|
import {request} from 'graphql-request'
|
|
|
import {idGen} from "../../../../func";
|
|
|
@@ -21,6 +21,16 @@ const valueToKey = {
|
|
|
'region': 'region',
|
|
|
};
|
|
|
|
|
|
+const toolTipTitle = {
|
|
|
+ 'groupName': 'its groupName',
|
|
|
+ 'environmentName': 'its environmentName',
|
|
|
+ 'defaultDomain': 'its defaultDomain',
|
|
|
+ 'frontType': 'its frontType',
|
|
|
+ 'userDomain': 'its userDomain',
|
|
|
+ 'userStatus': 'its userStatus',
|
|
|
+ 'region': 'its region',
|
|
|
+};
|
|
|
+
|
|
|
class APIGroupCard extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
@@ -158,12 +168,22 @@ class APIGroupCard extends Component {
|
|
|
<Collapse bordered={false}>
|
|
|
<Panel header="Want more options?" style={customPanelStyle}>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['groupName']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['groupName']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['groupName']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Input value={this.state.groupName} style={{width: 400}}
|
|
|
onChange={this.switchConfig('groupName')}/>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['region']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['region']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['region']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Radio.Group onChange={this.switchConfig('groupRegion')} value={this.state.groupRegion} buttonStyle="solid">
|
|
|
<Radio.Button value="guangzhou">Guangzhou</Radio.Button>
|
|
|
<Radio.Button value="shanghai">Shanghai</Radio.Button>
|
|
|
@@ -172,7 +192,12 @@ class APIGroupCard extends Component {
|
|
|
</Radio.Group>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['frontType']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['frontType']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['frontType']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Radio.Group onChange={this.switchConfig('frontType')} defaultValue={this.state.frontType}
|
|
|
buttonStyle="solid">
|
|
|
<Radio.Button value="http">http</Radio.Button>
|
|
|
@@ -181,11 +206,21 @@ class APIGroupCard extends Component {
|
|
|
</Radio.Group>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['defaultDomain']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['defaultDomain']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['defaultDomain']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Input value={this.state.defaultDomain} style={{width: 400}} disabled/>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['environmentName']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['environmentName']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['environmentName']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Radio.Group onChange={this.switchConfig('environmentName')} defaultValue={this.state.environmentName}
|
|
|
buttonStyle="solid">
|
|
|
<Radio.Button value="test">test</Radio.Button>
|
|
|
@@ -194,12 +229,22 @@ class APIGroupCard extends Component {
|
|
|
</Radio.Group>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['userDomain']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['userDomain']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['userDomain']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Input value={this.state.userDomain} style={{width: 400}}
|
|
|
onChange={this.switchConfig('userDomain')}/>
|
|
|
</div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
|
- <span className='vice-title'>{valueToKey['userStatus']}: </span>
|
|
|
+ <span className='vice-title'>{valueToKey['userStatus']}
|
|
|
+ <span> </span>
|
|
|
+ <Tooltip placement="top" title={toolTipTitle['userStatus']}>
|
|
|
+ <Icon type="question-circle"/>
|
|
|
+ </Tooltip>
|
|
|
+ </span>
|
|
|
<Radio.Group onChange={this.switchConfig('userStatus')} defaultValue={this.state.userStatus}
|
|
|
buttonStyle="solid">
|
|
|
<Radio.Button value="open">open</Radio.Button>
|