Commit bbb22380 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Fix checkWarnings

parent c8166e3d
......@@ -162,8 +162,11 @@
<div class="my-3 p-3 bg-white rounded shadow-sm">
<h6 class="border-bottom border-gray pb-2">Warnings</h6>
<div *ngIf="warnings.length === 0" class="alert alert-success mb-0">There are no warnings</div>
<ul>
<div *ngIf="warnings.length === 0 && !isGeneratingWarnings" class="alert alert-success mb-0">
There are no warnings
</div>
<div *ngIf="isGeneratingWarnings" class="alert alert-info mb-0">Loading warnings</div>
<ul *ngIf="warnings.length > 0">
<li *ngFor="let warning of warnings">{{warning}}</li>
</ul>
</div>
......
......@@ -3,7 +3,8 @@ import {
Component,
ElementRef,
EventEmitter,
Input, OnChanges,
Input,
OnChanges,
OnDestroy,
OnInit,
Output,
......@@ -41,7 +42,7 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
});
warnings: string[] = [];
private isGeneratingWarnings = false;
isGeneratingWarnings = false;
private wantsToGenerateWarnings = false;
modalElement;
......@@ -243,10 +244,12 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
)
);
Promise.all([methodWarnings, patternWarnings]).then(() => {
this.isGeneratingWarnings = false;
if (!this.wantsToGenerateWarnings) {
this.warnings = warnings;
} else {
}
}).finally(() => {
this.isGeneratingWarnings = false;
if (this.wantsToGenerateWarnings) {
this.wantsToGenerateWarnings = false;
this.checkWarnings();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment