From 5ea6626e472f7cc23dc8fecb4476c53c878b9819 Mon Sep 17 00:00:00 2001 From: targetoee Date: Tue, 12 Dec 2023 19:53:22 +0800 Subject: [PATCH] add Accept-Encoding when fetch application list --- src/app/services/scheduler/scheduler.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/services/scheduler/scheduler.service.ts b/src/app/services/scheduler/scheduler.service.ts index 3d14f91b..6c823c21 100644 --- a/src/app/services/scheduler/scheduler.service.ts +++ b/src/app/services/scheduler/scheduler.service.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import {HttpClient} from '@angular/common/http'; +import {HttpClient, HttpHeaders} from '@angular/common/http'; import {Injectable} from '@angular/core'; import {AllocationInfo} from '@app/models/alloc-info.model'; import {AppInfo} from '@app/models/app-info.model'; @@ -82,8 +82,10 @@ export class SchedulerService { fetchAppList(partitionName: string, queueName: string): Observable { const appsUrl = `${this.envConfig.getSchedulerWebAddress()}/ws/v1/partition/${partitionName}/queue/${queueName}/applications`; + const headers = new HttpHeaders(); + headers.set('Accept-Encoding', 'gzip') - return this.httpClient.get(appsUrl).pipe( + return this.httpClient.get(appsUrl, {headers}).pipe( map((data: any) => { const result: AppInfo[] = [];