Commit b2b2847803894290d1bff7b85d6c2fbd1c47f197

Authored by Andrew Shvayka
2 parents 44e614c2 0cf1f5ea

Merge with master

... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>application</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -47,35 +47,35 @@
47 47 <classifier>linux-x86_64</classifier>
48 48 </dependency>
49 49 <dependency>
50   - <groupId>org.thingsboard.server</groupId>
  50 + <groupId>org.thingsboard</groupId>
51 51 <artifactId>extensions-api</artifactId>
52 52 </dependency>
53 53 <dependency>
54   - <groupId>org.thingsboard.server</groupId>
  54 + <groupId>org.thingsboard</groupId>
55 55 <artifactId>extensions-core</artifactId>
56 56 </dependency>
57 57 <dependency>
58   - <groupId>org.thingsboard.server.common</groupId>
  58 + <groupId>org.thingsboard.common</groupId>
59 59 <artifactId>transport</artifactId>
60 60 </dependency>
61 61 <dependency>
62   - <groupId>org.thingsboard.server.transport</groupId>
  62 + <groupId>org.thingsboard.transport</groupId>
63 63 <artifactId>http</artifactId>
64 64 </dependency>
65 65 <dependency>
66   - <groupId>org.thingsboard.server.transport</groupId>
  66 + <groupId>org.thingsboard.transport</groupId>
67 67 <artifactId>coap</artifactId>
68 68 </dependency>
69 69 <dependency>
70   - <groupId>org.thingsboard.server.transport</groupId>
  70 + <groupId>org.thingsboard.transport</groupId>
71 71 <artifactId>mqtt</artifactId>
72 72 </dependency>
73 73 <dependency>
74   - <groupId>org.thingsboard.server</groupId>
  74 + <groupId>org.thingsboard</groupId>
75 75 <artifactId>dao</artifactId>
76 76 </dependency>
77 77 <dependency>
78   - <groupId>org.thingsboard.server</groupId>
  78 + <groupId>org.thingsboard</groupId>
79 79 <artifactId>dao</artifactId>
80 80 <type>test-jar</type>
81 81 <scope>test</scope>
... ... @@ -103,7 +103,7 @@
103 103 <scope>test</scope>
104 104 </dependency>
105 105 <dependency>
106   - <groupId>org.thingsboard.server</groupId>
  106 + <groupId>org.thingsboard</groupId>
107 107 <artifactId>ui</artifactId>
108 108 <version>${project.version}</version>
109 109 <scope>runtime</scope>
... ... @@ -141,26 +141,6 @@
141 141 <artifactId>spring-context-support</artifactId>
142 142 </dependency>
143 143 <dependency>
144   - <groupId>org.springframework.boot</groupId>
145   - <artifactId>spring-boot-starter-test</artifactId>
146   - <scope>test</scope>
147   - </dependency>
148   - <dependency>
149   - <groupId>org.springframework.security</groupId>
150   - <artifactId>spring-security-test</artifactId>
151   - <scope>test</scope>
152   - </dependency>
153   - <dependency>
154   - <groupId>com.jayway.jsonpath</groupId>
155   - <artifactId>json-path</artifactId>
156   - <scope>test</scope>
157   - </dependency>
158   - <dependency>
159   - <groupId>com.jayway.jsonpath</groupId>
160   - <artifactId>json-path-assert</artifactId>
161   - <scope>test</scope>
162   - </dependency>
163   - <dependency>
164 144 <groupId>com.typesafe.akka</groupId>
165 145 <artifactId>akka-actor_${scala.version}</artifactId>
166 146 </dependency>
... ... @@ -185,16 +165,6 @@
185 165 <artifactId>logback-classic</artifactId>
186 166 </dependency>
187 167 <dependency>
188   - <groupId>junit</groupId>
189   - <artifactId>junit</artifactId>
190   - <scope>test</scope>
191   - </dependency>
192   - <dependency>
193   - <groupId>org.mockito</groupId>
194   - <artifactId>mockito-all</artifactId>
195   - <scope>test</scope>
196   - </dependency>
197   - <dependency>
198 168 <groupId>javax.mail</groupId>
199 169 <artifactId>mail</artifactId>
200 170 </dependency>
... ... @@ -219,11 +189,49 @@
219 189 <artifactId>grpc-stub</artifactId>
220 190 </dependency>
221 191 <dependency>
  192 + <groupId>io.springfox</groupId>
  193 + <artifactId>springfox-swagger-ui</artifactId>
  194 + </dependency>
  195 + <dependency>
  196 + <groupId>io.springfox</groupId>
  197 + <artifactId>springfox-swagger2</artifactId>
  198 + </dependency>
  199 + <dependency>
222 200 <groupId>org.thingsboard.server</groupId>
223 201 <artifactId>tools</artifactId>
224 202 <version>0.0.1-SNAPSHOT</version>
225 203 <scope>test</scope>
226 204 </dependency>
  205 + <dependency>
  206 + <groupId>org.springframework.boot</groupId>
  207 + <artifactId>spring-boot-starter-test</artifactId>
  208 + <scope>test</scope>
  209 + </dependency>
  210 + <dependency>
  211 + <groupId>org.springframework.security</groupId>
  212 + <artifactId>spring-security-test</artifactId>
  213 + <scope>test</scope>
  214 + </dependency>
  215 + <dependency>
  216 + <groupId>com.jayway.jsonpath</groupId>
  217 + <artifactId>json-path</artifactId>
  218 + <scope>test</scope>
  219 + </dependency>
  220 + <dependency>
  221 + <groupId>com.jayway.jsonpath</groupId>
  222 + <artifactId>json-path-assert</artifactId>
  223 + <scope>test</scope>
  224 + </dependency>
  225 + <dependency>
  226 + <groupId>junit</groupId>
  227 + <artifactId>junit</artifactId>
  228 + <scope>test</scope>
  229 + </dependency>
  230 + <dependency>
  231 + <groupId>org.mockito</groupId>
  232 + <artifactId>mockito-all</artifactId>
  233 + <scope>test</scope>
  234 + </dependency>
227 235 </dependencies>
228 236
229 237 <build>
... ... @@ -337,17 +345,17 @@
337 345 <outputDirectory>${project.build.directory}/extensions</outputDirectory>
338 346 <artifactItems>
339 347 <artifactItem>
340   - <groupId>org.thingsboard.server.extensions</groupId>
  348 + <groupId>org.thingsboard.extensions</groupId>
341 349 <artifactId>extension-rabbitmq</artifactId>
342 350 <classifier>extension</classifier>
343 351 </artifactItem>
344 352 <artifactItem>
345   - <groupId>org.thingsboard.server.extensions</groupId>
  353 + <groupId>org.thingsboard.extensions</groupId>
346 354 <artifactId>extension-rest-api-call</artifactId>
347 355 <classifier>extension</classifier>
348 356 </artifactItem>
349 357 <artifactItem>
350   - <groupId>org.thingsboard.server.extensions</groupId>
  358 + <groupId>org.thingsboard.extensions</groupId>
351 359 <artifactId>extension-kafka</artifactId>
352 360 <classifier>extension</classifier>
353 361 </artifactItem>
... ...
... ... @@ -19,11 +19,13 @@ import org.springframework.boot.SpringApplication;
19 19 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
20 20 import org.springframework.boot.autoconfigure.SpringBootApplication;
21 21 import org.springframework.context.annotation.ComponentScan;
  22 +import springfox.documentation.swagger2.annotations.EnableSwagger2;
22 23
23 24 import java.util.Arrays;
24 25
25 26 @EnableAutoConfiguration
26 27 @SpringBootApplication
  28 +@EnableSwagger2
27 29 @ComponentScan({"org.thingsboard.server"})
28 30 public class ThingsboardServerApplication {
29 31
... ...
  1 +/**
  2 + * Copyright © 2016 The Thingsboard Authors
  3 + *
  4 + * Licensed under the Apache License, Version 2.0 (the "License");
  5 + * you may not use this file except in compliance with the License.
  6 + * You may obtain a copy of the License at
  7 + *
  8 + * http://www.apache.org/licenses/LICENSE-2.0
  9 + *
  10 + * Unless required by applicable law or agreed to in writing, software
  11 + * distributed under the License is distributed on an "AS IS" BASIS,
  12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + * See the License for the specific language governing permissions and
  14 + * limitations under the License.
  15 + */
  16 +package org.thingsboard.server.config;
  17 +
  18 +import org.springframework.context.annotation.Bean;
  19 +import org.springframework.context.annotation.Configuration;
  20 +import org.thingsboard.server.common.data.security.Authority;
  21 +import springfox.documentation.builders.ApiInfoBuilder;
  22 +import springfox.documentation.builders.PathSelectors;
  23 +import springfox.documentation.service.*;
  24 +import springfox.documentation.spi.DocumentationType;
  25 +import springfox.documentation.spi.service.contexts.SecurityContext;
  26 +import springfox.documentation.spring.web.plugins.Docket;
  27 +
  28 +import java.util.List;
  29 +
  30 +import static com.google.common.collect.Lists.newArrayList;
  31 +
  32 +@Configuration
  33 +public class SwaggerConfiguration {
  34 +
  35 + @Bean
  36 + public Docket thingsboardApi() {
  37 + return new Docket(DocumentationType.SWAGGER_2)
  38 + .groupName("thingsboard")
  39 + .apiInfo(apiInfo())
  40 + .select()
  41 + .paths(PathSelectors.any())
  42 + .build()
  43 + .securitySchemes(newArrayList(jwtTokenKey()))
  44 + .securityContexts(newArrayList(securityContext()));
  45 + }
  46 +
  47 + private ApiKey jwtTokenKey() {
  48 + return new ApiKey("X-Authorization", "JWT token", "header");
  49 + }
  50 +
  51 + private SecurityContext securityContext() {
  52 + return SecurityContext.builder()
  53 + .securityReferences(defaultAuth())
  54 + .forPaths(PathSelectors.regex("/api.*"))
  55 + .build();
  56 + }
  57 +
  58 + List<SecurityReference> defaultAuth() {
  59 + AuthorizationScope[] authorizationScopes = new AuthorizationScope[3];
  60 + authorizationScopes[0] = new AuthorizationScope(Authority.SYS_ADMIN.name(), "System administrator");
  61 + authorizationScopes[1] = new AuthorizationScope(Authority.TENANT_ADMIN.name(), "Tenant administrator");
  62 + authorizationScopes[2] = new AuthorizationScope(Authority.CUSTOMER_USER.name(), "Customer");
  63 + return newArrayList(
  64 + new SecurityReference("X-Authorization", authorizationScopes));
  65 + }
  66 +
  67 + private ApiInfo apiInfo() {
  68 + return new ApiInfoBuilder()
  69 + .title("Thingsboard REST API")
  70 + .description("For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/rest-auth'>Documentation page</a>")
  71 + .contact(new Contact("Thingsboard team", "http://thingsboard.io", "info@thingsboard.io"))
  72 + .license("Apache License Version 2.0")
  73 + .licenseUrl("https://github.com/thingsboard/thingsboard/blob/master/LICENSE")
  74 + .version("2.0")
  75 + .build();
  76 + }
  77 +
  78 +}
... ...
... ... @@ -53,10 +53,11 @@ public class ThingsboardSecurityConfiguration extends WebSecurityConfigurerAdapt
53 53 public static final String JWT_TOKEN_HEADER_PARAM = "X-Authorization";
54 54 public static final String JWT_TOKEN_QUERY_PARAM = "token";
55 55
  56 + public static final String WEBJARS_ENTRY_POINT = "/webjars/**";
56 57 public static final String DEVICE_API_ENTRY_POINT = "/api/v1/**";
57 58 public static final String FORM_BASED_LOGIN_ENTRY_POINT = "/api/auth/login";
58 59 public static final String TOKEN_REFRESH_ENTRY_POINT = "/api/auth/token";
59   - public static final String[] NON_TOKEN_BASED_AUTH_ENTRY_POINTS = new String[] {"/index.html", "/static/**", "/api/noauth/**"};
  60 + public static final String[] NON_TOKEN_BASED_AUTH_ENTRY_POINTS = new String[] {"/index.html", "/static/**", "/api/noauth/**", "/webjars/**"};
60 61 public static final String TOKEN_BASED_AUTH_ENTRY_POINT = "/api/**";
61 62 public static final String WS_TOKEN_BASED_AUTH_ENTRY_POINT = "/api/ws/**";
62 63
... ... @@ -89,7 +90,7 @@ public class ThingsboardSecurityConfiguration extends WebSecurityConfigurerAdapt
89 90 @Bean
90 91 protected JwtTokenAuthenticationProcessingFilter buildJwtTokenAuthenticationProcessingFilter() throws Exception {
91 92 List<String> pathsToSkip = new ArrayList(Arrays.asList(NON_TOKEN_BASED_AUTH_ENTRY_POINTS));
92   - pathsToSkip.addAll(Arrays.asList(WS_TOKEN_BASED_AUTH_ENTRY_POINT, TOKEN_REFRESH_ENTRY_POINT, FORM_BASED_LOGIN_ENTRY_POINT, DEVICE_API_ENTRY_POINT));
  93 + pathsToSkip.addAll(Arrays.asList(WS_TOKEN_BASED_AUTH_ENTRY_POINT, TOKEN_REFRESH_ENTRY_POINT, FORM_BASED_LOGIN_ENTRY_POINT, DEVICE_API_ENTRY_POINT, WEBJARS_ENTRY_POINT));
93 94 SkipPathRequestMatcher matcher = new SkipPathRequestMatcher(pathsToSkip, TOKEN_BASED_AUTH_ENTRY_POINT);
94 95 JwtTokenAuthenticationProcessingFilter filter
95 96 = new JwtTokenAuthenticationProcessingFilter(failureHandler, jwtHeaderTokenExtractor, matcher);
... ... @@ -142,6 +143,7 @@ public class ThingsboardSecurityConfiguration extends WebSecurityConfigurerAdapt
142 143 .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
143 144 .and()
144 145 .authorizeRequests()
  146 + .antMatchers(WEBJARS_ENTRY_POINT).permitAll() // Webjars
145 147 .antMatchers(DEVICE_API_ENTRY_POINT).permitAll() // Device HTTP Transport API
146 148 .antMatchers(FORM_BASED_LOGIN_ENTRY_POINT).permitAll() // Login end-point
147 149 .antMatchers(TOKEN_REFRESH_ENTRY_POINT).permitAll() // Token refresh end-point
... ...
... ... @@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
21 21 @Controller
22 22 public class WebConfig {
23 23
24   - @RequestMapping(value = "/{path:^(?!api$)(?!static$)[^\\.]*}/**")
  24 + @RequestMapping(value = "/{path:^(?!api$)(?!static$)(?!webjars$)[^\\.]*}/**")
25 25 public String redirect() {
26 26 return "forward:/index.html";
27 27 }
... ...
... ... @@ -15,6 +15,7 @@
15 15 */
16 16 package org.thingsboard.server.controller;
17 17
  18 +import io.swagger.annotations.*;
18 19 import org.springframework.beans.factory.annotation.Autowired;
19 20 import org.springframework.security.access.prepost.PreAuthorize;
20 21 import org.springframework.web.bind.annotation.*;
... ... @@ -45,6 +46,18 @@ public class AdminController extends BaseController {
45 46 }
46 47
47 48 @PreAuthorize("hasAuthority('SYS_ADMIN')")
  49 + @ApiOperation(
  50 + value = "Save admin settings", notes = "Saves admin settings",
  51 + response = AdminSettings.class,
  52 + authorizations = {
  53 + @Authorization(value = "X-Authorization", scopes = {
  54 + @AuthorizationScope(scope = "SYS_ADMIN", description = "")
  55 + })})
  56 + @ApiResponses(value = {
  57 + @ApiResponse(code = 200, response = AdminSettings.class, message = "Admin settings successfully updated"),
  58 + @ApiResponse(code = 400, message = "Invalid admin settings payload supplied"),
  59 + @ApiResponse(code = 404, message = "Admin settings not found")}
  60 + )
48 61 @RequestMapping(value = "/settings", method = RequestMethod.POST)
49 62 @ResponseBody
50 63 public AdminSettings saveAdminSettings(@RequestBody AdminSettings adminSettings) throws ThingsboardException {
... ...
... ... @@ -15,6 +15,9 @@
15 15 */
16 16 package org.thingsboard.server.controller;
17 17
  18 +import io.swagger.annotations.ApiOperation;
  19 +import io.swagger.annotations.ApiResponse;
  20 +import io.swagger.annotations.ApiResponses;
18 21 import org.springframework.http.HttpStatus;
19 22 import org.springframework.security.access.prepost.PreAuthorize;
20 23 import org.springframework.web.bind.annotation.*;
... ... @@ -34,6 +37,12 @@ import java.util.List;
34 37 @RequestMapping("/api")
35 38 public class RuleController extends BaseController {
36 39
  40 + @ApiOperation(value = "getRuleById", nickname = "Get Rule By ID")
  41 + @ApiResponses(value = {
  42 + @ApiResponse(code = 200, message = "Success", response = RuleMetaData.class),
  43 + @ApiResponse(code = 401, message = "Unauthorized"),
  44 + @ApiResponse(code = 403, message = "Forbidden"),
  45 + @ApiResponse(code = 404, message = "Not Found")})
37 46 @PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN')")
38 47 @RequestMapping(value = "/rule/{ruleId}", method = RequestMethod.GET)
39 48 @ResponseBody
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>common</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.common</groupId>
  26 + <groupId>org.thingsboard.common</groupId>
27 27 <artifactId>data</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>common</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.common</groupId>
  26 + <groupId>org.thingsboard.common</groupId>
27 27 <artifactId>message</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>data</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>common</artifactId>
28 28 <packaging>pom</packaging>
29 29
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>common</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.common</groupId>
  26 + <groupId>org.thingsboard.common</groupId>
27 27 <artifactId>transport</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,11 +37,11 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>data</artifactId>
42 42 </dependency>
43 43 <dependency>
44   - <groupId>org.thingsboard.server.common</groupId>
  44 + <groupId>org.thingsboard.common</groupId>
45 45 <artifactId>message</artifactId>
46 46 </dependency>
47 47 <dependency>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>dao</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>data</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -204,6 +204,15 @@ VALUES (
204 204 '{"description":"Demo device that is used in sample applications that upload data from DHT11 temperature and humidity sensor"}'
205 205 );
206 206
  207 +INSERT INTO thingsboard.device ( id, tenant_id, customer_id, name, search_text, additional_info)
  208 +VALUES (
  209 + c8f1a6f0-b993-11e6-8a04-9ff4e1b7933d,
  210 + minTimeuuid ( '2016-11-01 01:02:01+0000' ),
  211 + minTimeuuid ( 0 ),
  212 + 'Raspberry Pi Demo Device',
  213 + 'raspberry pi demo device',
  214 + '{"description":"Demo device that is used in Raspberry Pi GPIO control sample application"}'
  215 +);
207 216
208 217 INSERT INTO thingsboard.device_credentials ( id, device_id, credentials_type, credentials_id)
209 218 VALUES (
... ... @@ -253,6 +262,14 @@ VALUES (
253 262 'DHT11_DEMO_TOKEN'
254 263 );
255 264
  265 +INSERT INTO thingsboard.device_credentials ( id, device_id, credentials_type, credentials_id)
  266 +VALUES (
  267 + now(),
  268 + c8f1a6f0-b993-11e6-8a04-9ff4e1b7933d,
  269 + 'ACCESS_TOKEN',
  270 + 'RASPBERRY_PI_DEMO_TOKEN'
  271 +);
  272 +
256 273 /** Demo data **/
257 274
258 275 /** Demo plugins & rules **/
... ... @@ -430,4 +447,14 @@ VALUES (
430 447 '{"description":"Demo dashboard for sample applications that upload temperature and humidity received from DHT11 or DHT22 sensors","widgets":[{"isSystemType":true,"bundleAlias":"digital_gauges","typeAlias":"digital_thermometer","type":"latest","title":"New widget","sizeX":5,"sizeY":5,"config":{"datasources":[{"type":"device","dataKeys":[{"name":"temperature","type":"timeseries","label":"temperature","color":"#2196f3","settings":{},"_hash":0.3720839051412099}],"deviceAliasId":1,"name":"DHT11"}],"timewindow":{"realtime":{"timewindowMs":60000}},"showTitle":false,"backgroundColor":"#000000","color":"rgba(0, 0, 0, 0.87)","padding":"0px","settings":{"maxValue":50,"donutStartAngle":90,"showValue":true,"showMinMax":true,"gaugeWidthScale":1,"levelColors":["#304ffe","#7e57c2","#ff4081","#d32f2f"],"refreshAnimationType":"<>","refreshAnimationTime":700,"startAnimationType":"<>","startAnimationTime":700,"titleFont":{"family":"RobotoDraft","size":12,"style":"normal","weight":"500"},"labelFont":{"family":"RobotoDraft","size":8,"style":"normal","weight":"500"},"valueFont":{"family":"Segment7Standard","style":"normal","weight":"500","size":18},"minMaxFont":{"family":"Segment7Standard","size":12,"style":"normal","weight":"500"},"dashThickness":1.5,"decimals":0,"minValue":0,"units":"°C","gaugeColor":"#333333","neonGlowBrightness":35,"gaugeType":"donut","showTitle":false},"title":"Temperature"},"row":0,"col":0},{"isSystemType":true,"bundleAlias":"digital_gauges","typeAlias":"digital_vertical_bar","type":"latest","title":"New widget","sizeX":3,"sizeY":5,"config":{"datasources":[{"type":"device","dataKeys":[{"name":"humidity","type":"timeseries","label":"humidity","color":"#2196f3","settings":{},"_hash":0.9492802776509441}],"deviceAliasId":"1","name":"DHT11"}],"timewindow":{"realtime":{"timewindowMs":60000}},"showTitle":false,"backgroundColor":"#000000","color":"rgba(0, 0, 0, 0.87)","padding":"0px","settings":{"maxValue":100,"donutStartAngle":90,"showValue":true,"showMinMax":true,"gaugeWidthScale":0.75,"levelColors":["#3d5afe","#f44336"],"refreshAnimationType":"<>","refreshAnimationTime":700,"startAnimationType":"<>","startAnimationTime":700,"titleFont":{"family":"RobotoDraft","size":12,"style":"normal","weight":"500"},"labelFont":{"family":"RobotoDraft","size":8,"style":"normal","weight":"500"},"valueFont":{"family":"Segment7Standard","style":"normal","weight":"500","size":14},"minMaxFont":{"family":"Segment7Standard","size":8,"style":"normal","weight":"normal","color":"#cccccc"},"neonGlowBrightness":20,"decimals":0,"showUnitTitle":true,"gaugeColor":"#171a1c","gaugeType":"verticalBar","showTitle":false,"minValue":0,"dashThickness":1.2},"title":"Humidity"},"row":0,"col":5}],"deviceAliases":{"1":{"alias":"DHT11","deviceId":"c8f1a6f0-b993-11e6-8a04-9ff4e1b7933c"}}}',
431 448 'Temperature & Humidity Demo Dashboard',
432 449 'temperature & humidity demo dashboard'
  450 +);
  451 +
  452 +INSERT INTO thingsboard.dashboard ( id, tenant_id, customer_id, configuration, title, search_text)
  453 +VALUES (
  454 + now(),
  455 + minTimeuuid ( '2016-11-01 01:02:01+0000' ),
  456 + minTimeuuid ( 0 ),
  457 + '{"description":"Demo dashboard for Raspberry PI GPIO Demo","widgets":[{"isSystemType":true,"bundleAlias":"gpio_widgets","typeAlias":"raspberry_pi_gpio_control","type":"rpc","title":"New widget","sizeX":6,"sizeY":10,"config":{"targetDeviceAliases":[],"showTitle":true,"backgroundColor":"#fff","color":"rgba(0, 0, 0, 0.87)","padding":"0px","settings":{"parseGpioStatusFunction":"return body[pin] === true;","gpioStatusChangeRequest":{"method":"setGpioStatus","paramsBody":"{\n \"pin\": \"{$pin}\",\n \"enabled\": \"{$enabled}\"\n}"},"requestTimeout":500,"switchPanelBackgroundColor":"#008a00","gpioStatusRequest":{"method":"getGpioStatus","paramsBody":"{}"},"gpioList":[{"pin":7,"label":"GPIO 4 (GPCLK0)","row":3,"col":0,"_uniqueKey":0},{"pin":11,"label":"GPIO 17","row":5,"col":0,"_uniqueKey":1},{"pin":12,"label":"GPIO 18","row":5,"col":1,"_uniqueKey":2},{"_uniqueKey":3,"pin":13,"label":"GPIO 27","row":6,"col":0},{"_uniqueKey":4,"pin":15,"label":"GPIO 22","row":7,"col":0},{"_uniqueKey":5,"pin":16,"label":"GPIO 23","row":7,"col":1},{"_uniqueKey":6,"pin":18,"label":"GPIO 24","row":8,"col":1},{"_uniqueKey":7,"pin":22,"label":"GPIO 25","row":10,"col":1},{"_uniqueKey":8,"pin":29,"label":"GPIO 5","row":14,"col":0},{"_uniqueKey":9,"pin":31,"label":"GPIO 6","row":15,"col":0},{"_uniqueKey":10,"pin":32,"label":"GPIO 12","row":15,"col":1},{"_uniqueKey":11,"pin":33,"label":"GPIO 13","row":16,"col":0},{"_uniqueKey":12,"pin":35,"label":"GPIO 19","row":17,"col":0},{"_uniqueKey":13,"pin":36,"label":"GPIO 16","row":17,"col":1},{"_uniqueKey":14,"pin":37,"label":"GPIO 26","row":18,"col":0},{"_uniqueKey":15,"pin":38,"label":"GPIO 20","row":18,"col":1},{"_uniqueKey":16,"pin":40,"label":"GPIO 21","row":19,"col":1}]},"title":"Raspberry Pi GPIO Control Panel","datasources":[],"targetDeviceAliasIds":["1"]},"row":0,"col":0},{"isSystemType":true,"bundleAlias":"gpio_widgets","typeAlias":"raspberry_pi_gpio_panel","type":"latest","title":"New widget","sizeX":7,"sizeY":10,"config":{"showTitle":true,"backgroundColor":"#fff","color":"rgba(0, 0, 0, 0.87)","padding":"0px","settings":{"gpioList":[{"pin":1,"label":"3.3V","row":0,"col":0,"color":"#fc9700","_uniqueKey":0},{"pin":2,"label":"5V","row":0,"col":1,"color":"#fb0000","_uniqueKey":1},{"pin":3,"label":"GPIO 2 (I2C1_SDA)","row":1,"col":0,"color":"#02fefb","_uniqueKey":2},{"color":"#fb0000","pin":4,"label":"5V","row":1,"col":1},{"color":"#02fefb","pin":5,"label":"GPIO 3 (I2C1_SCL)","row":2,"col":0},{"color":"#000000","pin":6,"label":"GND","row":2,"col":1},{"color":"#00fd00","pin":7,"label":"GPIO 4 (GPCLK0)","row":3,"col":0},{"color":"#fdfb00","pin":8,"label":"GPIO 14 (UART_TXD)","row":3,"col":1},{"color":"#000000","pin":9,"label":"GND","row":4,"col":0},{"color":"#fdfb00","pin":10,"label":"GPIO 15 (UART_RXD)","row":4,"col":1},{"color":"#00fd00","pin":11,"label":"GPIO 17","row":5,"col":0},{"color":"#00fd00","pin":12,"label":"GPIO 18","row":5,"col":1},{"color":"#00fd00","pin":13,"label":"GPIO 27","row":6,"col":0},{"color":"#000000","pin":14,"label":"GND","row":6,"col":1},{"color":"#00fd00","pin":15,"label":"GPIO 22","row":7,"col":0},{"color":"#00fd00","pin":16,"label":"GPIO 23","row":7,"col":1},{"color":"#fc9700","pin":17,"label":"3.3V","row":8,"col":0},{"color":"#00fd00","pin":18,"label":"GPIO 24","row":8,"col":1},{"color":"#fd01fd","pin":19,"label":"GPIO 10 (SPI_MOSI)","row":9,"col":0},{"color":"#000000","pin":20,"label":"GND","row":9,"col":1},{"color":"#fd01fd","pin":21,"label":"GPIO 9 (SPI_MISO)","row":10,"col":0},{"color":"#00fd00","pin":22,"label":"GPIO 25","row":10,"col":1},{"color":"#fd01fd","pin":23,"label":"GPIO 11 (SPI_SCLK)","row":11,"col":0},{"color":"#fd01fd","pin":24,"label":"GPIO 8 (SPI_CE0)","row":11,"col":1},{"color":"#000000","pin":25,"label":"GND","row":12,"col":0},{"color":"#fd01fd","pin":26,"label":"GPIO 7 (SPI_CE1)","row":12,"col":1},{"color":"#ffffff","pin":27,"label":"ID_SD","row":13,"col":0},{"color":"#ffffff","pin":28,"label":"ID_SC","row":13,"col":1},{"color":"#00fd00","pin":29,"label":"GPIO 5","row":14,"col":0},{"color":"#000000","pin":30,"label":"GND","row":14,"col":1},{"color":"#00fd00","pin":31,"label":"GPIO 6","row":15,"col":0},{"color":"#00fd00","pin":32,"label":"GPIO 12","row":15,"col":1},{"color":"#00fd00","pin":33,"label":"GPIO 13","row":16,"col":0},{"color":"#000000","pin":34,"label":"GND","row":16,"col":1},{"color":"#00fd00","pin":35,"label":"GPIO 19","row":17,"col":0},{"color":"#00fd00","pin":36,"label":"GPIO 16","row":17,"col":1},{"color":"#00fd00","pin":37,"label":"GPIO 26","row":18,"col":0},{"color":"#00fd00","pin":38,"label":"GPIO 20","row":18,"col":1},{"color":"#000000","pin":39,"label":"GND","row":19,"col":0},{"color":"#00fd00","pin":40,"label":"GPIO 21","row":19,"col":1}],"ledPanelBackgroundColor":"#008a00"},"title":"Raspberry Pi GPIO Status Panel","datasources":[{"type":"device","dataKeys":[{"name":"7","type":"attribute","label":"7","color":"#2196f3","settings":{},"_hash":0.20925966435886978},{"name":"11","type":"attribute","label":"11","color":"#4caf50","settings":{},"_hash":0.330267349594344},{"name":"12","type":"attribute","label":"12","color":"#f44336","settings":{},"_hash":0.5040578704481748},{"name":"13","type":"attribute","label":"13","color":"#ffc107","settings":{},"_hash":0.588956328191639},{"name":"15","type":"attribute","label":"15","color":"#607d8b","settings":{},"_hash":0.9229040530336119},{"name":"16","type":"attribute","label":"16","color":"#9c27b0","settings":{},"_hash":0.8692315253041654},{"name":"18","type":"attribute","label":"18","color":"#8bc34a","settings":{},"_hash":0.41465562857521543},{"name":"22","type":"attribute","label":"22","color":"#3f51b5","settings":{},"_hash":0.36135260043112827},{"name":"29","type":"attribute","label":"29","color":"#e91e63","settings":{},"_hash":0.9904592276182183},{"name":"31","type":"attribute","label":"31","color":"#ffeb3b","settings":{},"_hash":0.038330985429919195},{"name":"32","type":"attribute","label":"32","color":"#03a9f4","settings":{},"_hash":0.4334683890135089},{"name":"33","type":"attribute","label":"33","color":"#ff9800","settings":{},"_hash":0.6487255992492305},{"name":"35","type":"attribute","label":"35","color":"#673ab7","settings":{},"_hash":0.971555321150732},{"name":"36","type":"attribute","label":"36","color":"#cddc39","settings":{},"_hash":0.7826129728424382},{"name":"37","type":"attribute","label":"37","color":"#009688","settings":{},"_hash":0.44925676517537627},{"name":"38","type":"attribute","label":"38","color":"#795548","settings":{},"_hash":0.051518155759787465},{"name":"40","type":"attribute","label":"40","color":"#00bcd4","settings":{},"_hash":0.8733296686871144}],"deviceAliasId":1,"name":"RPi"}],"timewindow":{"realtime":{"timewindowMs":60000}}},"row":0,"col":6}],"deviceAliases":{"1":{"alias":"RPi","deviceId":"c8f1a6f0-b993-11e6-8a04-9ff4e1b7933d"}}}',
  458 + 'Raspberry PI GPIO Demo Dashboard',
  459 + 'raspberry pi gpio demo dashboard'
433 460 );
\ No newline at end of file
... ...
  1 +CASSANDRA_DATA_DIR=/home/docker/cassandra_volume
... ...
... ... @@ -27,5 +27,5 @@ $command rm -f
27 27 echo "building images.."
28 28 $command build
29 29
30   -echo "starting cassandra, zookeeper, db-schema images..."
31   -$command up -d cassandra zookeeper db-schema
  30 +echo "starting cassandra, zookeeper, thingsboard-db-schema images..."
  31 +$command up -d cassandra zookeeper thingsboard-db-schema
... ...
... ... @@ -18,7 +18,7 @@ version: '2'
18 18
19 19 services:
20 20 thingsboard:
21   - build: thingsboard
  21 + image: "thingsboard/application:0.1"
22 22 ports:
23 23 - "8080:8080"
24 24 - "1883:1883"
... ... @@ -27,8 +27,6 @@ services:
27 27 - cassandra:db
28 28 - zookeeper:zk
29 29 - thingsboard-db-schema:thingsboard-db-schema
30   - volumes:
31   - - "../application/target/thingsboard.deb:/root/thingsboard.deb"
32 30 env_file:
33 31 - thingsboard.env
34 32 entrypoint: ./run_thingsboard.sh
... ...
... ... @@ -17,6 +17,7 @@
17 17 FROM openjdk:8-jre
18 18
19 19 ADD run_thingsboard.sh /root/run_thingsboard.sh
  20 +ADD thingsboard.deb /root/thingsboard.deb
20 21
21 22 RUN chmod +x /root/run_thingsboard.sh
22 23
... ...
  1 +#!/bin/bash
  2 +#
  3 +# Copyright © 2016 The Thingsboard Authors
  4 +#
  5 +# Licensed under the Apache License, Version 2.0 (the "License");
  6 +# you may not use this file except in compliance with the License.
  7 +# You may obtain a copy of the License at
  8 +#
  9 +# http://www.apache.org/licenses/LICENSE-2.0
  10 +#
  11 +# Unless required by applicable law or agreed to in writing, software
  12 +# distributed under the License is distributed on an "AS IS" BASIS,
  13 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 +# See the License for the specific language governing permissions and
  15 +# limitations under the License.
  16 +#
  17 +
  18 +
  19 +cp ../../application/target/thingsboard.deb thingsboard.deb
  20 +
  21 +docker build -t thingsboard/application:0.1 .
  22 +
  23 +docker login
  24 +
  25 +docker push thingsboard/application:0.1
\ No newline at end of file
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>extensions-api</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,11 +37,11 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>data</artifactId>
42 42 </dependency>
43 43 <dependency>
44   - <groupId>org.thingsboard.server.common</groupId>
  44 + <groupId>org.thingsboard.common</groupId>
45 45 <artifactId>message</artifactId>
46 46 </dependency>
47 47 <dependency>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>extensions-core</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server</groupId>
  40 + <groupId>org.thingsboard</groupId>
41 41 <artifactId>extensions-api</artifactId>
42 42 <scope>provided</scope>
43 43 </dependency>
... ...
... ... @@ -21,11 +21,11 @@
21 21 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22 22 <modelVersion>4.0.0</modelVersion>
23 23 <parent>
24   - <groupId>org.thingsboard.server</groupId>
  24 + <groupId>org.thingsboard</groupId>
25 25 <version>0.0.1-SNAPSHOT</version>
26 26 <artifactId>extensions</artifactId>
27 27 </parent>
28   - <groupId>org.thingsboard.server.extensions</groupId>
  28 + <groupId>org.thingsboard.extensions</groupId>
29 29 <artifactId>extension-kafka</artifactId>
30 30 <packaging>jar</packaging>
31 31
... ... @@ -49,12 +49,12 @@
49 49 <scope>provided</scope>
50 50 </dependency>
51 51 <dependency>
52   - <groupId>org.thingsboard.server</groupId>
  52 + <groupId>org.thingsboard</groupId>
53 53 <artifactId>extensions-api</artifactId>
54 54 <scope>provided</scope>
55 55 </dependency>
56 56 <dependency>
57   - <groupId>org.thingsboard.server</groupId>
  57 + <groupId>org.thingsboard</groupId>
58 58 <artifactId>extensions-core</artifactId>
59 59 <scope>provided</scope>
60 60 </dependency>
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>extensions</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.extensions</groupId>
  26 + <groupId>org.thingsboard.extensions</groupId>
27 27 <artifactId>extension-rabbitmq</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -41,12 +41,12 @@
41 41 <artifactId>amqp-client</artifactId>
42 42 </dependency>
43 43 <dependency>
44   - <groupId>org.thingsboard.server</groupId>
  44 + <groupId>org.thingsboard</groupId>
45 45 <artifactId>extensions-api</artifactId>
46 46 <scope>provided</scope>
47 47 </dependency>
48 48 <dependency>
49   - <groupId>org.thingsboard.server</groupId>
  49 + <groupId>org.thingsboard</groupId>
50 50 <artifactId>extensions-core</artifactId>
51 51 <scope>provided</scope>
52 52 </dependency>
... ...
... ... @@ -21,11 +21,11 @@
21 21 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22 22 <modelVersion>4.0.0</modelVersion>
23 23 <parent>
24   - <groupId>org.thingsboard.server</groupId>
  24 + <groupId>org.thingsboard</groupId>
25 25 <version>0.0.1-SNAPSHOT</version>
26 26 <artifactId>extensions</artifactId>
27 27 </parent>
28   - <groupId>org.thingsboard.server.extensions</groupId>
  28 + <groupId>org.thingsboard.extensions</groupId>
29 29 <artifactId>extension-rest-api-call</artifactId>
30 30 <packaging>jar</packaging>
31 31
... ... @@ -49,7 +49,7 @@
49 49 <scope>provided</scope>
50 50 </dependency>
51 51 <dependency>
52   - <groupId>org.thingsboard.server</groupId>
  52 + <groupId>org.thingsboard</groupId>
53 53 <artifactId>extensions-api</artifactId>
54 54 <scope>provided</scope>
55 55 </dependency>
... ... @@ -59,7 +59,7 @@
59 59 <scope>provided</scope>
60 60 </dependency>
61 61 <dependency>
62   - <groupId>org.thingsboard.server</groupId>
  62 + <groupId>org.thingsboard</groupId>
63 63 <artifactId>extensions-core</artifactId>
64 64 <scope>provided</scope>
65 65 </dependency>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>extensions</artifactId>
28 28 <packaging>pom</packaging>
29 29
... ...
... ... @@ -68,6 +68,7 @@
68 68 <hazelcast-zookeeper.version>3.6.1</hazelcast-zookeeper.version>
69 69 <surfire.version>2.19.1</surfire.version>
70 70 <jar-plugin.version>3.0.2</jar-plugin.version>
  71 + <springfox-swagger.version>2.6.1</springfox-swagger.version>
71 72 </properties>
72 73
73 74 <modules>
... ... @@ -301,70 +302,70 @@
301 302 <dependencyManagement>
302 303 <dependencies>
303 304 <dependency>
304   - <groupId>org.thingsboard.server</groupId>
  305 + <groupId>org.thingsboard</groupId>
305 306 <artifactId>extensions-api</artifactId>
306 307 <version>${project.version}</version>
307 308 </dependency>
308 309 <dependency>
309   - <groupId>org.thingsboard.server</groupId>
  310 + <groupId>org.thingsboard</groupId>
310 311 <artifactId>extensions-core</artifactId>
311 312 <version>${project.version}</version>
312 313 </dependency>
313 314 <dependency>
314   - <groupId>org.thingsboard.server.extensions</groupId>
  315 + <groupId>org.thingsboard.extensions</groupId>
315 316 <artifactId>extension-rabbitmq</artifactId>
316 317 <classifier>extension</classifier>
317 318 <version>${project.version}</version>
318 319 </dependency>
319 320 <dependency>
320   - <groupId>org.thingsboard.server.extensions</groupId>
  321 + <groupId>org.thingsboard.extensions</groupId>
321 322 <artifactId>extension-rest-api-call</artifactId>
322 323 <classifier>extension</classifier>
323 324 <version>${project.version}</version>
324 325 </dependency>
325 326 <dependency>
326   - <groupId>org.thingsboard.server.extensions</groupId>
  327 + <groupId>org.thingsboard.extensions</groupId>
327 328 <artifactId>extension-kafka</artifactId>
328 329 <classifier>extension</classifier>
329 330 <version>${project.version}</version>
330 331 </dependency>
331 332 <dependency>
332   - <groupId>org.thingsboard.server.common</groupId>
  333 + <groupId>org.thingsboard.common</groupId>
333 334 <artifactId>data</artifactId>
334 335 <version>${project.version}</version>
335 336 </dependency>
336 337 <dependency>
337   - <groupId>org.thingsboard.server.common</groupId>
  338 + <groupId>org.thingsboard.common</groupId>
338 339 <artifactId>message</artifactId>
339 340 <version>${project.version}</version>
340 341 </dependency>
341 342 <dependency>
342   - <groupId>org.thingsboard.server.common</groupId>
  343 + <groupId>org.thingsboard.common</groupId>
343 344 <artifactId>transport</artifactId>
344 345 <version>${project.version}</version>
345 346 </dependency>
346 347 <dependency>
347   - <groupId>org.thingsboard.server.transport</groupId>
  348 + <groupId>org.thingsboard.transport</groupId>
348 349 <artifactId>http</artifactId>
349 350 <version>${project.version}</version>
350 351 </dependency>
351 352 <dependency>
352   - <groupId>org.thingsboard.server.transport</groupId>
  353 + <groupId>org.thingsboard.transport</groupId>
353 354 <artifactId>coap</artifactId>
354 355 <version>${project.version}</version>
355 356 </dependency>
356 357 <dependency>
357   - <groupId>org.thingsboard.server.transport</groupId>
  358 + <groupId>org.thingsboard.transport</groupId>
358 359 <artifactId>mqtt</artifactId>
359 360 <version>${project.version}</version>
360 361 </dependency>
361 362 <dependency>
362   - <groupId>org.thingsboard.server</groupId>
  363 + <groupId>org.thingsboard</groupId>
363 364 <artifactId>dao</artifactId>
364 365 <version>${project.version}</version>
365 366 </dependency>
366 367 <dependency>
367   - <groupId>org.thingsboard.server</groupId>
  368 + <groupId>org.thingsboard</groupId>
368 369 <artifactId>dao</artifactId>
369 370 <version>${project.version}</version>
370 371 <type>test-jar</type>
... ... @@ -672,6 +673,16 @@
672 673 <artifactId>hazelcast</artifactId>
673 674 <version>${hazelcast.version}</version>
674 675 </dependency>
  676 + <dependency>
  677 + <groupId>io.springfox</groupId>
  678 + <artifactId>springfox-swagger-ui</artifactId>
  679 + <version>${springfox-swagger.version}</version>
  680 + </dependency>
  681 + <dependency>
  682 + <groupId>io.springfox</groupId>
  683 + <artifactId>springfox-swagger2</artifactId>
  684 + <version>${springfox-swagger.version}</version>
  685 + </dependency>
675 686 </dependencies>
676 687 </dependencyManagement>
677 688
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>tools</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>data</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>transport</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.transport</groupId>
  26 + <groupId>org.thingsboard.transport</groupId>
27 27 <artifactId>coap</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>transport</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>transport</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.transport</groupId>
  26 + <groupId>org.thingsboard.transport</groupId>
27 27 <artifactId>http</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>transport</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -19,11 +19,11 @@
19 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 20 <modelVersion>4.0.0</modelVersion>
21 21 <parent>
22   - <groupId>org.thingsboard.server</groupId>
  22 + <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24 24 <artifactId>transport</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server.transport</groupId>
  26 + <groupId>org.thingsboard.transport</groupId>
27 27 <artifactId>mqtt</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ... @@ -37,7 +37,7 @@
37 37
38 38 <dependencies>
39 39 <dependency>
40   - <groupId>org.thingsboard.server.common</groupId>
  40 + <groupId>org.thingsboard.common</groupId>
41 41 <artifactId>transport</artifactId>
42 42 </dependency>
43 43 <dependency>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>transport</artifactId>
28 28 <packaging>pom</packaging>
29 29
... ...
... ... @@ -21,9 +21,9 @@
21 21 <parent>
22 22 <groupId>org.thingsboard</groupId>
23 23 <version>0.0.1-SNAPSHOT</version>
24   - <artifactId>server</artifactId>
  24 + <artifactId>thingsboard</artifactId>
25 25 </parent>
26   - <groupId>org.thingsboard.server</groupId>
  26 + <groupId>org.thingsboard</groupId>
27 27 <artifactId>ui</artifactId>
28 28 <packaging>jar</packaging>
29 29
... ...
... ... @@ -21,7 +21,7 @@ export default angular.module('thingsboard.api.telemetryWebsocket', [thingsboard
21 21 .name;
22 22
23 23 /*@ngInject*/
24   -function TelemetryWebsocketService($log, $websocket, $timeout, $window, types, userService) {
  24 +function TelemetryWebsocketService($websocket, $timeout, $window, types, userService) {
25 25
26 26 var isOpening = false,
27 27 isOpened = false,
... ... @@ -57,9 +57,7 @@ function TelemetryWebsocketService($log, $websocket, $timeout, $window, types, u
57 57 if (isOpened && (cmdsWrapper.tsSubCmds.length > 0 ||
58 58 cmdsWrapper.historyCmds.length > 0 ||
59 59 cmdsWrapper.attrSubCmds.length > 0)) {
60   - $log.debug("Sending subscription commands!");
61 60 dataStream.send(angular.copy(cmdsWrapper)).then(function () {
62   - $log.debug("Subscription commands were sent!");
63 61 checkToClose();
64 62 });
65 63 cmdsWrapper.tsSubCmds = [];
... ... @@ -69,21 +67,17 @@ function TelemetryWebsocketService($log, $websocket, $timeout, $window, types, u
69 67 tryOpenSocket();
70 68 }
71 69
72   - function onError (message) {
73   - $log.debug("Websocket error:");
74   - $log.debug(message);
  70 + function onError (/*message*/) {
75 71 isOpening = false;
76 72 }
77 73
78 74 function onOpen () {
79   - $log.debug("Websocket opened");
80 75 isOpening = false;
81 76 isOpened = true;
82 77 publishCommands();
83 78 }
84 79
85 80 function onClose () {
86   - $log.debug("Websocket closed");
87 81 isOpening = false;
88 82 isOpened = false;
89 83 }
... ...
... ... @@ -46,8 +46,7 @@ var pluginActionsClazzHelpLinkMap = {
46 46 'org.thingsboard.server.extensions.rest.action.RestApiCallPluginAction': 'pluginActionRestApiCall'
47 47 };
48 48
49   -//var helpBaseUrl = "http://thingsboard.io";
50   -var helpBaseUrl = "http://localhost:4000";
  49 +var helpBaseUrl = "http://thingsboard.io";
51 50
52 51 export default angular.module('thingsboard.help', [])
53 52 .constant('helpLinks',
... ...