This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new f4230691b2 Fix loading bar import (#3140)
f4230691b2 is described below
commit f4230691b2041cb8e2f5836239a9592cf6fab1b3
Author: Dominik Riemer <[email protected]>
AuthorDate: Wed Aug 14 10:32:44 2024 +0200
Fix loading bar import (#3140)
---
.../src/lib/apis/pipeline-monitoring.service.ts | 13 +++++--------
ui/src/app/pipeline-details/pipeline-details.component.ts | 4 ++++
2 files changed, 9 insertions(+), 8 deletions(-)
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<Record<string, SpLogEntry[]>> {
return this.http
- .get(this.logUrl(pipelineId))
+ .get(this.logUrl(pipelineId), { context })
.pipe(map(response => response as Record<string, SpLogEntry[]>));
}
getMetricsInfoForPipeline(
pipelineId: string,
forceUpdate = false,
+ context?: HttpContext,
): Observable<Record<string, SpMetricsEntry>> {
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<string, SpMetricsEntry>));
}
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<Record<string, SpLogEntry[]>> {
return this.pipelineMonitoringService.getLogInfoForPipeline(
this.currentPipelineId,
+ new HttpContext().set(NGX_LOADING_BAR_IGNORED, true),
);
}