|
@@ -31,6 +31,16 @@ const toolTipTitle = {
|
|
|
'region': 'its region',
|
|
'region': 'its region',
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const youMustFill = {
|
|
|
|
|
+ 'groupName': true,
|
|
|
|
|
+ 'environmentName': true,
|
|
|
|
|
+ 'defaultDomain': true,
|
|
|
|
|
+ 'frontType': true,
|
|
|
|
|
+ 'userDomain': true,
|
|
|
|
|
+ 'userStatus': true,
|
|
|
|
|
+ 'region': true,
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const removePrefix = (prefix, value) => {
|
|
const removePrefix = (prefix, value) => {
|
|
|
let r = new RegExp(prefix);
|
|
let r = new RegExp(prefix);
|
|
|
return value.replace(r, '');
|
|
return value.replace(r, '');
|
|
@@ -44,8 +54,8 @@ const shiftPrefix = (prefix, value) => {
|
|
|
class APIGroupCard extends Component {
|
|
class APIGroupCard extends Component {
|
|
|
constructor(props) {
|
|
constructor(props) {
|
|
|
super(props);
|
|
super(props);
|
|
|
- let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = props.group;
|
|
|
|
|
- props.group !== '' ?
|
|
|
|
|
|
|
+ if(props.group !== '' && props.group !== null) {
|
|
|
|
|
+ let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = props.group;
|
|
|
this.state = {
|
|
this.state = {
|
|
|
showOK: false,
|
|
showOK: false,
|
|
|
groupName,
|
|
groupName,
|
|
@@ -56,7 +66,7 @@ class APIGroupCard extends Component {
|
|
|
userStatus,
|
|
userStatus,
|
|
|
groupRegion: region
|
|
groupRegion: region
|
|
|
}
|
|
}
|
|
|
- :
|
|
|
|
|
|
|
+ } else {
|
|
|
this.state = {
|
|
this.state = {
|
|
|
showOK: false,
|
|
showOK: false,
|
|
|
groupName: 'graphql_endpoint',
|
|
groupName: 'graphql_endpoint',
|
|
@@ -67,10 +77,11 @@ class APIGroupCard extends Component {
|
|
|
userStatus: 'open',
|
|
userStatus: 'open',
|
|
|
groupRegion: props.region === '' ? 'ap-beijing' : props.region,
|
|
groupRegion: props.region === '' ? 'ap-beijing' : props.region,
|
|
|
};
|
|
};
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
componentWillReceiveProps(next) {
|
|
componentWillReceiveProps(next) {
|
|
|
- if(next.group !== '') {
|
|
|
|
|
|
|
+ if(next.group !== '' && next.group !== null) {
|
|
|
let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = next.group;
|
|
let {groupName, environmentName, defaultDomain, frontType, userDomain, userStatus, region} = next.group;
|
|
|
this.setState( {
|
|
this.setState( {
|
|
|
groupName,
|
|
groupName,
|
|
@@ -179,7 +190,7 @@ class APIGroupCard extends Component {
|
|
|
<div>
|
|
<div>
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
|
<span className='vice-title'>{valueToKey['groupName']}
|
|
<span className='vice-title'>{valueToKey['groupName']}
|
|
|
- <span> </span>
|
|
|
|
|
|
|
+
|
|
|
<Tooltip placement="top" title={toolTipTitle['groupName']}>
|
|
<Tooltip placement="top" title={toolTipTitle['groupName']}>
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -190,7 +201,7 @@ class APIGroupCard extends Component {
|
|
|
|
|
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
|
<span className='vice-title'>{valueToKey['region']}
|
|
<span className='vice-title'>{valueToKey['region']}
|
|
|
- <span> </span>
|
|
|
|
|
|
|
+
|
|
|
<Tooltip placement="top" title={toolTipTitle['region']}>
|
|
<Tooltip placement="top" title={toolTipTitle['region']}>
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -209,7 +220,7 @@ class APIGroupCard extends Component {
|
|
|
|
|
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
|
<span className='vice-title'>{valueToKey['environmentName']}
|
|
<span className='vice-title'>{valueToKey['environmentName']}
|
|
|
- <span> </span>
|
|
|
|
|
|
|
+
|
|
|
<Tooltip placement="top" title={toolTipTitle['environmentName']}>
|
|
<Tooltip placement="top" title={toolTipTitle['environmentName']}>
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -226,7 +237,7 @@ class APIGroupCard extends Component {
|
|
|
|
|
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
|
<span className='vice-title'>{valueToKey['frontType']}
|
|
<span className='vice-title'>{valueToKey['frontType']}
|
|
|
- <span> </span>
|
|
|
|
|
|
|
+
|
|
|
<Tooltip placement="top" title={toolTipTitle['frontType']}>
|
|
<Tooltip placement="top" title={toolTipTitle['frontType']}>
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -240,7 +251,7 @@ class APIGroupCard extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
|
{/*<span className='vice-title'>{valueToKey['defaultDomain']}*/}
|
|
{/*<span className='vice-title'>{valueToKey['defaultDomain']}*/}
|
|
|
- {/*<span> </span>*/}
|
|
|
|
|
|
|
+ {/* */}
|
|
|
{/*<Tooltip placement="top" title={toolTipTitle['defaultDomain']}>*/}
|
|
{/*<Tooltip placement="top" title={toolTipTitle['defaultDomain']}>*/}
|
|
|
{/*<Icon type="question-circle"/>*/}
|
|
{/*<Icon type="question-circle"/>*/}
|
|
|
{/*</Tooltip>*/}
|
|
{/*</Tooltip>*/}
|
|
@@ -250,7 +261,7 @@ class APIGroupCard extends Component {
|
|
|
|
|
|
|
|
<div style={{marginBottom: 10}}>
|
|
<div style={{marginBottom: 10}}>
|
|
|
<span className='vice-title'>{valueToKey['userDomain']}
|
|
<span className='vice-title'>{valueToKey['userDomain']}
|
|
|
- <span> </span>
|
|
|
|
|
|
|
+
|
|
|
<Tooltip placement="top" title={toolTipTitle['userDomain']}>
|
|
<Tooltip placement="top" title={toolTipTitle['userDomain']}>
|
|
|
<Icon type="question-circle"/>
|
|
<Icon type="question-circle"/>
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
@@ -260,7 +271,7 @@ class APIGroupCard extends Component {
|
|
|
</div>
|
|
</div>
|
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
{/*<div style={{marginBottom: 10}}>*/}
|
|
|
{/*<span className='vice-title'>{valueToKey['userStatus']}*/}
|
|
{/*<span className='vice-title'>{valueToKey['userStatus']}*/}
|
|
|
- {/*<span> </span>*/}
|
|
|
|
|
|
|
+ {/* */}
|
|
|
{/*<Tooltip placement="top" title={toolTipTitle['userStatus']}>*/}
|
|
{/*<Tooltip placement="top" title={toolTipTitle['userStatus']}>*/}
|
|
|
{/*<Icon type="question-circle"/>*/}
|
|
{/*<Icon type="question-circle"/>*/}
|
|
|
{/*</Tooltip>*/}
|
|
{/*</Tooltip>*/}
|