thingsboard-memoizeit

Details

diff --git a/application/src/main/java/org/thingsboard/server/ThingsboardServerApplication.java b/application/src/main/java/org/thingsboard/server/ThingsboardServerApplication.java
index 4d3c8e9..5e00ac4 100644
--- a/application/src/main/java/org/thingsboard/server/ThingsboardServerApplication.java
+++ b/application/src/main/java/org/thingsboard/server/ThingsboardServerApplication.java
@@ -18,12 +18,15 @@ package org.thingsboard.server;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.context.annotation.ComponentScan;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 import java.util.Arrays;
 
-@EnableAutoConfiguration
+@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
 @SpringBootApplication
 @EnableSwagger2
 @ComponentScan({"org.thingsboard.server"})
diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml
index f24761c..6bbce15 100644
--- a/application/src/main/resources/thingsboard.yml
+++ b/application/src/main/resources/thingsboard.yml
@@ -227,7 +227,20 @@ spring.mvc.cors:
 # SQL DAO Configuration
 sql:
   enabled: "${SQL_ENABLED:false}"
+
+spring:
+  data:
+    jpa:
+      repositories:
+        enabled: "false"
+  jpa:
+    show-sql: "false"
+    generate-ddl: "false"
+    database-platform: "org.hibernate.dialect.PostgreSQLDialect"
+    hibernate:
+      ddl-auto: "none"
   datasource:
-    url: "${SQL_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
-    username: "${SQL_DATASOURCE_USERNAME:postgres}"
-    password: "${SQL_DATASOURCE_PASSWORD:postgres}"         
+    driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
+    url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
+    username: "${SPRING_DATASOURCE_USERNAME:postgres}"
+    password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
\ No newline at end of file
diff --git a/ui/src/app/api/customer.service.js b/ui/src/app/api/customer.service.js
index 8a3fe66..b36b44a 100644
--- a/ui/src/app/api/customer.service.js
+++ b/ui/src/app/api/customer.service.js
@@ -63,17 +63,6 @@ function CustomerService($http, $q, types) {
         return deferred.promise;
     }
 
-    function getCustomerTitle(customerId) {
-        var deferred = $q.defer();
-        var url = '/api/customer/' + customerId + '/title';
-        $http.get(url, null).then(function success(response) {
-            deferred.resolve(response.data);
-        }, function fail(response) {
-            deferred.reject(response.data);
-        });
-        return deferred.promise;
-    }
-
     function getShortCustomerInfo(customerId) {
         var deferred = $q.defer();
         var url = '/api/customer/' + customerId + '/shortInfo';
diff --git a/ui/src/app/components/dashboard.directive.js b/ui/src/app/components/dashboard.directive.js
index b254cca..f26121c 100644
--- a/ui/src/app/components/dashboard.directive.js
+++ b/ui/src/app/components/dashboard.directive.js
@@ -202,10 +202,8 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, t
         onResetTimewindow: function() {
             $timeout(function() {
                 if (vm.originalDashboardTimewindow) {
-                $timeout(function() {
                     vm.dashboardTimewindow = angular.copy(vm.originalDashboardTimewindow);
                     vm.originalDashboardTimewindow = null;
-                }, 0);
                 }
             }, 0);
         },
diff --git a/ui/src/app/components/widget.controller.js b/ui/src/app/components/widget.controller.js
index ef53ac2..6fc4bba 100644
--- a/ui/src/app/components/widget.controller.js
+++ b/ui/src/app/components/widget.controller.js
@@ -561,7 +561,6 @@ export default function WidgetController($scope, $timeout, $window, $element, $q
         }
     }
 
-            var dataIndex = 0;
     //TODO: widgets visibility
     /*function updateVisibility(forceRedraw) {
         if (visibleRect) {
diff --git a/ui/src/app/widget/lib/flot-widget.js b/ui/src/app/widget/lib/flot-widget.js
index 6687f1a..3076594 100644
--- a/ui/src/app/widget/lib/flot-widget.js
+++ b/ui/src/app/widget/lib/flot-widget.js
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+ 
 import $ from 'jquery';
 import tinycolor from 'tinycolor2';
 import moment from 'moment';
@@ -34,12 +34,6 @@ export default class TbFlot {
         this.chartType = chartType || 'line';
         var settings = ctx.settings;
 
-            if (this.chartType === 'line' && settings.smoothLines && !series.points.show) {
-                series.curvedLines = {
-                    apply: true
-                }
-            }
-
         ctx.tooltip = $('#flot-series-tooltip');
         if (ctx.tooltip.length === 0) {
             ctx.tooltip = $("<div id='flot-series-tooltip' class='flot-mouse-value'></div>");