Showing
5 changed files
with
25 additions
and
17 deletions
@@ -98,7 +98,12 @@ | @@ -98,7 +98,12 @@ | ||
98 | "react-ace", | 98 | "react-ace", |
99 | "schema-inspector", | 99 | "schema-inspector", |
100 | "@flowjs/flow.js", | 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 | "configurations": { | 109 | "configurations": { |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | "version": "3.1.1", | 3 | "version": "3.1.1", |
4 | "scripts": { | 4 | "scripts": { |
5 | "ng": "ng", | 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 | "build": "ng build", | 7 | "build": "ng build", |
8 | "build:prod": "ng build --prod --vendor-chunk", | 8 | "build:prod": "ng build --prod --vendor-chunk", |
9 | "test": "ng test", | 9 | "test": "ng test", |
@@ -13,25 +13,28 @@ | @@ -13,25 +13,28 @@ | ||
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 | -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 | const PROXY_CONFIG = { | 21 | const PROXY_CONFIG = { |
20 | "/api": { | 22 | "/api": { |
21 | - "target": "http://localhost:8080", | 23 | + "target": forwardUrl, |
22 | "secure": false, | 24 | "secure": false, |
23 | }, | 25 | }, |
24 | "/static/rulenode": { | 26 | "/static/rulenode": { |
25 | - "target": `http://${ruleNodeUiforwardHost}:${ruleNodeUiforwardPort}`, | 27 | + "target": ruleNodeUiforwardUrl, |
26 | "secure": false, | 28 | "secure": false, |
27 | }, | 29 | }, |
28 | "/static": { | 30 | "/static": { |
29 | - "target": "http://localhost:8080", | 31 | + "target": forwardUrl, |
30 | "secure": false, | 32 | "secure": false, |
31 | }, | 33 | }, |
32 | "/api/ws": { | 34 | "/api/ws": { |
33 | - "target": "ws://localhost:8080", | 35 | + "target": wsForwardUrl, |
34 | "ws": true, | 36 | "ws": true, |
37 | + "secure": false | ||
35 | }, | 38 | }, |
36 | }; | 39 | }; |
37 | 40 |
@@ -35,7 +35,7 @@ import { AuthUser } from '@shared/models/user.model'; | @@ -35,7 +35,7 @@ import { AuthUser } from '@shared/models/user.model'; | ||
35 | import { getCurrentAuthUser } from '@core/auth/auth.selectors'; | 35 | import { getCurrentAuthUser } from '@core/auth/auth.selectors'; |
36 | import { Timewindow, toHistoryTimewindow } from '@shared/models/time/time.models'; | 36 | import { Timewindow, toHistoryTimewindow } from '@shared/models/time/time.models'; |
37 | import { TimeService } from '@core/services/time.service'; | 37 | import { TimeService } from '@core/services/time.service'; |
38 | -import { GridsterComponent, GridsterConfig } from 'angular-gridster2'; | 38 | +import { GridsterComponent, GridsterConfig, GridType } from 'angular-gridster2'; |
39 | import { | 39 | import { |
40 | DashboardCallbacks, | 40 | DashboardCallbacks, |
41 | DashboardWidget, | 41 | DashboardWidget, |
@@ -183,7 +183,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | @@ -183,7 +183,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | ||
183 | this.dashboardTimewindow = this.timeService.defaultTimewindow(); | 183 | this.dashboardTimewindow = this.timeService.defaultTimewindow(); |
184 | } | 184 | } |
185 | this.gridsterOpts = { | 185 | this.gridsterOpts = { |
186 | - gridType: 'scrollVertical', | 186 | + gridType: GridType.ScrollVertical, |
187 | keepFixedHeightInMobile: true, | 187 | keepFixedHeightInMobile: true, |
188 | disableWarnings: false, | 188 | disableWarnings: false, |
189 | disableAutoPositionOnConflict: false, | 189 | disableAutoPositionOnConflict: false, |
@@ -288,7 +288,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | @@ -288,7 +288,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | ||
288 | 288 | ||
289 | ngAfterViewInit(): void { | 289 | ngAfterViewInit(): void { |
290 | this.gridsterResize$ = new ResizeObserver(() => { | 290 | this.gridsterResize$ = new ResizeObserver(() => { |
291 | - this.onGridsterParentResize() | 291 | + this.onGridsterParentResize(); |
292 | }); | 292 | }); |
293 | this.gridsterResize$.observe(this.gridster.el); | 293 | this.gridsterResize$.observe(this.gridster.el); |
294 | } | 294 | } |
@@ -473,9 +473,9 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | @@ -473,9 +473,9 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo | ||
473 | this.isMobileSize = this.checkIsMobileSize(); | 473 | this.isMobileSize = this.checkIsMobileSize(); |
474 | const autofillHeight = this.isAutofillHeight(); | 474 | const autofillHeight = this.isAutofillHeight(); |
475 | if (autofillHeight) { | 475 | if (autofillHeight) { |
476 | - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'fit'; | 476 | + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.Fit; |
477 | } else { | 477 | } else { |
478 | - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'scrollVertical'; | 478 | + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.ScrollVertical; |
479 | } | 479 | } |
480 | const mobileBreakPoint = this.isMobileSize ? 20000 : 0; | 480 | const mobileBreakPoint = this.isMobileSize ? 20000 : 0; |
481 | this.gridsterOpts.mobileBreakpoint = mobileBreakPoint; | 481 | this.gridsterOpts.mobileBreakpoint = mobileBreakPoint; |
@@ -247,9 +247,9 @@ export class WidgetContext { | @@ -247,9 +247,9 @@ export class WidgetContext { | ||
247 | } | 247 | } |
248 | 248 | ||
249 | showInfoToast(message: string, | 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 | this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target); | 253 | this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target); |
254 | } | 254 | } |
255 | 255 | ||
@@ -325,7 +325,7 @@ export class WidgetContext { | @@ -325,7 +325,7 @@ export class WidgetContext { | ||
325 | 325 | ||
326 | pageLink(pageSize: number, page: number = 0, textSearch: string = null, sortOrder: SortOrder = null): PageLink { | 326 | pageLink(pageSize: number, page: number = 0, textSearch: string = null, sortOrder: SortOrder = null): PageLink { |
327 | return new PageLink(pageSize, page, textSearch, sortOrder); | 327 | return new PageLink(pageSize, page, textSearch, sortOrder); |
328 | - }; | 328 | + } |
329 | } | 329 | } |
330 | 330 | ||
331 | export interface IDynamicWidgetComponent { | 331 | export interface IDynamicWidgetComponent { |