From: Stephan Müller Date: Wed, 20 Feb 2019 11:26:44 +0000 (+0100) Subject: mgr/dashboard: Fixes tooltip behavior X-Git-Tag: v15.0.0~70^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27153%2Fhead;p=ceph.git mgr/dashboard: Fixes tooltip behavior 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 --- 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 29c168415e81..938449dde251 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';