|
|
@@ -25,6 +25,7 @@ class TencentResult extends Component {
|
|
|
return 'error!';
|
|
|
}
|
|
|
let group = data.project_by_id.apiGWGroup_id || {};
|
|
|
+ let projectType = data.project_by_id.projectType || 'graphql';
|
|
|
return (
|
|
|
<div>
|
|
|
{
|
|
|
@@ -75,8 +76,8 @@ class TencentResult extends Component {
|
|
|
<div className={'schema-name'}><FormattedMessage id='API manage'/></div>
|
|
|
<APIGWPathResult
|
|
|
group={group}
|
|
|
+ projectType={projectType}
|
|
|
switchMenu={this.props.switchMenu}
|
|
|
- switchAPI={this.props.switchAPI}
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -157,7 +158,7 @@ class APIGWPathResult extends Component {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- let {group} = this.props;
|
|
|
+ let {group, projectType} = this.props;
|
|
|
let {id, frontType, defaultDomain, environmentName} = group;
|
|
|
return (
|
|
|
<Query query={gql(SHOW_APIGWPATH)} variables={{apiGWGroup_id: id}}>
|
|
|
@@ -203,13 +204,18 @@ class APIGWPathResult extends Component {
|
|
|
<Col span={3}>
|
|
|
{/*<span className={'schema-table-content name'}>删除</span>*/}
|
|
|
{/* */}
|
|
|
- <span className={'schema-table-content name'}
|
|
|
- onClick={() => {
|
|
|
- this.props.switchMenu('menuLevel2', {key: 'graphiql'});
|
|
|
- this.props.switchAPI(frontType.slice(0, 4) + '://' + defaultDomain +'/'+ environmentName +path.apiGWPath)
|
|
|
- }}>
|
|
|
- <FormattedMessage id='try'/>
|
|
|
- </span>
|
|
|
+ {
|
|
|
+ projectType === 'graphql'?
|
|
|
+ <span className={'schema-table-content name'}
|
|
|
+ onClick={() => {
|
|
|
+ this.props.switchMenu('menuLevel2', {key: 'graphiql'});
|
|
|
+ }}>
|
|
|
+ <FormattedMessage id='try'/>
|
|
|
+ </span>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
+
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|