diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index c3f3517486..151254c042 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -148,7 +148,7 @@ ui: # Help parameters help: # Base url for UI help assets - base-url: "${UI_HELP_BASE_URL:https://raw.githubusercontent.com/thingsboard/thingsboard-ui-help/release-3.3.4}" + base-url: "${UI_HELP_BASE_URL:https://raw.githubusercontent.com/thingsboard/thingsboard-ui-help/release-3.4}" database: ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html index fc7146b3f5..a6520e02bd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html @@ -25,7 +25,8 @@ 'tb-highlighted': isHighlighted(widget), 'tb-not-highlighted': isNotHighlighted(widget), 'mat-elevation-z4': widget.dropShadow, - 'tb-has-timewindow': widget.hasTimewindow + 'tb-has-timewindow': widget.hasTimewindow, + 'tb-edit': isEdit }" [ngStyle]="widget.style" (mousedown)="onMouseDown($event)" diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss index 17a34f6382..ecdb6449e4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss @@ -114,4 +114,8 @@ div.tb-widget { &.tb-not-highlighted { opacity: .5; } + + &.tb-edit { + cursor: pointer; + } } diff --git a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts index 5b6418c474..1e5a13f984 100644 --- a/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/dashboard-component.models.ts @@ -428,7 +428,7 @@ export class DashboardWidget implements GridsterItem, IDashboardWidget { this.hasAggregation = this.widget.type === widgetType.timeseries; - this.style = {cursor: 'pointer', + this.style = { color: this.color, backgroundColor: this.backgroundColor, padding: this.padding, diff --git a/ui-ngx/src/app/shared/components/markdown.component.ts b/ui-ngx/src/app/shared/components/markdown.component.ts index 8312743739..3e2ee1594c 100644 --- a/ui-ngx/src/app/shared/components/markdown.component.ts +++ b/ui-ngx/src/app/shared/components/markdown.component.ts @@ -126,11 +126,11 @@ export class TbMarkdownComponent implements OnChanges { this.handlePlugins(this.tbMarkdownInstanceComponentRef.location.nativeElement); this.markdownService.highlight(this.tbMarkdownInstanceComponentRef.location.nativeElement); readyObservable = this.handleImages(this.tbMarkdownInstanceComponentRef.location.nativeElement); + this.cd.detectChanges(); this.error = null; } catch (error) { readyObservable = this.handleError(compiled, error); } - this.cd.detectChanges(); readyObservable.subscribe(() => { this.ready.emit(); }); @@ -146,9 +146,8 @@ export class TbMarkdownComponent implements OnChanges { private handleError(template: string, error): Observable { this.error = (error ? error + '' : 'Failed to render markdown!').replace(/\n/g, '
'); - this.destroyMarkdownInstanceResources(); + this.markdownContainer.clear(); if (this.fallbackToPlainMarkdownValue) { - this.markdownContainer.clear(); const element = this.fallbackElement.nativeElement; element.innerHTML = template; this.handlePlugins(element);