From 73ae4b3c666d3bc257276a5354dacd5d0df2ee72 Mon Sep 17 00:00:00 2001 From: Chantsova Ekaterina Date: Mon, 2 Sep 2024 12:24:58 +0300 Subject: [PATCH] UI: Image service - change parameters order to keep backward compatibility with older version --- ui-ngx/src/app/core/http/image.service.ts | 4 ++-- .../app/shared/components/image/image-gallery.component.ts | 2 +- ui-ngx/src/app/shared/components/image/images-datasource.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/core/http/image.service.ts b/ui-ngx/src/app/core/http/image.service.ts index 68c128028f..835e8ffb61 100644 --- a/ui-ngx/src/app/core/http/image.service.ts +++ b/ui-ngx/src/app/core/http/image.service.ts @@ -87,8 +87,8 @@ export class ImageService { imageInfo, defaultHttpOptionsFromConfig(config)); } - public getImages(pageLink: PageLink, imageSubType: ResourceSubType = ResourceSubType.IMAGE, - includeSystemImages = false, config?: RequestConfig): Observable> { + public getImages(pageLink: PageLink, includeSystemImages = false, + imageSubType: ResourceSubType = ResourceSubType.IMAGE, config?: RequestConfig): Observable> { return this.http.get>( `${IMAGES_URL_PREFIX}${pageLink.toQuery()}&imageSubType=${imageSubType}&includeSystemImages=${includeSystemImages}`, defaultHttpOptionsFromConfig(config)); diff --git a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts index 5b50282ea7..23f489d78c 100644 --- a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts +++ b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts @@ -205,7 +205,7 @@ export class ImageGalleryComponent extends PageComponent implements OnInit, OnDe property: 'createdTime', direction: Direction.DESC }); - return this.imageService.getImages(pageLink, this.imageSubType, filter.includeSystemImages); + return this.imageService.getImages(pageLink, filter.includeSystemImages, this.imageSubType); }; } diff --git a/ui-ngx/src/app/shared/components/image/images-datasource.ts b/ui-ngx/src/app/shared/components/image/images-datasource.ts index 3a46508d45..78f02df4b1 100644 --- a/ui-ngx/src/app/shared/components/image/images-datasource.ts +++ b/ui-ngx/src/app/shared/components/image/images-datasource.ts @@ -84,7 +84,7 @@ export class ImagesDatasource implements DataSource { } fetchEntities(pageLink: PageLink, imageSubType: ResourceSubType, includeSystemImages = false): Observable> { - return this.imageService.getImages(pageLink, imageSubType, includeSystemImages); + return this.imageService.getImages(pageLink, includeSystemImages, imageSubType); } isAllSelected(): Observable {