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 1160acf808..7344a14310 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 @@ -46,26 +46,18 @@ view_compact - -
- - - - - - -
+ + +
@@ -297,4 +289,4 @@ -
\ No newline at end of file + diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.scss b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.scss index ed795e129e..6ace69d312 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.scss +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.scss @@ -54,12 +54,9 @@ div.tb-dashboard-page { z-index: 13; pointer-events: none; - .db-logo-and-title { - height: $toolbar-height; - .whitelabel-logo-db{ - height: 100%; - width: auto; - } + .dashboard_logo{ + height: 75%; + margin-right: 16px; } &.tb-dashboard-toolbar-opened { @@ -71,9 +68,8 @@ div.tb-dashboard-page { right: 18px; transition: right .3s cubic-bezier(.55, 0, .55, .2) .2s; } - + } - } .tb-dashboard-container { &.tb-dashboard-toolbar-opened { &.is-fullscreen { diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index 1b5f16dae6..78bc07c3d0 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -121,8 +121,6 @@ import { DisplayWidgetTypesPanelData, WidgetTypes } from '@home/components/dashboard-page/widget-types-panel.component'; -import { LogoComponent } from '@app/shared/components/logo.component'; -import { concat } from 'lodash'; import { DashboardWidgetSelectComponent } from '@home/components/dashboard-page/dashboard-widget-select.component'; // @dynamic @@ -192,9 +190,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC addingLayoutCtx: DashboardPageLayoutContext; - logo_name_local = 'example_logo.png'; - dashboard_logo = 'assets/' + this.logo_name_local; - + logo = 'assets/logo_title_white.svg'; + dashboardCtx: DashboardContext = { instanceId: this.utils.guid(), getDashboard: () => this.dashboard, @@ -490,15 +487,14 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC isDefined(this.dashboard.configuration.settings.showDashboardLogo)) { return this.dashboard.configuration.settings.showDashboardLogo; } else { - return true; + return false; } } - public updateLogoName(): string { - this.dashboard_logo = 'assets/' + this.dashboard.configuration.settings.logoName - return this.dashboard.configuration.settings.logoName; + public get dashboardLogo(): string { + return this.dashboard.configuration.settings.dashboardLogoUrl || this.logo; } - + public showRightLayoutSwitch(): boolean { return this.isMobile && this.layouts.right.show; } @@ -621,14 +617,9 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC settings: deepClone(this.dashboard.configuration.settings), gridSettings, } - } - ).afterClosed().subscribe((data) => { + }).afterClosed().subscribe((data) => { if (data) { this.dashboard.configuration.settings = data.settings; - if (this.dashboard.configuration.settings) - { - this.updateLogoName(); - } const newGridSettings = data.gridSettings; if (newGridSettings) { const layout = this.dashboard.configuration.states[layoutKeys.state].layouts[layoutKeys.layout]; diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.html index f745a8508d..3a20d146dd 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.html @@ -51,15 +51,9 @@ openOnInput formControlName="titleColor"> - - dashboard.display-dashboard-enterLogoName - - -
- - {{ 'dashboard.display-dashboard-showDashboardLogo' | translate }} - +
{{ 'dashboard.display-dashboards-selection' | translate }} @@ -76,6 +70,13 @@ {{ 'dashboard.display-dashboard-export' | translate }}
+ + {{ 'dashboard.display-dashboard-toolbar-logo' | translate }} + + +
, protected router: Router, @@ -73,7 +69,6 @@ export class DashboardSettingsDialogComponent extends DialogComponent div { - height: $toolbar-height; - .whitelabel-logo-db { - width: auto; - max-width: 100%; - height: 30px; - max-height: 100%; - margin-left: 20px; - margin-top: 5px; - margin-right: 30px; - } - } @media #{$mat-gt-sm} { height: $toolbar-height; diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts index 176375acb3..201f70787a 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.ts @@ -43,6 +43,4 @@ export class DashboardToolbarComponent implements OnInit { this.triggerClick.emit(); } - white_label_logo = 'assets/white_label_logo.png'; - } diff --git a/ui-ngx/src/app/shared/models/dashboard.models.ts b/ui-ngx/src/app/shared/models/dashboard.models.ts index 5e96c31ea0..6a90101923 100644 --- a/ui-ngx/src/app/shared/models/dashboard.models.ts +++ b/ui-ngx/src/app/shared/models/dashboard.models.ts @@ -86,8 +86,8 @@ export interface DashboardSettings { showDashboardsSelect?: boolean; showEntitiesSelect?: boolean; showFilters?: boolean; - showDashboardLogo?: boolean; - logoName?: string; + showDashboardLogo?: boolean; + dashboardLogoUrl?: string; showDashboardTimewindow?: boolean; showDashboardExport?: boolean; toolbarAlwaysOpen?: boolean; diff --git a/ui-ngx/src/assets/example_logo.png b/ui-ngx/src/assets/example_logo.png deleted file mode 100644 index 44cd024561..0000000000 Binary files a/ui-ngx/src/assets/example_logo.png and /dev/null differ diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index cd3741bca8..1f7f733dac 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -725,9 +725,8 @@ "display-filters": "Display filters", "display-dashboard-timewindow": "Display timewindow", "display-dashboard-export": "Display export", - "display-dashboard-showDashboardLogo": "Display dashboard logo", - "display-dashboard-enterLogoName": "Enter logo filename (must be in assets folder)", - "display-dashboard-exampleLogoName": "example_logo.png", + "display-dashboard-toolbar-logo": "Display dashboard logo in fullscreen mode", + "dashboard-logo-image": "Dashboard image logo", "import": "Import dashboard", "export": "Export dashboard", "export-failed-error": "Unable to export dashboard: {{error}}", diff --git a/ui-ngx/src/assets/nasa.png b/ui-ngx/src/assets/nasa.png deleted file mode 100644 index 027407a775..0000000000 Binary files a/ui-ngx/src/assets/nasa.png and /dev/null differ