This is an automated email from the ASF dual-hosted git repository.

ranke pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1bcac95  Ready to release 0.3.0 (#797)
1bcac95 is described below

commit 1bcac959b3f2c669f6b7ca77767050472d4f47f4
Author: 邪影oO <[email protected]>
AuthorDate: Fri Aug 13 14:32:10 2021 +0800

    Ready to release 0.3.0 (#797)
    
    Modified version to 0.3.0; Adjust POM dependencies and use Dubbo's 
dependency version control; Add display of version on UI; Add 0.3.0 docker 
related scripts;
---
 docker/{latest => 0.3.0}/Dockerfile                |  6 +-
 docker/{latest => }/entrypoint.sh                  |  1 -
 docker/latest/Dockerfile                           |  4 +-
 docker/stack.yml                                   |  4 +-
 .../src/bin/config/application.properties          | 56 ++++++++------
 dubbo-admin-server/pom.xml                         | 10 +++
 dubbo-admin-test/pom.xml                           |  1 -
 dubbo-admin-ui/dubbo-admin-info.json               |  3 +
 dubbo-admin-ui/pom.xml                             | 18 +++++
 dubbo-admin-ui/public/dubbo-admin-info.json        |  3 +
 .../src/components/governance/AccessControl.vue    |  2 +-
 dubbo-admin-ui/src/components/public/Drawer.vue    | 10 ++-
 pom.xml                                            | 86 +++-------------------
 13 files changed, 94 insertions(+), 110 deletions(-)

diff --git a/docker/latest/Dockerfile b/docker/0.3.0/Dockerfile
similarity index 85%
copy from docker/latest/Dockerfile
copy to docker/0.3.0/Dockerfile
index 958b217..5432d3d 100644
--- a/docker/latest/Dockerfile
+++ b/docker/0.3.0/Dockerfile
@@ -17,13 +17,13 @@ FROM maven:3-openjdk-8
 RUN mkdir -p /source/dubbo-admin-snapshot
 ADD . /source/dubbo-admin-snapshot
 WORKDIR /source/dubbo-admin-snapshot
-RUN mvn --batch-mode clean package -Dmaven.test.skip=true
+RUN mvn --batch-mode -Prelease clean package -Dmaven.test.skip=true
 
 FROM openjdk:8-jre
 LABEL maintainer="[email protected]"
 RUN apt-get update && apt-get install -y tini
-COPY --from=0 
/source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0-SNAPSHOT.jar
 /app.jar
-COPY entrypoint.sh /usr/local/bin/entrypoint.sh
+COPY --from=0 
/source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0.jar
 /app.jar
+COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh 
/usr/local/bin/entrypoint.sh
 
 ENV JAVA_OPTS ""
 
diff --git a/docker/latest/entrypoint.sh b/docker/entrypoint.sh
similarity index 98%
rename from docker/latest/entrypoint.sh
rename to docker/entrypoint.sh
index 36cadde..8c80090 100755
--- a/docker/latest/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -1,4 +1,3 @@
 #!/bin/bash
 set -e
-
 exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar
diff --git a/docker/latest/Dockerfile b/docker/latest/Dockerfile
index 958b217..5ce8b3e 100644
--- a/docker/latest/Dockerfile
+++ b/docker/latest/Dockerfile
@@ -17,13 +17,13 @@ FROM maven:3-openjdk-8
 RUN mkdir -p /source/dubbo-admin-snapshot
 ADD . /source/dubbo-admin-snapshot
 WORKDIR /source/dubbo-admin-snapshot
-RUN mvn --batch-mode clean package -Dmaven.test.skip=true
+RUN mvn --batch-mode -Prelease clean package -Dmaven.test.skip=true
 
 FROM openjdk:8-jre
 LABEL maintainer="[email protected]"
 RUN apt-get update && apt-get install -y tini
 COPY --from=0 
/source/dubbo-admin-snapshot/dubbo-admin-distribution/target/dubbo-admin-0.3.0-SNAPSHOT.jar
 /app.jar
-COPY entrypoint.sh /usr/local/bin/entrypoint.sh
+COPY --from=0 /source/dubbo-admin-snapshot/docker/entrypoint.sh 
/usr/local/bin/entrypoint.sh
 
 ENV JAVA_OPTS ""
 
diff --git a/docker/stack.yml b/docker/stack.yml
index 6e29327..ebb35f2 100644
--- a/docker/stack.yml
+++ b/docker/stack.yml
@@ -21,11 +21,11 @@ services:
     ports:
       - 2181:2181
   admin:
-    image: apache/dubbo-admin
+    image: apache/dubbo-admin:0.3.0
     depends_on:
       - zookeeper
     ports:
-      - 8080
+      - 8080:8080
     environment:
       - admin.registry.address=zookeeper://zookeeper:2181
       - admin.config-center=zookeeper://zookeeper:2181
diff --git a/dubbo-admin-distribution/src/bin/config/application.properties 
b/dubbo-admin-distribution/src/bin/config/application.properties
index 3f7b612..df17468 100644
--- a/dubbo-admin-distribution/src/bin/config/application.properties
+++ b/dubbo-admin-distribution/src/bin/config/application.properties
@@ -14,33 +14,43 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-server.port=8080
-# centers in dubbo2.7
-admin.registry.address=nacos://127.0.0.1:8848
-admin.config-center=nacos://127.0.0.1:8848
-admin.metadata-report.address=nacos://127.0.0.1:8848
 
-#admin.registry.address=nacos://127.0.0.1:8848
-#admin.config-center=nacos://127.0.0.1:8848
-#admin.metadata-report.address=nacos://127.0.0.1:8848
+# centers in dubbo2.7, if you want to add parameters, please add them to the 
url
+admin.registry.address=zookeeper://127.0.0.1:2181
+admin.config-center=zookeeper://127.0.0.1:2181
+admin.metadata-report.address=zookeeper://127.0.0.1:2181
+
+# nacos config, add parameters to url like username=nacos&password=nacos
+#admin.registry.address=nacos://127.0.0.1:8848?group=DEFAULT_GROUP&namespace=public
+#admin.config-center=nacos://127.0.0.1:8848?group=dubbo
+#admin.metadata-report.address=nacos://127.0.0.1:8848?group=dubbo
+
+#group (Deprecated it is recommended to use URL to add parameters,will be 
removed in the future)
+#admin.registry.group=dubbo
+#admin.config-center.group=dubbo
+#admin.metadata-report.group=dubbo
+
+#namespace used by nacos. (Deprecated it is recommended to use URL to add 
parameters,will be removed in the future)
+#admin.registry.namespace=public
+#admin.config-center.namespace=public
+#admin.metadata-report.namespace=public
 
 admin.root.user.name=root
 admin.root.user.password=root
-#group
-admin.registry.group=DEFAULT_GROUP
-admin.config-center.group=DEFAULT_GROUP
-admin.metadata-report.group=DEFAULT_GROUP
-
-#namespace used by nacos
-admin.registry.namespace=public
-admin.config-center.namespace=public
-admin.metadata-report.namespace=public
-
-admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
-admin.apollo.appId=test
-admin.apollo.env=dev
-admin.apollo.cluster=default
-admin.apollo.namespace=dubbo
+
+#session timeout, default is one hour
+admin.check.sessionTimeoutMilli=3600000
+
+
+# apollo config
+# admin.config-center = 
apollo://localhost:8070?token=e16e5cd903fd0c97a116c873b448544b9d086de9&app.id=test&env=dev&cluster=default&namespace=dubbo
+
+# (Deprecated it is recommended to use URL to add parameters,will be removed 
in the future)
+#admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9
+#admin.apollo.appId=test
+#admin.apollo.env=dev
+#admin.apollo.cluster=default
+#admin.apollo.namespace=dubbo
 
 #compress
 server.compression.enabled=true
diff --git a/dubbo-admin-server/pom.xml b/dubbo-admin-server/pom.xml
index e13d213..d03d5ab 100644
--- a/dubbo-admin-server/pom.xml
+++ b/dubbo-admin-server/pom.xml
@@ -43,6 +43,11 @@
 
         <dependency>
             <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-jpa</artifactId>
             <exclusions>
                 <exclusion>
@@ -179,6 +184,11 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
diff --git a/dubbo-admin-test/pom.xml b/dubbo-admin-test/pom.xml
index 5bb8746..6193514 100644
--- a/dubbo-admin-test/pom.xml
+++ b/dubbo-admin-test/pom.xml
@@ -79,7 +79,6 @@
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
-            <version>29.0-jre</version>
         </dependency>
 
         <dependency>
diff --git a/dubbo-admin-ui/dubbo-admin-info.json 
b/dubbo-admin-ui/dubbo-admin-info.json
new file mode 100644
index 0000000..989827d
--- /dev/null
+++ b/dubbo-admin-ui/dubbo-admin-info.json
@@ -0,0 +1,3 @@
+{
+  "version": "${revision}"
+}
diff --git a/dubbo-admin-ui/pom.xml b/dubbo-admin-ui/pom.xml
index 9458958..397a2a2 100644
--- a/dubbo-admin-ui/pom.xml
+++ b/dubbo-admin-ui/pom.xml
@@ -77,5 +77,23 @@
                 </executions>
             </plugin>
         </plugins>
+      <resources>
+        <resource>
+          <directory>${basedir}</directory>
+          <targetPath>${basedir}/target/dist</targetPath>
+          <includes>
+            <include>dubbo-admin-info.json</include>
+          </includes>
+          <filtering>true</filtering>
+        </resource>
+        <resource>
+          <directory>${basedir}</directory>
+          <targetPath>${basedir}/public</targetPath>
+          <includes>
+            <include>dubbo-admin-info.json</include>
+          </includes>
+          <filtering>true</filtering>
+        </resource>
+      </resources>
     </build>
 </project>
diff --git a/dubbo-admin-ui/public/dubbo-admin-info.json 
b/dubbo-admin-ui/public/dubbo-admin-info.json
new file mode 100644
index 0000000..dfcc3af
--- /dev/null
+++ b/dubbo-admin-ui/public/dubbo-admin-info.json
@@ -0,0 +1,3 @@
+{
+  "version": "0.3.0"
+}
diff --git a/dubbo-admin-ui/src/components/governance/AccessControl.vue 
b/dubbo-admin-ui/src/components/governance/AccessControl.vue
index da83a94..6bdaef1 100644
--- a/dubbo-admin-ui/src/components/governance/AccessControl.vue
+++ b/dubbo-admin-ui/src/components/governance/AccessControl.vue
@@ -26,7 +26,7 @@
           <v-card-text>
             <v-form>
               <v-layout row wrap>
-`                <v-flex>
+                <v-flex>
                   <v-combobox
                     id="serviceSearch"
                     v-model="filter"
diff --git a/dubbo-admin-ui/src/components/public/Drawer.vue 
b/dubbo-admin-ui/src/components/public/Drawer.vue
index 01b6cb0..5a7e9ee 100644
--- a/dubbo-admin-ui/src/components/public/Drawer.vue
+++ b/dubbo-admin-ui/src/components/public/Drawer.vue
@@ -28,6 +28,9 @@
       <img src="@/assets/logo.png" width="24" height="24"/>
       <v-toolbar-title class="ml-0 pl-3">
         <span class="hidden-sm-and-down white--text">{{ $store.state.appTitle 
}}</span>
+        <v-chip color="green" class="v-chip--x-small" disabled 
text-color="white" label>
+          {{ config.version }}
+        </v-chip>
       </v-toolbar-title>
     </v-toolbar>
 
@@ -68,18 +71,23 @@
 
 <script>
 import menu from '@/api/menu'
+import axios from 'axios'
 
 export default {
   name: 'drawer',
   data: () => ({
     mini: false,
     drawer: true,
-    menus: menu
+    menus: menu,
+    config:{}
   }),
   created () {
     window.getApp.$on('DRAWER_TOGGLED', () => {
       this.drawer = (!this.drawer)
     })
+    axios.get('/dubbo-admin-info.json').then(response => {
+      this.config = response.data
+    })
   },
   computed: {
     sideToolbarColor () {
diff --git a/pom.xml b/pom.xml
index f832147..19517b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,25 +53,15 @@
        </repositories>
 
        <properties>
-               <revision>0.3.0-SNAPSHOT</revision>
+               <revision>0.3.0</revision>
                <main.basedir>${project.basedir}</main.basedir>
-               <commons-lang3-version>3.7</commons-lang3-version>
                <dubbo-version>2.7.12</dubbo-version>
-               <curator-version>2.12.0</curator-version>
-               <curator-test-version>4.1.0</curator-test-version>
-               <fastjson-version>1.2.67</fastjson-version>
                <springfox-swagger-version>2.9.2</springfox-swagger-version>
-               <netty-version>4.1.42.Final</netty-version>
                <jacoco-version>0.8.2</jacoco-version>
-               <jedis-version>2.9.0</jedis-version>
                <apollo-version>1.2.0</apollo-version>
-               <consul-version>1.4.2</consul-version>
-               <consul-embedded-version>2.0.0</consul-embedded-version>
-               <nacos-version>1.2.0</nacos-version>
                <guava-version>20.0</guava-version>
-               <snakeyaml-version>1.24</snakeyaml-version>
                
<maven-checkstyle-plugin-version>3.0.0</maven-checkstyle-plugin-version>
-               <spring-boot-version>2.1.4.RELEASE</spring-boot-version>
+               <spring-boot-version>2.3.12.RELEASE</spring-boot-version>
                <maven_compiler_version>3.6.0</maven_compiler_version>
                <maven-flatten-version>1.1.0</maven-flatten-version>
 
@@ -84,11 +74,7 @@
 
        <dependencyManagement>
         <dependencies>
-                       <dependency>
-                               <groupId>org.yaml</groupId>
-                               <artifactId>snakeyaml</artifactId>
-                               <version>${snakeyaml-version}</version>
-                       </dependency>
+
                        <dependency>
                                <groupId>org.springframework.boot</groupId>
                                
<artifactId>spring-boot-starter-parent</artifactId>
@@ -96,15 +82,13 @@
                                <scope>import</scope>
                                <type>pom</type>
                        </dependency>
+
                        <dependency>
-                               <groupId>redis.clients</groupId>
-                               <artifactId>jedis</artifactId>
-                               <version>${jedis-version}</version>
-                       </dependency>
-                       <dependency>
-                               <groupId>org.apache.commons</groupId>
-                               <artifactId>commons-lang3</artifactId>
-                               <version>${commons-lang3-version}</version>
+                               <groupId>org.apache.dubbo</groupId>
+                               <artifactId>dubbo-dependencies-bom</artifactId>
+                               <version>${dubbo-version}</version>
+                               <type>pom</type>
+                               <scope>import</scope>
                        </dependency>
 
                        <dependency>
@@ -114,12 +98,6 @@
                        </dependency>
 
                        <dependency>
-                               <groupId>com.alibaba.nacos</groupId>
-                               <artifactId>nacos-client</artifactId>
-                               <version>${nacos-version}</version>
-                       </dependency>
-
-                       <dependency>
                                <groupId>org.apache.dubbo</groupId>
                                <artifactId>dubbo</artifactId>
                                <version>${dubbo-version}</version>
@@ -132,35 +110,6 @@
                        </dependency>
 
                        <dependency>
-                               <groupId>org.apache.curator</groupId>
-                               <artifactId>curator-framework</artifactId>
-                               <version>${curator-version}</version>
-                       </dependency>
-
-                       <dependency>
-                               <groupId>org.apache.curator</groupId>
-                               <artifactId>curator-test</artifactId>
-                               <version>${curator-test-version}</version>
-                       </dependency>
-
-                       <dependency>
-                               <groupId>org.apache.curator</groupId>
-                               <artifactId>curator-recipes</artifactId>
-                               <version>${curator-version}</version>
-                               <exclusions>
-                                       <exclusion>
-                                               
<groupId>org.apache.zookeeper</groupId>
-                                               
<artifactId>zookeeper</artifactId>
-                                       </exclusion>
-                               </exclusions>
-                       </dependency>
-                       <dependency>
-                               <groupId>com.alibaba</groupId>
-                               <artifactId>fastjson</artifactId>
-                               <version>${fastjson-version}</version>
-                       </dependency>
-
-                       <dependency>
                                <groupId>io.springfox</groupId>
                                <artifactId>springfox-swagger2</artifactId>
                                <version>${springfox-swagger-version}</version>
@@ -170,22 +119,6 @@
                                <artifactId>springfox-swagger-ui</artifactId>
                                <version>${springfox-swagger-version}</version>
                        </dependency>
-                       <dependency>
-                               <groupId>io.netty</groupId>
-                               <artifactId>netty-all</artifactId>
-                               <version>${netty-version}</version>
-                       </dependency>
-
-                       <dependency>
-                               <groupId>com.ecwid.consul</groupId>
-                               <artifactId>consul-api</artifactId>
-                               <version>${consul-version}</version>
-                       </dependency>
-                       <dependency>
-                               <groupId>com.pszymczyk.consul</groupId>
-                               <artifactId>embedded-consul</artifactId>
-                               <version>${consul-embedded-version}</version>
-                       </dependency>
 
                        <dependency>
                                <groupId>com.google.guava</groupId>
@@ -280,6 +213,7 @@
                                                                                
<exclude>**/assets/**</exclude>
                                                                                
<exclude>**/yarn.lock</exclude>
                                                                                
<exclude>**/node/**</exclude>
+                                                                               
<exclude>**/dubbo-admin-info.json</exclude>
                                                                        
</excludes>
                                                                </configuration>
                                                        </execution>

Reply via email to