Commit 9d5128de authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Remove missing warnings

parent a0ba31d2
......@@ -151,23 +151,6 @@
<h6 class="border-bottom border-gray pb-2">Warnings</h6>
<div *ngIf="isGeneratingWarnings" class="alert alert-info mb-0">Loading warnings</div>
<ngb-accordion *ngIf="!isGeneratingWarnings">
<ngb-panel title="Missing Warnings">
<ng-template ngbPanelContent>
<div *ngIf="missingWarnings.length === 0" class="alert alert-success">
There are no warnings about missing situational factors
</div>
<ul *ngIf="missingWarnings.length > 0">
<li *ngFor="let warning of missingWarnings">
{{warning.elementName}} <a [routerLink]="[]"
(click)="selectElement(warning.elementId)">{{warning.name}}</a>
is missing the following factors
<ul>
<li *ngFor="let factor of warning.situationalFactors">{{factor}}</li>
</ul>
</li>
</ul>
</ng-template>
</ngb-panel>
<ngb-panel title="Low value Warnings">
<ng-template ngbPanelContent>
<div *ngIf="lowWarnings.length === 0" class="alert alert-success">
......
......@@ -38,7 +38,6 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
validDevelopmentMethods: DevelopmentMethod[] = null;
missingWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
lowWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
incorrectWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
isGeneratingWarnings = false;
......@@ -263,21 +262,12 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
}
this.isGeneratingWarnings = true;
const missingWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
const lowWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
const incorrectWarnings: { elementName: string, name: string, elementId: string, situationalFactors: string[] }[] = [];
const generateWarnings = (id: string, elementName: 'Method' | 'Pattern', name: string, factors: SituationalFactor[]) => {
const factorMap = SituationalFactor.createMap(factors);
const {missing, low, incorrect} = this.bmProcess.checkMatch(factorMap);
if (missing.length > 0) {
missingWarnings.push({
elementName,
name,
elementId: id,
situationalFactors: missing,
});
}
const {low, incorrect} = this.bmProcess.checkMatch(factorMap);
if (low.length > 0) {
lowWarnings.push({
elementName,
......@@ -320,7 +310,6 @@ export class BmProcessDiagramComponent implements DiagramComponentInterface, OnI
(patternElement) => generatePatternWarnings(patternElement, dbPatternsMap[patternElement.businessObject.get('processPatternId')])
);
if (!this.wantsToGenerateWarnings) {
this.missingWarnings = missingWarnings;
this.lowWarnings = lowWarnings;
this.incorrectWarnings = incorrectWarnings;
}
......
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