Commit 7a8683ef0db87dd623b9f48696bebed20c2be559

Authored by Igor Kulikov
1 parent 985510b5

Minor fixes

... ... @@ -98,7 +98,12 @@
98 98 "react-ace",
99 99 "schema-inspector",
100 100 "@flowjs/flow.js",
101   - "mousetrap"
  101 + "mousetrap",
  102 + "prop-types",
  103 + "react-is",
  104 + "hoist-non-react-statics",
  105 + "classnames",
  106 + "raf"
102 107 ]
103 108 },
104 109 "configurations": {
... ...
... ... @@ -3,7 +3,7 @@
3 3 "version": "3.1.1",
4 4 "scripts": {
5 5 "ng": "ng",
6   - "start": "ng serve --host 0.0.0.0 --open",
  6 + "start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --open",
7 7 "build": "ng build",
8 8 "build:prod": "ng build --prod --vendor-chunk",
9 9 "test": "ng test",
... ...
... ... @@ -13,25 +13,28 @@
13 13 * See the License for the specific language governing permissions and
14 14 * limitations under the License.
15 15 */
16   -const ruleNodeUiforwardHost = "localhost";
17   -const ruleNodeUiforwardPort = 8080;
  16 +
  17 +const forwardUrl = "https://demo.thingsboard.io";
  18 +const wsForwardUrl = "wss://demo.thingsboard.io";
  19 +const ruleNodeUiforwardUrl = forwardUrl;
18 20
19 21 const PROXY_CONFIG = {
20 22 "/api": {
21   - "target": "http://localhost:8080",
  23 + "target": forwardUrl,
22 24 "secure": false,
23 25 },
24 26 "/static/rulenode": {
25   - "target": `http://${ruleNodeUiforwardHost}:${ruleNodeUiforwardPort}`,
  27 + "target": ruleNodeUiforwardUrl,
26 28 "secure": false,
27 29 },
28 30 "/static": {
29   - "target": "http://localhost:8080",
  31 + "target": forwardUrl,
30 32 "secure": false,
31 33 },
32 34 "/api/ws": {
33   - "target": "ws://localhost:8080",
  35 + "target": wsForwardUrl,
34 36 "ws": true,
  37 + "secure": false
35 38 },
36 39 };
37 40
... ...
... ... @@ -35,7 +35,7 @@ import { AuthUser } from '@shared/models/user.model';
35 35 import { getCurrentAuthUser } from '@core/auth/auth.selectors';
36 36 import { Timewindow, toHistoryTimewindow } from '@shared/models/time/time.models';
37 37 import { TimeService } from '@core/services/time.service';
38   -import { GridsterComponent, GridsterConfig } from 'angular-gridster2';
  38 +import { GridsterComponent, GridsterConfig, GridType } from 'angular-gridster2';
39 39 import {
40 40 DashboardCallbacks,
41 41 DashboardWidget,
... ... @@ -183,7 +183,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
183 183 this.dashboardTimewindow = this.timeService.defaultTimewindow();
184 184 }
185 185 this.gridsterOpts = {
186   - gridType: 'scrollVertical',
  186 + gridType: GridType.ScrollVertical,
187 187 keepFixedHeightInMobile: true,
188 188 disableWarnings: false,
189 189 disableAutoPositionOnConflict: false,
... ... @@ -288,7 +288,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
288 288
289 289 ngAfterViewInit(): void {
290 290 this.gridsterResize$ = new ResizeObserver(() => {
291   - this.onGridsterParentResize()
  291 + this.onGridsterParentResize();
292 292 });
293 293 this.gridsterResize$.observe(this.gridster.el);
294 294 }
... ... @@ -473,9 +473,9 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
473 473 this.isMobileSize = this.checkIsMobileSize();
474 474 const autofillHeight = this.isAutofillHeight();
475 475 if (autofillHeight) {
476   - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'fit';
  476 + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.Fit;
477 477 } else {
478   - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'scrollVertical';
  478 + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.ScrollVertical;
479 479 }
480 480 const mobileBreakPoint = this.isMobileSize ? 20000 : 0;
481 481 this.gridsterOpts.mobileBreakpoint = mobileBreakPoint;
... ...
... ... @@ -247,9 +247,9 @@ export class WidgetContext {
247 247 }
248 248
249 249 showInfoToast(message: string,
250   - verticalPosition: NotificationVerticalPosition = 'bottom',
251   - horizontalPosition: NotificationHorizontalPosition = 'left',
252   - target?: string) {
  250 + verticalPosition: NotificationVerticalPosition = 'bottom',
  251 + horizontalPosition: NotificationHorizontalPosition = 'left',
  252 + target?: string) {
253 253 this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target);
254 254 }
255 255
... ... @@ -325,7 +325,7 @@ export class WidgetContext {
325 325
326 326 pageLink(pageSize: number, page: number = 0, textSearch: string = null, sortOrder: SortOrder = null): PageLink {
327 327 return new PageLink(pageSize, page, textSearch, sortOrder);
328   - };
  328 + }
329 329 }
330 330
331 331 export interface IDynamicWidgetComponent {
... ...