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 f82a7a82ca..4fa2c9cc7a 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,16 +46,26 @@ view_compact - - + +
+ + + + + + +
@@ -286,4 +296,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 c7d2367975..ed795e129e 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,6 +54,14 @@ div.tb-dashboard-page { z-index: 13; pointer-events: none; + .db-logo-and-title { + height: $toolbar-height; + .whitelabel-logo-db{ + height: 100%; + width: auto; + } + } + &.tb-dashboard-toolbar-opened { right: 0; // transition: right .3s cubic-bezier(.55, 0, .55, .2); @@ -63,8 +71,9 @@ 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 5b8c7a17dc..2fc5dc98de 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 @@ -189,6 +189,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC currentDashboardScope: DashboardPageScope; addingLayoutCtx: DashboardPageLayoutContext; + + dashboard_logo = 'assets/example_logo.png'; dashboardCtx: DashboardContext = { @@ -480,6 +482,15 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC } } + public showDashboardLogo(): boolean { + if (this.dashboard.configuration.settings && + isDefined(this.dashboard.configuration.settings.showDashboardLogo)) { + return this.dashboard.configuration.settings.showDashboardLogo; + } else { + return true; + } + } + public showRightLayoutSwitch(): boolean { return this.isMobile && this.layouts.right.show; } 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 ede8052c68..89d4510c44 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 @@ -53,6 +53,9 @@
+ + {{ 'dashboard.display-dashboard-showDashboardLogo' | translate }} + {{ 'dashboard.display-dashboards-selection' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts index 36bbe80fa0..195f7e6433 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-settings-dialog.component.ts @@ -79,6 +79,7 @@ export class DashboardSettingsDialogComponent extends DialogComponent -
- -
diff --git a/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw b/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw index b54ce8ea99..0a037e80bb 100644 --- a/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw +++ b/ui-ngx/src/app/modules/home/pages/api-usage/api_usage_json.raw @@ -4413,7 +4413,8 @@ "showDashboardExport": false, "toolbarAlwaysOpen": true, "titleColor": "rgba(0,0,0,0.870588)", - "showFilters": false + "showFilters": false, + "showDashboardLogo": false } }, "name": "Api Usage" diff --git a/ui-ngx/src/app/shared/models/dashboard.models.ts b/ui-ngx/src/app/shared/models/dashboard.models.ts index a92bc3d672..4b9fa0d582 100644 --- a/ui-ngx/src/app/shared/models/dashboard.models.ts +++ b/ui-ngx/src/app/shared/models/dashboard.models.ts @@ -86,6 +86,7 @@ export interface DashboardSettings { showDashboardsSelect?: boolean; showEntitiesSelect?: boolean; showFilters?: boolean; + showDashboardLogo?: boolean; showDashboardTimewindow?: boolean; showDashboardExport?: boolean; toolbarAlwaysOpen?: boolean; diff --git a/ui-ngx/src/assets/example_logo.png b/ui-ngx/src/assets/example_logo.png new file mode 100644 index 0000000000..44cd024561 Binary files /dev/null and b/ui-ngx/src/assets/example_logo.png 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 f5d2990b5e..9d58a0a715 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -725,6 +725,7 @@ "display-filters": "Display filters", "display-dashboard-timewindow": "Display timewindow", "display-dashboard-export": "Display export", + "display-dashboard-showDashboardLogo": "Display dashboard logo", "import": "Import dashboard", "export": "Export dashboard", "export-failed-error": "Unable to export dashboard: {{error}}", diff --git a/ui-ngx/src/assets/white_label_logo.png b/ui-ngx/src/assets/white_label_logo.png deleted file mode 100644 index da558f7b7b..0000000000 Binary files a/ui-ngx/src/assets/white_label_logo.png and /dev/null differ diff --git a/ui-ngx/src/assets/white_label_logo.svg b/ui-ngx/src/assets/white_label_logo.svg deleted file mode 100644 index 706ca443f0..0000000000 --- a/ui-ngx/src/assets/white_label_logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file