diff --git a/ui-ngx/src/app/core/http/dashboard.service.ts b/ui-ngx/src/app/core/http/dashboard.service.ts index 15c2501a76..30608a5b75 100644 --- a/ui-ngx/src/app/core/http/dashboard.service.ts +++ b/ui-ngx/src/app/core/http/dashboard.service.ts @@ -60,7 +60,7 @@ export class DashboardService { } public getUserDashboards(userId: string, operation: Operation, - pageLink: PageLink, config?: RequestConfig): Observable> { + pageLink: PageLink, config?: RequestConfig, mobile = false): Observable> { let url = `/api/user/dashboards${pageLink.toQuery()}`; if (userId) { url += `&userId=${userId}`; @@ -68,6 +68,9 @@ export class DashboardService { if (operation) { url += `&operation=${operation}`; } + if (mobile) { + url += `&mobile=true`; + } return this.http.get>(url, defaultHttpOptionsFromConfig(config)); } diff --git a/ui-ngx/src/app/shared/components/dashboard-select.component.ts b/ui-ngx/src/app/shared/components/dashboard-select.component.ts index ea13a3fa4c..1cf971914e 100644 --- a/ui-ngx/src/app/shared/components/dashboard-select.component.ts +++ b/ui-ngx/src/app/shared/components/dashboard-select.component.ts @@ -37,6 +37,7 @@ import { } from './dashboard-select-panel.component'; import { Operation } from '@shared/models/security.models'; import { UtilsService } from '@core/services/utils.service'; +import { MobileService } from '@core/services/mobile.service'; // @dynamic @Component({ @@ -87,6 +88,7 @@ export class DashboardSelectComponent implements ControlValueAccessor, OnInit { constructor(private store: Store, private dashboardService: DashboardService, private utils: UtilsService, + private mobileService: MobileService, private overlay: Overlay, private breakpointObserver: BreakpointObserver, private viewContainerRef: ViewContainerRef, @@ -185,7 +187,8 @@ export class DashboardSelectComponent implements ControlValueAccessor, OnInit { if (this.customerId) { dashboardsObservable = this.dashboardService.getCustomerDashboards(true, this.customerId, pageLink, {ignoreLoading: true}); } else { - dashboardsObservable = this.dashboardService.getUserDashboards(null, this.operation, pageLink, {ignoreLoading: true}); + dashboardsObservable = this.dashboardService.getUserDashboards(null, this.operation, pageLink, {ignoreLoading: true}, + this.mobileService.isMobileApp()); } } return dashboardsObservable;