diff --git a/ui-ngx/angular.json b/ui-ngx/angular.json index 0691b126f4..776f862144 100644 --- a/ui-ngx/angular.json +++ b/ui-ngx/angular.json @@ -98,7 +98,12 @@ "react-ace", "schema-inspector", "@flowjs/flow.js", - "mousetrap" + "mousetrap", + "prop-types", + "react-is", + "hoist-non-react-statics", + "classnames", + "raf" ] }, "configurations": { diff --git a/ui-ngx/package.json b/ui-ngx/package.json index 4243684a98..6f74ea9659 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -3,7 +3,7 @@ "version": "3.1.1", "scripts": { "ng": "ng", - "start": "ng serve --host 0.0.0.0 --open", + "start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --open", "build": "ng build", "build:prod": "ng build --prod --vendor-chunk", "test": "ng test", diff --git a/ui-ngx/proxy.conf.js b/ui-ngx/proxy.conf.js index 9d9c01f7cc..b852f825c0 100644 --- a/ui-ngx/proxy.conf.js +++ b/ui-ngx/proxy.conf.js @@ -13,25 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const ruleNodeUiforwardHost = "localhost"; -const ruleNodeUiforwardPort = 8080; + +const forwardUrl = "https://demo.thingsboard.io"; +const wsForwardUrl = "wss://demo.thingsboard.io"; +const ruleNodeUiforwardUrl = forwardUrl; const PROXY_CONFIG = { "/api": { - "target": "http://localhost:8080", + "target": forwardUrl, "secure": false, }, "/static/rulenode": { - "target": `http://${ruleNodeUiforwardHost}:${ruleNodeUiforwardPort}`, + "target": ruleNodeUiforwardUrl, "secure": false, }, "/static": { - "target": "http://localhost:8080", + "target": forwardUrl, "secure": false, }, "/api/ws": { - "target": "ws://localhost:8080", + "target": wsForwardUrl, "ws": true, + "secure": false }, }; diff --git a/ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts b/ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts index 0bc4f6beee..0289831a01 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.ts @@ -35,7 +35,7 @@ import { AuthUser } from '@shared/models/user.model'; import { getCurrentAuthUser } from '@core/auth/auth.selectors'; import { Timewindow, toHistoryTimewindow } from '@shared/models/time/time.models'; import { TimeService } from '@core/services/time.service'; -import { GridsterComponent, GridsterConfig } from 'angular-gridster2'; +import { GridsterComponent, GridsterConfig, GridType } from 'angular-gridster2'; import { DashboardCallbacks, DashboardWidget, @@ -183,7 +183,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo this.dashboardTimewindow = this.timeService.defaultTimewindow(); } this.gridsterOpts = { - gridType: 'scrollVertical', + gridType: GridType.ScrollVertical, keepFixedHeightInMobile: true, disableWarnings: false, disableAutoPositionOnConflict: false, @@ -288,7 +288,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo ngAfterViewInit(): void { this.gridsterResize$ = new ResizeObserver(() => { - this.onGridsterParentResize() + this.onGridsterParentResize(); }); this.gridsterResize$.observe(this.gridster.el); } @@ -473,9 +473,9 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo this.isMobileSize = this.checkIsMobileSize(); const autofillHeight = this.isAutofillHeight(); if (autofillHeight) { - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'fit'; + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.Fit; } else { - this.gridsterOpts.gridType = this.isMobileSize ? 'fixed' : 'scrollVertical'; + this.gridsterOpts.gridType = this.isMobileSize ? GridType.Fixed : GridType.ScrollVertical; } const mobileBreakPoint = this.isMobileSize ? 20000 : 0; this.gridsterOpts.mobileBreakpoint = mobileBreakPoint; diff --git a/ui-ngx/src/app/modules/home/models/widget-component.models.ts b/ui-ngx/src/app/modules/home/models/widget-component.models.ts index 289296b159..aa97d99876 100644 --- a/ui-ngx/src/app/modules/home/models/widget-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/widget-component.models.ts @@ -247,9 +247,9 @@ export class WidgetContext { } showInfoToast(message: string, - verticalPosition: NotificationVerticalPosition = 'bottom', - horizontalPosition: NotificationHorizontalPosition = 'left', - target?: string) { + verticalPosition: NotificationVerticalPosition = 'bottom', + horizontalPosition: NotificationHorizontalPosition = 'left', + target?: string) { this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target); } @@ -325,7 +325,7 @@ export class WidgetContext { pageLink(pageSize: number, page: number = 0, textSearch: string = null, sortOrder: SortOrder = null): PageLink { return new PageLink(pageSize, page, textSearch, sortOrder); - }; + } } export interface IDynamicWidgetComponent {