This is an automated email from the ASF dual-hosted git repository.
zehnder 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 cff6242080 3861 Undefined Roots do not show an error message (#3871)
cff6242080 is described below
commit cff62420800b1c12627a90b6529e56d6fb8b751b
Author: Jacqueline Höllig <[email protected]>
AuthorDate: Thu Oct 23 13:50:07 2025 +0200
3861 Undefined Roots do not show an error message (#3871)
---
ui/deployment/i18n/de.json | 4 +-
.../abstract-adapter-details.directive.ts | 22 ++-
.../adapter-details-code.component.html | 26 +--
.../adapter-details-data.component.html | 55 ++++---
.../adapter-details-logs.component.html | 22 ++-
.../adapter-details-metrics.component.html | 26 +--
.../panel/dashboard-panel.component.html | 177 ++++++++++++---------
.../components/panel/dashboard-panel.component.ts | 12 +-
.../data-explorer-chart-view.component.html | 94 ++++++-----
.../data-explorer-chart-view.component.ts | 47 ++++--
.../pipeline-details.component.html | 6 +
.../pipeline-details/pipeline-details.component.ts | 6 +-
12 files changed, 302 insertions(+), 195 deletions(-)
diff --git a/ui/deployment/i18n/de.json b/ui/deployment/i18n/de.json
index 69a865b671..49ca5da77b 100644
--- a/ui/deployment/i18n/de.json
+++ b/ui/deployment/i18n/de.json
@@ -737,9 +737,9 @@
"Error in line {{rowNumber}}. Value for \"{{property}}\" is not supported.":
"Fehler in Zeile {{rowNumber}}. Wert für \"{{property}}\" wird nicht
unterstützt.",
"Error in line {{rowNumber}}. Value for \"{{property}}\" is not set.":
"Fehler in Zeile {{rowNumber}}. Wert für \"{{property}}\" ist nicht gesetzt.",
"Resources": "Ressourcen",
- "Updating adapter {{adapterName}}": "Aktualisieren des Adapters
{{AdapterName}}",
+ "Updating adapter {{adapterName}}": "Aktualisieren des Adapters
{{adapterName}}",
"Creating adapter {{adapterName}}": "Adapter erstellen {{adapterName}}",
- "Starting adapter {{adapterName}}": "Adapter starten {{AdapterName}}",
+ "Starting adapter {{adapterName}}": "Adapter starten {{adapterName}}",
"Your Assets were successfully added.": "Assets erfolgreich hinzugefügt.",
"Your Assets were successfully deleted.": "Assets erfolgreich gelöscht.",
"Edit adapter: ": "Adapter bearbeiten:",
diff --git
a/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
b/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
index 1298c1dea9..2e14917665 100644
---
a/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
+++
b/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
@@ -29,12 +29,14 @@ import {
} from '@streampipes/shared-ui';
import { SpAdapterDetailsTabs } from './adapter-details-tabs';
import { Directive } from '@angular/core';
+import { catchError, of } from 'rxjs';
@Directive()
export abstract class SpAbstractAdapterDetailsDirective {
currentAdapterId: string;
tabs: SpNavigationItem[] = [];
adapter: AdapterDescription;
+ adapterNotFound = false;
constructor(
protected currentUserService: CurrentUserService,
@@ -56,10 +58,22 @@ export abstract class SpAbstractAdapterDetailsDirective {
}
loadAdapter(): void {
- this.adapterService.getAdapter(this.currentAdapterId).subscribe(res =>
{
- this.adapter = res;
- this.onAdapterLoaded();
- });
+ this.adapterService
+ .getAdapter(this.currentAdapterId)
+ .pipe(
+ catchError(() => {
+ this.adapterNotFound = true;
+ return of(null);
+ }),
+ )
+ .subscribe(res => {
+ if (!res) {
+ return;
+ }
+
+ this.adapter = res;
+ this.onAdapterLoaded();
+ });
}
triggerUpdate(): void {
diff --git
a/ui/src/app/connect/components/adapter-details/adapter-details-code/adapter-details-code.component.html
b/ui/src/app/connect/components/adapter-details/adapter-details-code/adapter-details-code.component.html
index 19d6644f36..c433c0f408 100644
---
a/ui/src/app/connect/components/adapter-details/adapter-details-code/adapter-details-code.component.html
+++
b/ui/src/app/connect/components/adapter-details/adapter-details-code/adapter-details-code.component.html
@@ -23,16 +23,22 @@
[backLinkTarget]="['connect']"
>
<div fxLayout="column">
- @if (adapter) {
- <div fxLayout="column">
- <sp-basic-header-title-component
- [title]="adapter.name + ' - ' + 'Data' | translate"
- ></sp-basic-header-title-component>
- <sp-adapter-code-panel
- [adapterDescription]="adapter"
- maxHeight="none"
- ></sp-adapter-code-panel>
- </div>
+ @if (adapterNotFound) {
+ <sp-warning-box>
+ {{ 'The desired adapter was not found!' | translate }}
+ </sp-warning-box>
+ } @else {
+ @if (adapter) {
+ <div fxLayout="column">
+ <sp-basic-header-title-component
+ [title]="adapter.name + ' - ' + 'Data' | translate"
+ ></sp-basic-header-title-component>
+ <sp-adapter-code-panel
+ [adapterDescription]="adapter"
+ maxHeight="none"
+ ></sp-adapter-code-panel>
+ </div>
+ }
}
</div>
</sp-basic-nav-tabs>
diff --git
a/ui/src/app/connect/components/adapter-details/adapter-details-data/adapter-details-data.component.html
b/ui/src/app/connect/components/adapter-details/adapter-details-data/adapter-details-data.component.html
index ae3a3a1b6d..e07a86e9b0 100644
---
a/ui/src/app/connect/components/adapter-details/adapter-details-data/adapter-details-data.component.html
+++
b/ui/src/app/connect/components/adapter-details/adapter-details-data/adapter-details-data.component.html
@@ -23,32 +23,39 @@
[backLinkTarget]="['connect']"
>
<div fxLayout="column">
- @if (adapter) {
- <div fxLayout="row">
- <sp-basic-header-title-component
- [title]="adapter.name + ' - Data'"
- ></sp-basic-header-title-component>
- <div fxFlex fxLayoutAlign="end center">
- @if (adapter.running) {
- <div class="adapter-status status-running">
- {{ 'Adapter running' | translate }}
- </div>
- } @else {
- <div class="adapter-status status-stopped">
- {{ 'Adapter stopped' | translate }}
- </div>
- }
+ @if (adapterNotFound) {
+ <sp-warning-box>
+ {{ 'The desired adapter was not found!' | translate }}
+ </sp-warning-box>
+ } @else {
+ @if (adapter) {
+ <div fxLayout="row">
+ <sp-basic-header-title-component
+ [title]="adapter.name + ' - Data'"
+ ></sp-basic-header-title-component>
+ <div fxFlex fxLayoutAlign="end center">
+ @if (adapter.running) {
+ <div class="adapter-status status-running">
+ {{ 'Adapter running' | translate }}
+ </div>
+ } @else {
+ <div class="adapter-status status-stopped">
+ {{ 'Adapter stopped' | translate }}
+ </div>
+ }
+ </div>
</div>
- </div>
- }
+ }
- @if (stream) {
- <div fxLayout="column" fxFlex="100">
- <sp-pipeline-element-runtime-info
- [showTitle]="false"
- [streamDescription]="stream"
- ></sp-pipeline-element-runtime-info>
- </div>
+ @if (stream) {
+ <div fxLayout="column" fxFlex="100">
+ <sp-pipeline-element-runtime-info
+ [showTitle]="false"
+ [streamDescription]="stream"
+ ></sp-pipeline-element-runtime-info>
+ </div>
+ }
}
+ ‚
</div>
</sp-basic-nav-tabs>
diff --git
a/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
index 9010b685dd..887b95c63e 100644
---
a/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
+++
b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
@@ -33,12 +33,18 @@
<i class="material-icons">refresh</i>
</button>
</div>
- <div fxFlex="100" fxLayout="column" *ngIf="adapter">
- <sp-simple-logs
- [elementName]="adapter.name"
- [logs]="adapterLogs"
- fxFlex="100"
- fxLayout="column"
- ></sp-simple-logs>
- </div>
+ @if (adapterNotFound) {
+ <sp-warning-box>
+ {{ 'The desired adapter was not found!' | translate }}
+ </sp-warning-box>
+ } @else {
+ <div fxFlex="100" fxLayout="column" *ngIf="adapter">
+ <sp-simple-logs
+ [elementName]="adapter.name"
+ [logs]="adapterLogs"
+ fxFlex="100"
+ fxLayout="column"
+ ></sp-simple-logs>
+ </div>
+ }
</sp-basic-nav-tabs>
diff --git
a/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
index a247b52eb1..3c95dd4bf2 100644
---
a/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
+++
b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
@@ -33,14 +33,22 @@
<i class="material-icons">refresh</i>
</button>
</div>
- <div fxFlex="100" fxLayout="column" *ngIf="adapter && adapterMetrics">
- <sp-simple-metrics
- [elementName]="adapter.name"
- [lastPublishedLabel]="'Last published message' | translate"
- [statusValueLabel]="'Published messages' | translate"
- [lastTimestamp]="adapterMetrics.lastTimestamp"
- [statusValue]="adapterMetrics.messagesOut.counter"
+ @if (adapterNotFound) {
+ <sp-warning-box>
+ {{
+ 'The desired adapter was not found!' | translate
+ }}</sp-warning-box
>
- </sp-simple-metrics>
- </div>
+ } @else {
+ <div fxFlex="100" fxLayout="column" *ngIf="adapter && adapterMetrics">
+ <sp-simple-metrics
+ [elementName]="adapter.name"
+ [lastPublishedLabel]="'Last published message' | translate"
+ [statusValueLabel]="'Published messages' | translate"
+ [lastTimestamp]="adapterMetrics.lastTimestamp"
+ [statusValue]="adapterMetrics.messagesOut.counter"
+ >
+ </sp-simple-metrics>
+ </div>
+ }
</sp-basic-nav-tabs>
diff --git
a/ui/src/app/dashboard/components/panel/dashboard-panel.component.html
b/ui/src/app/dashboard/components/panel/dashboard-panel.component.html
index e8000f0584..fca9b6789c 100644
--- a/ui/src/app/dashboard/components/panel/dashboard-panel.component.html
+++ b/ui/src/app/dashboard/components/panel/dashboard-panel.component.html
@@ -19,7 +19,7 @@
<sp-basic-view
[backLinkTarget]="['dashboard']"
[showBackLink]="true"
- *ngIf="dashboardLoaded"
+ *ngIf="dashboardLoaded || dashboardNotFound"
>
<div
nav
@@ -28,86 +28,109 @@
fxLayout="row"
fxLayoutAlign="start center"
>
- <sp-dashboard-toolbar
- fxFlex="100"
- [dashboard]="dashboard"
- [editMode]="editMode"
- [(viewMode)]="viewMode"
- [hasDataExplorerWritePrivileges]="hasDataExplorerWritePrivileges"
- [timeRangeVisible]="timeRangeVisible"
- [timeSettings]="timeSettings"
- (saveDashboardEmitter)="persistDashboardChanges()"
- (discardDashboardEmitter)="discardChanges()"
- (deleteDashboardEmitter)="deleteDashboard()"
- (triggerEditModeEmitter)="triggerEditMode()"
- (updateDateRangeEmitter)="updateDateRange($event)"
- (intervalSettingsChangedEmitter)="modifyRefreshInterval($event)"
- >
- </sp-dashboard-toolbar>
+ @if (!dashboardNotFound) {
+ <sp-dashboard-toolbar
+ fxFlex="100"
+ [dashboard]="dashboard"
+ [editMode]="editMode"
+ [(viewMode)]="viewMode"
+ [hasDataExplorerWritePrivileges]="
+ hasDataExplorerWritePrivileges
+ "
+ [timeRangeVisible]="timeRangeVisible"
+ [timeSettings]="timeSettings"
+ (saveDashboardEmitter)="persistDashboardChanges()"
+ (discardDashboardEmitter)="discardChanges()"
+ (deleteDashboardEmitter)="deleteDashboard()"
+ (triggerEditModeEmitter)="triggerEditMode()"
+ (updateDateRangeEmitter)="updateDateRange($event)"
+
(intervalSettingsChangedEmitter)="modifyRefreshInterval($event)"
+ >
+ </sp-dashboard-toolbar>
+ }
</div>
<div fxFlex="100" fxLayout="column">
- <mat-drawer-container
- class="designer-panel-container h-100 dashboard-grid"
- >
- <mat-drawer
- [opened]="editMode"
- mode="side"
- position="end"
- class="designer-panel"
+ @if (dashboardNotFound) {
+ <div
+ *ngIf="dashboardNotFound"
+ fxFlex="100"
+ fxLayout="column"
+ fxLayoutAlign="center center"
+ data-cy="dashboard-not-found"
>
- <div fxLayout="column" fxFlex="100">
- @if (editMode) {
- <sp-dashboard-chart-selection-panel
- (addChartEmitter)="addChartToDashboard($event)"
- fxFlex="100"
- >
- </sp-dashboard-chart-selection-panel>
- }
- </div>
- </mat-drawer>
- <mat-drawer-content class="h-100 dashboard-grid">
- <div
- *ngIf="dashboard.widgets.length === 0"
- fxFlex="100"
- fxLayout="column"
- fxLayoutAlign="center center"
- data-cy="empty-dashboard"
- >
- <h4>
- {{
- "This dashboard is empty and doesn't contain any
charts."
- | translate
- }}
- </h4>
- </div>
- <sp-dashboard-grid-view
- #dashboardGrid
- *ngIf="dashboard.widgets.length > 0 && viewMode === 'grid'"
- [editMode]="editMode"
- [dashboard]="dashboard"
- [widgets]="widgets"
- [observableGenerator]="observableGenerator"
- [timeSettings]="timeSettings"
- (deleteCallback)="removeChartFromDashboard($event)"
- (startEditModeEmitter)="startEditMode($event)"
- class="h-100 dashboard-grid"
- >
- </sp-dashboard-grid-view>
- <sp-dashboard-slide-view
- class="h-100 dashboard-grid"
- #dashboardSlide
- [editMode]="editMode"
- [dashboard]="dashboard"
- [widgets]="widgets"
- [observableGenerator]="observableGenerator"
- [timeSettings]="timeSettings"
- (deleteCallback)="removeChartFromDashboard($event)"
- (startEditModeEmitter)="startEditMode($event)"
- *ngIf="dashboard.widgets.length > 0 && viewMode ===
'slide'"
+ <h4>
+ {{ 'The desired dashboard was not found!' | translate }}
+ </h4>
+ </div>
+ } @else {
+ <mat-drawer-container
+ class="designer-panel-container h-100 dashboard-grid"
+ >
+ <mat-drawer
+ [opened]="editMode"
+ mode="side"
+ position="end"
+ class="designer-panel"
>
- </sp-dashboard-slide-view>
- </mat-drawer-content>
- </mat-drawer-container>
+ <div fxLayout="column" fxFlex="100">
+ @if (editMode) {
+ <sp-dashboard-chart-selection-panel
+ (addChartEmitter)="addChartToDashboard($event)"
+ fxFlex="100"
+ >
+ </sp-dashboard-chart-selection-panel>
+ }
+ </div>
+ </mat-drawer>
+ <mat-drawer-content class="h-100 dashboard-grid">
+ <div
+ *ngIf="dashboard.widgets.length === 0"
+ fxFlex="100"
+ fxLayout="column"
+ fxLayoutAlign="center center"
+ data-cy="empty-dashboard"
+ >
+ <h4>
+ {{
+ "This dashboard is empty and doesn't contain
any charts."
+ | translate
+ }}
+ </h4>
+ </div>
+
+ <sp-dashboard-grid-view
+ #dashboardGrid
+ *ngIf="
+ dashboard.widgets.length > 0 && viewMode === 'grid'
+ "
+ [editMode]="editMode"
+ [dashboard]="dashboard"
+ [widgets]="widgets"
+ [observableGenerator]="observableGenerator"
+ [timeSettings]="timeSettings"
+ (deleteCallback)="removeChartFromDashboard($event)"
+ (startEditModeEmitter)="startEditMode($event)"
+ class="h-100 dashboard-grid"
+ >
+ </sp-dashboard-grid-view>
+ <sp-dashboard-slide-view
+ class="h-100 dashboard-grid"
+ #dashboardSlide
+ [editMode]="editMode"
+ [dashboard]="dashboard"
+ [widgets]="widgets"
+ [observableGenerator]="observableGenerator"
+ [timeSettings]="timeSettings"
+ (deleteCallback)="removeChartFromDashboard($event)"
+ (startEditModeEmitter)="startEditMode($event)"
+ *ngIf="
+ dashboard.widgets.length > 0 && viewMode ===
'slide'
+ "
+ >
+ </sp-dashboard-slide-view>
+ </mat-drawer-content>
+ </mat-drawer-container>
+ }
</div>
</sp-basic-view>
diff --git a/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
b/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
index d56e0f2f9d..0946164609 100644
--- a/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
+++ b/ui/src/app/dashboard/components/panel/dashboard-panel.component.ts
@@ -44,7 +44,7 @@ import {
TimeSelectionService,
} from '@streampipes/shared-ui';
import { MatDialog } from '@angular/material/dialog';
-import { map, switchMap } from 'rxjs/operators';
+import { catchError, map, switchMap } from 'rxjs/operators';
import { SpDashboardRoutes } from '../../dashboard.routes';
import { DataExplorerRoutingService } from
'../../../data-explorer-shared/services/data-explorer-routing.service';
import { DataExplorerDetectChangesService } from
'../../../data-explorer/services/data-explorer-detect-changes.service';
@@ -66,6 +66,7 @@ export class DashboardPanelComponent
originalDashboard: Dashboard;
dashboard: Dashboard;
widgets: DataExplorerWidgetModel[] = [];
+ dashboardNotFound = false;
/**
* This is the date range (start, end) to view the data and is set in
data-explorer.ts
@@ -217,7 +218,16 @@ export class DashboardPanelComponent
getDashboard(dashboardId: string, startTime: number, endTime: number) {
this.dashboardService
.getCompositeDashboard(dashboardId)
+ .pipe(
+ catchError(() => {
+ this.dashboardNotFound = true;
+ return of(null);
+ }),
+ )
.subscribe(resp => {
+ if (!resp) {
+ return;
+ }
if (resp.ok) {
const compositeDashboard = resp.body;
compositeDashboard.dashboard.widgets.forEach(w => {
diff --git
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.html
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.html
index 09317421bc..8eeb4b6c95 100644
---
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.html
+++
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.html
@@ -42,53 +42,59 @@
</sp-data-explorer-data-view-toolbar>
</div>
<div fxFlex="100" fxLayout="column">
- <mat-drawer-container
- class="designer-panel-container h-100 dashboard-grid"
- >
- <mat-drawer
- [opened]="editMode"
- [style.width.px]="drawerWidth"
- mode="side"
- position="end"
- class="designer-panel"
+ @if (chartNotFound) {
+ <sp-warning-box>
+ {{ 'The desired chart was not found!' | translate }}
+ </sp-warning-box>
+ } @else {
+ <mat-drawer-container
+ class="designer-panel-container h-100 dashboard-grid"
>
- <sp-sidebar-resize
- [minWidth]="450"
- [maxWidth]="1000"
- (widthChanged)="onWidthChanged($event)"
+ <mat-drawer
+ [opened]="editMode"
+ [style.width.px]="drawerWidth"
+ mode="side"
+ position="end"
+ class="designer-panel"
>
- <div fxLayout="column" fxFlex="100">
- <sp-data-explorer-designer-panel
- [currentlyConfiguredWidget]="dataView"
- [dataLakeMeasure]="dataLakeMeasure"
- fxFlex="100"
+ <sp-sidebar-resize
+ [minWidth]="450"
+ [maxWidth]="1000"
+ (widthChanged)="onWidthChanged($event)"
+ >
+ <div fxLayout="column" fxFlex="100">
+ <sp-data-explorer-designer-panel
+ [currentlyConfiguredWidget]="dataView"
+ [dataLakeMeasure]="dataLakeMeasure"
+ fxFlex="100"
+ >
+ </sp-data-explorer-designer-panel>
+ </div>
+ </sp-sidebar-resize>
+ </mat-drawer>
+ <mat-drawer-content class="h-100 dashboard-grid">
+ <div #panel fxFlex="100" fxLayout="column">
+ <sp-data-explorer-chart-container
+ *ngIf="
+ dataView &&
+ gridsterItemComponent &&
+ dataView.dataConfig?.sourceConfigs?.length > 0
+ "
+ [dataViewMode]="true"
+ [editMode]="editMode"
+ [configuredWidget]="dataView"
+ [gridsterItemComponent]="gridsterItemComponent"
+ [timeSettings]="timeSettings"
+ [observableGenerator]="observableGenerator"
+ [dataLakeMeasure]="
+ dataView.dataConfig.sourceConfigs[0].measure
+ "
+ (startEditModeEmitter)="editDataView()"
>
- </sp-data-explorer-designer-panel>
+ </sp-data-explorer-chart-container>
</div>
- </sp-sidebar-resize>
- </mat-drawer>
- <mat-drawer-content class="h-100 dashboard-grid">
- <div #panel fxFlex="100" fxLayout="column">
- <sp-data-explorer-chart-container
- *ngIf="
- dataView &&
- gridsterItemComponent &&
- dataView.dataConfig?.sourceConfigs?.length > 0
- "
- [dataViewMode]="true"
- [editMode]="editMode"
- [configuredWidget]="dataView"
- [gridsterItemComponent]="gridsterItemComponent"
- [timeSettings]="timeSettings"
- [observableGenerator]="observableGenerator"
- [dataLakeMeasure]="
- dataView.dataConfig.sourceConfigs[0].measure
- "
- (startEditModeEmitter)="editDataView()"
- >
- </sp-data-explorer-chart-container>
- </div>
- </mat-drawer-content>
- </mat-drawer-container>
+ </mat-drawer-content>
+ </mat-drawer-container>
+ }
</div>
</sp-basic-view>
diff --git
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
index f1328a847a..4935fab6c6 100644
---
a/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
+++
b/ui/src/app/data-explorer/components/chart-view/data-explorer-chart-view.component.ts
@@ -50,7 +50,7 @@ import { DataExplorerDetectChangesService } from
'../../services/data-explorer-d
import { SupportsUnsavedChangeDialog } from
'../../../data-explorer-shared/models/dataview-dashboard.model';
import { Observable, of } from 'rxjs';
import { MatDialog } from '@angular/material/dialog';
-import { map } from 'rxjs/operators';
+import { catchError, map } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { ResizeEchartsService } from
'../../../data-explorer-shared/services/resize-echarts.service';
import { AssetDialogComponent } from '../../dialog/asset-dialog.component';
@@ -94,6 +94,8 @@ export class DataExplorerChartViewComponent
private assetSaveService = inject(AssetSaveService);
+ chartNotFound = false;
+
observableGenerator =
this.dataExplorerSharedService.defaultObservableGenerator();
@@ -114,21 +116,36 @@ export class DataExplorerChartViewComponent
loadDataView(dataViewId: string): void {
this.dataViewLoaded = false;
- this.dataViewService.getChart(dataViewId).subscribe(res => {
- this.dataView = res;
- this.originalDataView = JSON.parse(JSON.stringify(this.dataView));
- if (!this.dataView.timeSettings?.startTime) {
- this.timeSettings = this.makeDefaultTimeSettings();
- } else {
- this.timeSelectionService.updateTimeSettings(
- this.timeSelectionService.defaultQuickTimeSelections,
- this.dataView.timeSettings as TimeSettings,
- new Date(),
+ this.dataViewService
+ .getChart(dataViewId)
+ .pipe(
+ catchError(() => {
+ this.chartNotFound = true;
+ return of(null);
+ }),
+ )
+ .subscribe(res => {
+ if (!res) {
+ this.dataViewLoaded = true;
+ return;
+ }
+ this.dataView = res;
+ this.originalDataView = JSON.parse(
+ JSON.stringify(this.dataView),
);
- this.timeSettings = this.dataView.timeSettings as TimeSettings;
- }
- this.afterDataViewLoaded();
- });
+ if (!this.dataView.timeSettings?.startTime) {
+ this.timeSettings = this.makeDefaultTimeSettings();
+ } else {
+ this.timeSelectionService.updateTimeSettings(
+ this.timeSelectionService.defaultQuickTimeSelections,
+ this.dataView.timeSettings as TimeSettings,
+ new Date(),
+ );
+ this.timeSettings = this.dataView
+ .timeSettings as TimeSettings;
+ }
+ this.afterDataViewLoaded();
+ });
}
afterDataViewLoaded(): void {
diff --git a/ui/src/app/pipeline-details/pipeline-details.component.html
b/ui/src/app/pipeline-details/pipeline-details.component.html
index e012942490..e024d3d147 100644
--- a/ui/src/app/pipeline-details/pipeline-details.component.html
+++ b/ui/src/app/pipeline-details/pipeline-details.component.html
@@ -34,6 +34,12 @@
</sp-pipeline-details-toolbar>
</div>
<div fxFlex="100" fxLayout="column">
+ <div *ngIf="pipelineNotFound">
+ <sp-warning-box color="primary">{{
+ 'The desired pipeline was not found!' | translate
+ }}</sp-warning-box>
+ </div>
+
<sp-pipeline-preview
#pipelinePreviewComponent
[metricsInfo]="metricsInfo"
diff --git a/ui/src/app/pipeline-details/pipeline-details.component.ts
b/ui/src/app/pipeline-details/pipeline-details.component.ts
index e0004ac452..d34241d847 100644
--- a/ui/src/app/pipeline-details/pipeline-details.component.ts
+++ b/ui/src/app/pipeline-details/pipeline-details.component.ts
@@ -64,6 +64,7 @@ export class SpPipelineDetailsComponent implements OnInit,
OnDestroy {
metricsInfo: Record<string, SpMetricsEntry> = {};
logInfo: Record<string, SpLogEntry[]> = {};
previewModeActive = false;
+ pipelineNotFound = false;
currentUserSub: Subscription;
autoRefreshSub: Subscription;
@@ -101,7 +102,10 @@ export class SpPipelineDetailsComponent implements OnInit,
OnDestroy {
this.pipelineCanvasService
.getPipelineCanvasMetadata(this.currentPipelineId)
.pipe(
- catchError(() => {
+ catchError(error => {
+ this.pipelineAvailable = false;
+ this.pipelineNotFound = true;
+
return of(new PipelineCanvasMetadata());
}),
),