Commit 7d514d8cadae746a8055201f582cf390a921b2d8
1 parent
6a62b649
Fixed js builds
Disabled autoconfiguration for hibernate
Showing
6 changed files
with
21 additions
and
25 deletions
@@ -18,12 +18,15 @@ package org.thingsboard.server; | @@ -18,12 +18,15 @@ package org.thingsboard.server; | ||
18 | import org.springframework.boot.SpringApplication; | 18 | import org.springframework.boot.SpringApplication; |
19 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | 19 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
20 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
21 | +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | ||
22 | +import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; | ||
23 | +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; | ||
21 | import org.springframework.context.annotation.ComponentScan; | 24 | import org.springframework.context.annotation.ComponentScan; |
22 | import springfox.documentation.swagger2.annotations.EnableSwagger2; | 25 | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
23 | 26 | ||
24 | import java.util.Arrays; | 27 | import java.util.Arrays; |
25 | 28 | ||
26 | -@EnableAutoConfiguration | 29 | +@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}) |
27 | @SpringBootApplication | 30 | @SpringBootApplication |
28 | @EnableSwagger2 | 31 | @EnableSwagger2 |
29 | @ComponentScan({"org.thingsboard.server"}) | 32 | @ComponentScan({"org.thingsboard.server"}) |
@@ -227,7 +227,20 @@ spring.mvc.cors: | @@ -227,7 +227,20 @@ spring.mvc.cors: | ||
227 | # SQL DAO Configuration | 227 | # SQL DAO Configuration |
228 | sql: | 228 | sql: |
229 | enabled: "${SQL_ENABLED:false}" | 229 | enabled: "${SQL_ENABLED:false}" |
230 | + | ||
231 | +spring: | ||
232 | + data: | ||
233 | + jpa: | ||
234 | + repositories: | ||
235 | + enabled: "false" | ||
236 | + jpa: | ||
237 | + show-sql: "false" | ||
238 | + generate-ddl: "false" | ||
239 | + database-platform: "org.hibernate.dialect.PostgreSQLDialect" | ||
240 | + hibernate: | ||
241 | + ddl-auto: "none" | ||
230 | datasource: | 242 | datasource: |
231 | - url: "${SQL_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" | ||
232 | - username: "${SQL_DATASOURCE_USERNAME:postgres}" | ||
233 | - password: "${SQL_DATASOURCE_PASSWORD:postgres}" | 243 | + driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}" |
244 | + url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" | ||
245 | + username: "${SPRING_DATASOURCE_USERNAME:postgres}" | ||
246 | + password: "${SPRING_DATASOURCE_PASSWORD:postgres}" |
@@ -63,17 +63,6 @@ function CustomerService($http, $q, types) { | @@ -63,17 +63,6 @@ function CustomerService($http, $q, types) { | ||
63 | return deferred.promise; | 63 | return deferred.promise; |
64 | } | 64 | } |
65 | 65 | ||
66 | - function getCustomerTitle(customerId) { | ||
67 | - var deferred = $q.defer(); | ||
68 | - var url = '/api/customer/' + customerId + '/title'; | ||
69 | - $http.get(url, null).then(function success(response) { | ||
70 | - deferred.resolve(response.data); | ||
71 | - }, function fail(response) { | ||
72 | - deferred.reject(response.data); | ||
73 | - }); | ||
74 | - return deferred.promise; | ||
75 | - } | ||
76 | - | ||
77 | function getShortCustomerInfo(customerId) { | 66 | function getShortCustomerInfo(customerId) { |
78 | var deferred = $q.defer(); | 67 | var deferred = $q.defer(); |
79 | var url = '/api/customer/' + customerId + '/shortInfo'; | 68 | var url = '/api/customer/' + customerId + '/shortInfo'; |
@@ -202,10 +202,8 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, t | @@ -202,10 +202,8 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, t | ||
202 | onResetTimewindow: function() { | 202 | onResetTimewindow: function() { |
203 | $timeout(function() { | 203 | $timeout(function() { |
204 | if (vm.originalDashboardTimewindow) { | 204 | if (vm.originalDashboardTimewindow) { |
205 | - $timeout(function() { | ||
206 | vm.dashboardTimewindow = angular.copy(vm.originalDashboardTimewindow); | 205 | vm.dashboardTimewindow = angular.copy(vm.originalDashboardTimewindow); |
207 | vm.originalDashboardTimewindow = null; | 206 | vm.originalDashboardTimewindow = null; |
208 | - }, 0); | ||
209 | } | 207 | } |
210 | }, 0); | 208 | }, 0); |
211 | }, | 209 | }, |
@@ -561,7 +561,6 @@ export default function WidgetController($scope, $timeout, $window, $element, $q | @@ -561,7 +561,6 @@ export default function WidgetController($scope, $timeout, $window, $element, $q | ||
561 | } | 561 | } |
562 | } | 562 | } |
563 | 563 | ||
564 | - var dataIndex = 0; | ||
565 | //TODO: widgets visibility | 564 | //TODO: widgets visibility |
566 | /*function updateVisibility(forceRedraw) { | 565 | /*function updateVisibility(forceRedraw) { |
567 | if (visibleRect) { | 566 | if (visibleRect) { |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | - | 16 | + |
17 | import $ from 'jquery'; | 17 | import $ from 'jquery'; |
18 | import tinycolor from 'tinycolor2'; | 18 | import tinycolor from 'tinycolor2'; |
19 | import moment from 'moment'; | 19 | import moment from 'moment'; |
@@ -34,12 +34,6 @@ export default class TbFlot { | @@ -34,12 +34,6 @@ export default class TbFlot { | ||
34 | this.chartType = chartType || 'line'; | 34 | this.chartType = chartType || 'line'; |
35 | var settings = ctx.settings; | 35 | var settings = ctx.settings; |
36 | 36 | ||
37 | - if (this.chartType === 'line' && settings.smoothLines && !series.points.show) { | ||
38 | - series.curvedLines = { | ||
39 | - apply: true | ||
40 | - } | ||
41 | - } | ||
42 | - | ||
43 | ctx.tooltip = $('#flot-series-tooltip'); | 37 | ctx.tooltip = $('#flot-series-tooltip'); |
44 | if (ctx.tooltip.length === 0) { | 38 | if (ctx.tooltip.length === 0) { |
45 | ctx.tooltip = $("<div id='flot-series-tooltip' class='flot-mouse-value'></div>"); | 39 | ctx.tooltip = $("<div id='flot-series-tooltip' class='flot-mouse-value'></div>"); |