You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/01/30 11:28:27 UTC
[dubbo-spi-extensions] 15/39: dubbo版本降到2.7.8; 调整前端UI
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/dubbo-spi-extensions.git
commit 31dbe2ec73d6d181ab14a4f52cf8bcf57710d073
Author: qq213539 <21...@qq.com>
AuthorDate: Thu Nov 19 09:48:34 2020 +0800
dubbo版本降到2.7.8; 调整前端UI
---
.../apidocs/examples/params/DemoParamBean1.java | 10 ++++++--
.../dubbo-api-docs-ui/src/locales/en-US.json | 2 ++
.../dubbo-api-docs-ui/src/locales/zh-CN.json | 2 ++
.../dubbo-api-docs-ui/src/pages/ApiForm/index.tsx | 29 ++++++++++++----------
dubbo-api-docs/pom.xml | 28 ++++++++++-----------
5 files changed, 42 insertions(+), 29 deletions(-)
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/DemoParamBean1.java b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/DemoParamBean1.java
index 8617515..b1025ea 100644
--- a/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/DemoParamBean1.java
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/DemoParamBean1.java
@@ -33,10 +33,16 @@ import java.util.Map;
@Setter
public class DemoParamBean1 {
- @RequestParam("Name")
+ @RequestParam(value = "Name", description = "说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试" +
+ "说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测" +
+ "说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测" +
+ "说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测" +
+ "说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测" +
+ "试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试说明测试")
private String name;
- @RequestParam("Age")
+ @RequestParam(value = "Age", description = "test description test description test description test description" +
+ " test description test description")
private Integer age;
private Boolean man;
diff --git a/dubbo-api-docs/dubbo-api-docs-ui/src/locales/en-US.json b/dubbo-api-docs/dubbo-api-docs-ui/src/locales/en-US.json
index e252ab6..7548477 100644
--- a/dubbo-api-docs/dubbo-api-docs-ui/src/locales/en-US.json
+++ b/dubbo-api-docs/dubbo-api-docs-ui/src/locales/en-US.json
@@ -18,6 +18,8 @@
"apiFunctionNameFormLabel": "Api function name(this parameter cannot be modified)",
"registryCenterUrlFormLabel": "Registry address. If it is empty, Dubbo provider IP and port will be used for direct connection",
"prarmNameLabel": "Parameter name",
+ "prarmPathLabel": "Parameter path",
+ "prarmDescriptionLabel": "Description",
"prarmRequiredLabel": "This parameter is required",
"doTestBtn": "Do Test",
"responseLabel": "Response",
diff --git a/dubbo-api-docs/dubbo-api-docs-ui/src/locales/zh-CN.json b/dubbo-api-docs/dubbo-api-docs-ui/src/locales/zh-CN.json
index 4434103..b008bc6 100644
--- a/dubbo-api-docs/dubbo-api-docs-ui/src/locales/zh-CN.json
+++ b/dubbo-api-docs/dubbo-api-docs-ui/src/locales/zh-CN.json
@@ -18,6 +18,8 @@
"apiFunctionNameFormLabel": "接口方法名(此参数不可修改)",
"registryCenterUrlFormLabel": "注册中心地址, 如果为空将使用Dubbo 提供者Ip和端口进行直连",
"prarmNameLabel": "参数名",
+ "prarmPathLabel": "参数位置",
+ "prarmDescriptionLabel": "说明",
"prarmRequiredLabel": "该参数为必填",
"doTestBtn": "测试",
"responseLabel": "响应",
diff --git a/dubbo-api-docs/dubbo-api-docs-ui/src/pages/ApiForm/index.tsx b/dubbo-api-docs/dubbo-api-docs-ui/src/pages/ApiForm/index.tsx
index 5c33b5b..8a9cf2d 100644
--- a/dubbo-api-docs/dubbo-api-docs-ui/src/pages/ApiForm/index.tsx
+++ b/dubbo-api-docs/dubbo-api-docs-ui/src/pages/ApiForm/index.tsx
@@ -24,6 +24,7 @@ import {
Input,
Loading,
Select,
+ Timeline,
} from '@alifd/next';
import $ from 'jquery';
import ReactJson from 'react-json-view';
@@ -216,12 +217,14 @@ class ApiForm extends React.Component {
formsArray.map((item, index) => {
return (
<div key={'formDiv' + index} style={{ marginTop: 20 }}>
- {this.state.locale.prarmNameLabel + ': ' + item.get('name')}
<div style={{ width: '1000px', height:'220px' }}>
- <div style={{ float: 'left', border: '2px solid #cccccc',
- width: '300px', height: '100%', padding: '5px' }}>
- Description:<br />
- {item.get('description')}
+ <div style={{ float: 'left', border: '2px solid rgb(228 224 224)',
+ width: '400px', height: '100%', overflowY: 'auto', overflowX: 'hidden'}}>
+ <Timeline>
+ <Timeline.Item style={{wordBreak: 'break-word'}} title={this.state.locale.prarmNameLabel} content={item.get('name')} state="process"/>
+ <Timeline.Item style={{wordBreak: 'break-word'}} title={this.state.locale.prarmPathLabel} content={item.get('paramType') + "#" + item.get('name')} state="process"/>
+ <Timeline.Item style={{wordBreak: 'break-word'}} title={this.state.locale.prarmDescriptionLabel} content={item.get('description')} state="process"/>
+ </Timeline>
</div>
<div style={{float: "left"}}>
<Form.Item
@@ -244,7 +247,7 @@ class ApiForm extends React.Component {
<Form.Submit
type={'primary'}
validate
- style={{ marginLeft: 20, marginTop: 20, width: '600px' }}
+ style={{ marginLeft: 20, marginTop: 20, width: '580px' }}
onClick={ this.doTestApi.bind(this) }
>
{this.state.locale.doTestBtn}
@@ -291,7 +294,7 @@ class ApiForm extends React.Component {
return (
<Input.TextArea
readOnly
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
rows={10}
/>
);
@@ -307,7 +310,7 @@ class ApiForm extends React.Component {
}
return (
<ReactJson
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
name={false}
theme='apathy'
iconStyle='square'
@@ -319,7 +322,7 @@ class ApiForm extends React.Component {
return (
<Input.TextArea
readOnly
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
rows={10}
defaultValue={this.state.responseInfo}
/>
@@ -332,7 +335,7 @@ class ApiForm extends React.Component {
return (
<Input.TextArea
readOnly
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
rows={10}
/>
);
@@ -343,7 +346,7 @@ class ApiForm extends React.Component {
}
return (
<ReactJson
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
name={false}
theme='apathy'
iconStyle='square'
@@ -354,7 +357,7 @@ class ApiForm extends React.Component {
} catch (e) {
return (
<Input.TextArea
- style={{ marginLeft: 5, minWidth: '600px' }}
+ style={{ marginLeft: 5, minWidth: '580px' }}
rows={10}
readOnly
value={this.state.responseData}
@@ -526,7 +529,7 @@ class ApiForm extends React.Component {
<Input.TextArea
name={item.get('paramType') + '@@' + item.get('paramIndex') + '@@' + item.get('javaType') + "@@" + item.get('name')}
className={'dubbo-doc-form-item-class'}
- style={{ marginLeft: 5, width: '600px' }}
+ style={{ marginLeft: 5, width: '580px' }}
rows={10}
placeholder={item.get('example')}
defaultValue={JSON.stringify(JSON.parse(item.get('subParamsJson')), null, 4)}
diff --git a/dubbo-api-docs/pom.xml b/dubbo-api-docs/pom.xml
index 9b81e6c..5c70aa5 100644
--- a/dubbo-api-docs/pom.xml
+++ b/dubbo-api-docs/pom.xml
@@ -29,7 +29,7 @@
<name>${project.artifactId}</name>
<description>Dubbo interface documentation, testing tools</description>
<properties>
- <revision>2.7.9-SNAPSHOT</revision>
+ <revision>2.7.8-SNAPSHOT</revision>
<project.build.jdkVersion>1.8</project.build.jdkVersion>
<argLine>-Dfile.encoding=UTF-8</argLine>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -40,7 +40,7 @@
<maven-flatten-version>1.1.0</maven-flatten-version>
<spring-boot.version>2.3.4.RELEASE</spring-boot.version>
- <dubbo-spring-boot.version>2.7.8</dubbo-spring-boot.version>
+ <dubbo.version>2.7.8</dubbo.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
<commons-collections.version>4.2</commons-collections.version>
<disruptor.version>3.4.2</disruptor.version>
@@ -60,7 +60,7 @@
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-parent</artifactId>
- <version>${revision}</version>
+ <version>${dubbo.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -85,61 +85,61 @@
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-nacos</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-consul</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-default</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-etcd3</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-multicast</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-multiple</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-redis</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-sofa</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-zookeeper</artifactId>
- <version>${project.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>
@@ -152,7 +152,7 @@
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
- <version>${dubbo-spring-boot.version}</version>
+ <version>${dubbo.version}</version>
</dependency>
<dependency>