diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts index dc336c6d1e..c597578f7f 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts @@ -19,15 +19,10 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; -import { - PipelineMonitoringInfo, - SpLogEntry, - SpMetricsEntry, -} from '../model/gen/streampipes-model'; +import { SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model'; import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; import { AbstractMonitoringService } from './abstract-monitoring.service'; -import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client'; @Injectable({ providedIn: 'root', @@ -42,20 +37,22 @@ export class PipelineMonitoringService extends AbstractMonitoringService { getLogInfoForPipeline( pipelineId: string, + context?: HttpContext, ): Observable> { return this.http - .get(this.logUrl(pipelineId)) + .get(this.logUrl(pipelineId), { context }) .pipe(map(response => response as Record)); } getMetricsInfoForPipeline( pipelineId: string, forceUpdate = false, + context?: HttpContext, ): Observable> { return this.http .get(this.metricsUrl(pipelineId), { params: { forceUpdate }, - context: new HttpContext().set(NGX_LOADING_BAR_IGNORED, true), + context, }) .pipe(map(response => response as Record)); } diff --git a/ui/src/app/pipeline-details/pipeline-details.component.ts b/ui/src/app/pipeline-details/pipeline-details.component.ts index 4887f37aeb..47e419afee 100644 --- a/ui/src/app/pipeline-details/pipeline-details.component.ts +++ b/ui/src/app/pipeline-details/pipeline-details.component.ts @@ -38,6 +38,8 @@ import { UserPrivilege } from '../_enums/user-privilege.enum'; import { forkJoin, interval, Observable, of, Subscription } from 'rxjs'; import { catchError, filter, switchMap } from 'rxjs/operators'; import { PipelinePreviewComponent } from './components/preview/pipeline-preview.component'; +import { HttpContext } from '@angular/common/http'; +import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client'; @Component({ selector: 'sp-pipeline-details-overview-component', @@ -162,12 +164,14 @@ export class SpPipelineDetailsComponent implements OnInit, OnDestroy { return this.pipelineMonitoringService.getMetricsInfoForPipeline( this.currentPipelineId, forceUpdate, + new HttpContext().set(NGX_LOADING_BAR_IGNORED, true), ); } getLogsObservable(): Observable> { return this.pipelineMonitoringService.getLogInfoForPipeline( this.currentPipelineId, + new HttpContext().set(NGX_LOADING_BAR_IGNORED, true), ); }