zhouhao 5 年之前
父节点
当前提交
a9ec03dca0
共有 32 个文件被更改,包括 48 次插入102 次删除
  1. 1 1
      jetlinks-components/common-component/pom.xml
  2. 1 1
      jetlinks-components/dashboard-component/pom.xml
  3. 10 0
      jetlinks-components/dashboard-component/src/main/java/org/jetlinks/community/dashboard/web/DashboardController.java
  4. 1 1
      jetlinks-components/elasticsearch-component/pom.xml
  5. 1 1
      jetlinks-components/gateway-component/pom.xml
  6. 1 1
      jetlinks-components/io-component/pom.xml
  7. 1 1
      jetlinks-components/logging-component/pom.xml
  8. 1 1
      jetlinks-components/network-component/mqtt-component/pom.xml
  9. 1 1
      jetlinks-components/network-component/network-core/pom.xml
  10. 1 1
      jetlinks-components/network-component/pom.xml
  11. 1 1
      jetlinks-components/network-component/tcp-component/pom.xml
  12. 1 1
      jetlinks-components/notify-component/notify-core/pom.xml
  13. 1 1
      jetlinks-components/notify-component/notify-dingtalk/pom.xml
  14. 1 1
      jetlinks-components/notify-component/notify-email/pom.xml
  15. 1 1
      jetlinks-components/notify-component/notify-sms/pom.xml
  16. 1 1
      jetlinks-components/notify-component/notify-voice/pom.xml
  17. 1 1
      jetlinks-components/notify-component/notify-wechat/pom.xml
  18. 1 1
      jetlinks-components/notify-component/pom.xml
  19. 1 1
      jetlinks-components/pom.xml
  20. 1 1
      jetlinks-components/rule-engine-component/pom.xml
  21. 1 1
      jetlinks-components/timeseries-component/pom.xml
  22. 1 1
      jetlinks-manager/authentication-manager/pom.xml
  23. 1 1
      jetlinks-manager/device-manager/pom.xml
  24. 1 8
      jetlinks-manager/logging-manager/pom.xml
  25. 1 1
      jetlinks-manager/network-manager/pom.xml
  26. 4 0
      jetlinks-manager/network-manager/src/main/java/org/jetlinks/community/network/manager/web/NetworkConfigController.java
  27. 1 50
      jetlinks-manager/notify-manager/pom.xml
  28. 1 1
      jetlinks-manager/pom.xml
  29. 1 6
      jetlinks-manager/rule-engine-manager/pom.xml
  30. 1 7
      jetlinks-standalone/pom.xml
  31. 5 6
      pom.xml
  32. 1 1
      simulator/start.sh

+ 1 - 1
jetlinks-components/common-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/dashboard-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 10 - 0
jetlinks-components/dashboard-component/src/main/java/org/jetlinks/community/dashboard/web/DashboardController.java

@@ -1,6 +1,9 @@
 package org.jetlinks.community.dashboard.web;
 
 import com.alibaba.fastjson.JSON;
+import org.hswebframework.web.authorization.annotation.Authorize;
+import org.hswebframework.web.authorization.annotation.QueryAction;
+import org.hswebframework.web.authorization.annotation.Resource;
 import org.hswebframework.web.exception.NotFoundException;
 import org.jetlinks.community.dashboard.*;
 import org.jetlinks.community.dashboard.web.request.DashboardMeasurementRequest;
@@ -16,6 +19,8 @@ import java.util.Map;
 
 @RestController
 @RequestMapping("/dashboard")
+@Resource(id="dashboard",name = "仪表盘")
+@Authorize
 public class DashboardController {
 
     private final DashboardManager dashboardManager;
@@ -25,6 +30,7 @@ public class DashboardController {
     }
 
     @GetMapping("/defs")
+    @QueryAction
     public Flux<DashboardInfo> getDefinitions() {
         return dashboardManager
             .getDashboards()
@@ -32,6 +38,7 @@ public class DashboardController {
     }
 
     @GetMapping("/def/{dashboard}/{object}/measurements")
+    @QueryAction
     public Flux<MeasurementInfo> getMeasurementDefinitions(@PathVariable String dashboard,
                                                            @PathVariable String object) {
         return dashboardManager
@@ -42,6 +49,7 @@ public class DashboardController {
     }
 
     @GetMapping(value = "/{dashboard}/{object}/{measurement}/{dimension}", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
+    @Authorize(merge = false)
     public Flux<MeasurementValue> getMeasurementValue(@PathVariable String dashboard,
                                                       @PathVariable String object,
                                                       @PathVariable String dimension,
@@ -63,6 +71,7 @@ public class DashboardController {
      * @return 仪表数据
      */
     @PostMapping(value = "/_multi")
+    @Authorize(merge = false)
     public Flux<DashboardMeasurementResponse> getMultiMeasurementValue(@RequestBody Flux<DashboardMeasurementRequest> requests) {
         return requests.flatMap(request -> dashboardManager
             .getDashboard(request.getDashboard())
@@ -81,6 +90,7 @@ public class DashboardController {
      * @return 仪表数据
      */
     @GetMapping(value = "/_multi", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
+    @Authorize(merge = false)
     public Flux<DashboardMeasurementResponse> getMultiMeasurementValue(@RequestParam String requestJson) {
         return Flux.fromIterable(JSON.parseArray(requestJson, DashboardMeasurementRequest.class))
             .flatMap(request -> dashboardManager

+ 1 - 1
jetlinks-components/elasticsearch-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/gateway-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/io-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/logging-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/network-component/mqtt-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>network-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/network-component/network-core/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>network-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/network-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <packaging>pom</packaging>

+ 1 - 1
jetlinks-components/network-component/tcp-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>network-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/notify-component/notify-core/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/notify-component/notify-dingtalk/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/notify-component/notify-email/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/notify-component/notify-sms/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/notify-component/notify-voice/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/notify-component/notify-wechat/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>notify-component</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
jetlinks-components/notify-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-community</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/rule-engine-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-components/timeseries-component/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-components</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
jetlinks-manager/authentication-manager/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>authentication-manager</artifactId>

+ 1 - 1
jetlinks-manager/device-manager/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>device-manager</artifactId>

+ 1 - 8
jetlinks-manager/logging-manager/pom.xml

@@ -7,17 +7,11 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <artifactId>logging-manager</artifactId>
 
-
-    <properties>
-        <hsweb.framework.version>4.0.0-SNAPSHOT</hsweb.framework.version>
-    </properties>
-
     <dependencies>
-
         <dependency>
             <groupId>org.hswebframework.web</groupId>
             <artifactId>hsweb-access-logging-aop</artifactId>
@@ -51,7 +45,6 @@
             <artifactId>hsweb-easy-orm-rdb</artifactId>
         </dependency>
 
-
     </dependencies>
 
 

+ 1 - 1
jetlinks-manager/network-manager/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>network-manager</artifactId>

+ 4 - 0
jetlinks-manager/network-manager/src/main/java/org/jetlinks/community/network/manager/web/NetworkConfigController.java

@@ -2,6 +2,8 @@ package org.jetlinks.community.network.manager.web;
 
 import org.hswebframework.web.authorization.annotation.Authorize;
 import org.hswebframework.web.authorization.annotation.Resource;
+import org.hswebframework.web.authorization.annotation.ResourceAction;
+import org.hswebframework.web.authorization.annotation.SaveAction;
 import org.hswebframework.web.crud.web.reactive.ReactiveServiceCrudController;
 import org.hswebframework.web.exception.NotFoundException;
 import org.jetlinks.community.network.NetworkProvider;
@@ -47,6 +49,7 @@ public class NetworkConfigController implements ReactiveServiceCrudController<Ne
     }
 
     @PostMapping("/{id}/_start")
+    @SaveAction
     public Mono<Void> start(@PathVariable String id) {
         return configService.findById(id)
                 .switchIfEmpty(Mono.error(()->new NotFoundException("配置[" + id + "]不存在")))
@@ -59,6 +62,7 @@ public class NetworkConfigController implements ReactiveServiceCrudController<Ne
     }
 
     @PostMapping("/{id}/_shutdown")
+    @SaveAction
     public Mono<Void> shutdown(@PathVariable String id) {
         return configService.findById(id)
                 .switchIfEmpty(Mono.error(()->new NotFoundException("配置[" + id + "]不存在")))

+ 1 - 50
jetlinks-manager/notify-manager/pom.xml

@@ -7,15 +7,11 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>notify-manager</artifactId>
 
-    <properties>
-        <hsweb.framework.version>4.0.0-SNAPSHOT</hsweb.framework.version>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.jetlinks.community</groupId>
@@ -89,49 +85,4 @@
 
     </dependencies>
 
-    <repositories>
-        <repository>
-            <id>aliyun-nexus</id>
-            <name>aliyun</name>
-            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-        </repository>
-
-        <repository>
-            <id>hsweb-nexus</id>
-            <name>Nexus Release Repository</name>
-            <url>http://nexus.hsweb.me/content/groups/public/</url>
-            <snapshots>
-                <enabled>true</enabled>
-                <updatePolicy>always</updatePolicy>
-            </snapshots>
-        </repository>
-
-        <repository>
-            <id>spring.io</id>
-            <name>spring</name>
-            <url>https://repo.spring.io/milestone</url>
-        </repository>
-
-    </repositories>
-
-    <distributionManagement>
-        <repository>
-            <id>releases</id>
-            <name>Nexus Release Repository</name>
-            <url>http://nexus.hsweb.me/content/repositories/releases/</url>
-        </repository>
-        <snapshotRepository>
-            <id>snapshots</id>
-            <name>Nexus Snapshot Repository</name>
-            <url>http://nexus.hsweb.me/content/repositories/snapshots/</url>
-        </snapshotRepository>
-    </distributionManagement>
-
-    <pluginRepositories>
-        <pluginRepository>
-            <id>aliyun-nexus</id>
-            <name>aliyun</name>
-            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-        </pluginRepository>
-    </pluginRepositories>
 </project>

+ 1 - 1
jetlinks-manager/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-community</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <packaging>pom</packaging>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 6
jetlinks-manager/rule-engine-manager/pom.xml

@@ -7,15 +7,10 @@
     <parent>
         <groupId>org.jetlinks.community</groupId>
         <artifactId>jetlinks-manager</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>rule-engine-manager</artifactId>
-
-    <properties>
-        <hsweb.framework.version>4.0.0-SNAPSHOT</hsweb.framework.version>
-    </properties>
-
     <dependencies>
 
         <dependency>

+ 1 - 7
jetlinks-standalone/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>jetlinks-community</artifactId>
         <groupId>org.jetlinks.community</groupId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0-RC</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -147,12 +147,6 @@
             <version>${jetlinks.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.jetlinks</groupId>
-            <artifactId>jetlinks-gateway</artifactId>
-            <version>${jetlinks.version}</version>
-        </dependency>
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-redis</artifactId>

+ 5 - 6
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>org.jetlinks.community</groupId>
     <artifactId>jetlinks-community</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <version>1.0-RC</version>
     <modules>
         <module>jetlinks-components</module>
         <module>jetlinks-manager</module>
@@ -16,15 +16,14 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.build.locales>zh_CN</project.build.locales>
-        <spring.boot.version>2.2.2.RELEASE</spring.boot.version>
+        <spring.boot.version>2.2.5.RELEASE</spring.boot.version>
         <java.version>1.8</java.version>
         <project.build.jdk>${java.version}</project.build.jdk>
-        <hsweb.framework.version>4.0.0-SNAPSHOT</hsweb.framework.version>
+        <hsweb.framework.version>4.0.0</hsweb.framework.version>
         <hsweb.expands.version>3.0.2</hsweb.expands.version>
-        <jetlinks.version>1.0.0-BUILD-SNAPSHOT</jetlinks.version>
-        <reactor.version>Dysprosium-RELEASE</reactor.version>
+        <jetlinks.version>1.0.0</jetlinks.version>
         <r2dbc.version>Arabba-RELEASE</r2dbc.version>
-        <vertx.version>3.8.3</vertx.version>
+        <vertx.version>3.8.5</vertx.version>
     </properties>
 
     <build>

+ 1 - 1
simulator/start.sh

@@ -6,6 +6,6 @@ java -jar device-simulator.jar \
   mqtt.enableEvent=true \
   mqtt.eventLimit=1 \
   mqtt.eventRate=1000 \
-  mqtt.scriptFile=./scripts/demo-device.js \
+  mqtt.scriptFile=./scripts/demo-children-device.js \
   mqtt.address=127.0.0.1 \
   mqtt.port=1883