From 01ba1ea33703a7fc4981c88d778be39c0f39d8c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Wed, 20 Feb 2019 12:26:44 +0100 Subject: [PATCH] mgr/dashboard: Fixes tooltip behavior MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The problem was that the tool tip element was added to the current parent element which caused the CSS to make the last button in a button group look like the fore last button as a rectangle but the last element should have a rounded corner. Fixes: https://tracker.ceph.com/issues/38932 Signed-off-by: Stephan Müller (cherry picked from commit 4b23b78) --- .../mgr/dashboard/frontend/src/app/app.component.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/app.component.ts index 29c168415e81f..938449dde251b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app.component.ts @@ -2,13 +2,23 @@ import { Component, ViewContainerRef } from '@angular/core'; import { Router } from '@angular/router'; import { ToastsManager } from 'ng2-toastr'; +import { TooltipConfig } from 'ngx-bootstrap/tooltip'; import { AuthStorageService } from './shared/services/auth-storage.service'; @Component({ selector: 'cd-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], + providers: [ + { + provide: TooltipConfig, + useFactory: (): TooltipConfig => + Object.assign(new TooltipConfig(), { + container: 'body' + }) + } + ] }) export class AppComponent { title = 'cd'; -- 2.39.5