From 720d26483289d35403c6f2a747029a3447214bb3 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 11 Oct 2021 13:23:21 +0300 Subject: [PATCH] Use signleton marked options service. Fix popover size to not overflow viewport size. Add path routing for rulenode help assets to k8s ingress configuration. --- k8s/common/thingsboard.yml | 4 ++++ .../dashboard-page/dashboard-page.component.html | 2 +- .../home/components/widget/widget.component.ts | 4 +++- .../shared/components/help-markdown.component.scss | 4 ++-- .../src/app/shared/components/popover.component.scss | 12 ++++++++++++ .../src/app/shared/components/popover.component.ts | 5 +++-- ui-ngx/src/app/shared/shared.module.ts | 3 ++- 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/k8s/common/thingsboard.yml b/k8s/common/thingsboard.yml index 51f39823df..ee360c27b7 100644 --- a/k8s/common/thingsboard.yml +++ b/k8s/common/thingsboard.yml @@ -424,6 +424,10 @@ spec: backend: serviceName: tb-node servicePort: 8080 + - path: /assets/help/.*/rulenode/.* + backend: + serviceName: tb-node + servicePort: 8080 - path: /oauth2/.* backend: serviceName: tb-node diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index a6d91d87ae..a97004d798 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -
(trigger: Element, renderer: Renderer2, hostView: ViewContainerRef, componentType: Type, preferredPlacement: PopoverPlacement = 'top', hideOnClickOutside = true, - injector?: Injector, context?: any, popoverStyle: any = {}, style?: any): TbPopoverComponent { + injector?: Injector, context?: any, overlayStyle: any = {}, popoverStyle: any = {}, style?: any): TbPopoverComponent { const componentRef = hostView.createComponent(this.componentFactory); const component = componentRef.instance; this.popoverWithTriggers.push({ @@ -329,6 +329,7 @@ export class TbPopoverService { component.tbComponentFactory = this.resolver.resolveComponentFactory(componentType); component.tbComponentInjector = injector; component.tbComponentContext = context; + component.tbOverlayStyle = overlayStyle; component.tbPopoverInnerStyle = popoverStyle; component.tbComponentStyle = style; component.tbHideOnClickOutside = hideOnClickOutside; @@ -474,7 +475,7 @@ export class TbPopoverService {