diff --git a/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.html b/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.html index e8933a5b8..83ac5b361 100644 --- a/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.html +++ b/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.html @@ -27,97 +27,83 @@

View diagrams

/> search - {{ filteredDiagrams.length }} diagram(s) found: - -
-
- - -
- error
- Diagram export has failed.
Please contact your diagram cache - administrator. -
-
- error
- Error loading the diagram from the server.
Please try again later. -
- If the problem persists, please contact your diagram cache - administrator. -
-
-
-
{{ diagram.name }}
-
UUID: {{ diagram.uuid }}
-
-
- -
-
-
- -
-
+ + @if (this.diagramMetadata?.diagrams?.length === 0) { Your model doesn't seem to contain diagrams. -
-
+ } @else if (filteredDiagrams === undefined) { +
+ @for (_ of loaderArray; track $index) { + + } +
+ } @else if (filteredDiagrams.length === 0) { No diagrams for the given filter found. Please remove your search query. -
+ } @else { + {{ filteredDiagrams.length }} diagram(s) found: +
+ @for (diagram of filteredDiagrams; track diagram.uuid) { +
+ @if (diagram.success) { + @if (!diagrams[diagram.uuid] || diagrams[diagram.uuid].loading) { + + } @else if (diagrams[diagram.uuid].content) { + + } + } @else { +
+ error
+ Diagram export has failed.
+ Please contact your diagram cache administrator. +
+ } + +
+
+
{{ diagram.name }}
+
UUID: {{ diagram.uuid }}
+
+
+ +
+ } +
+ } +
diff --git a/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.ts b/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.ts index bd90dca95..abe850209 100644 --- a/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.ts +++ b/frontend/src/app/projects/models/diagrams/model-diagram-dialog/model-diagram-dialog.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { NgIf, NgFor, DatePipe } from '@angular/common'; +import { DatePipe } from '@angular/common'; import { Component, Inject, @@ -57,8 +57,6 @@ import { ModelDiagramCodeBlockComponent } from './model-diagram-code-block/model FormsModule, MatIcon, MatSuffix, - NgIf, - NgFor, MatTooltip, NgxSkeletonLoaderModule, MatButton,