Skip to content
Snippets Groups Projects
Commit ec1ba649 authored by Till Josef Brinkhus's avatar Till Josef Brinkhus
Browse files

changed migration overview UI and deleted disabled button when both bpmns are equal

parent 918517ca
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@
<div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<span *ngFor="let greenResult of migrationResult.greenResults">
<b>{{greenResult.flow.name}}</b>
<b>{{greenResult.flow.name}} </b>
</span>
<div *ngIf="migrationResult.greenResults.length == 0">No data</div>
</div>
......@@ -51,7 +51,7 @@
<div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<span *ngFor="let yellowResult of migrationResult.yellowResults">
<b>{{yellowResult.flow.name}}</b>
<b>{{yellowResult.flow.name}} </b>
</span>
<div *ngIf="migrationResult.yellowResults.length == 0">No data</div>
</div>
......@@ -70,7 +70,7 @@
<div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">
<span *ngFor="let redResult of migrationResult.redResults">
<b>{{redResult.flow.name}}</b>
<b>{{redResult.flow.name}} </b>
</span>
<div *ngIf="migrationResult.redResults.length == 0">No data</div>
</div>
......
......@@ -31,6 +31,7 @@ export class MigrationOverviewComponent implements OnInit {
this.isLoading = true;
this.migrationResult=this.migrationService.migrationResult;
console.log(this.migrationResult);
this.isLoading = false;
}
......
......@@ -32,7 +32,7 @@
<div class="row">
<div class="col-md-12">
<div class="d-grid gap-2 buttons">
<button class="btn btn-dark" type="button" [disabled]="compareDiagramsDisabled" [routerLink]="['matchingFlows']" i18n="compare bpmn">Compare BPMN-Diagrams</button>
<button class="btn btn-dark" type="button" (click)="permissionForCompareDiagrams()" i18n="compare bpmn">Compare BPMN-Diagrams</button>
<!-- <button class="btn btn-dark" type="button" (click)="callPrio()" i18n="prio bpmn">Test Prioritization</button> -->
<!-- <button class="btn btn-primary" type="button" [routerLink]="['migration']"i18n="migrate bpmn" >Start Migration</button> -->
</div>
......
import { Component, OnInit, ViewChild, ViewChildren } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Router, ActivatedRoute } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { FileService } from 'src/app/services/file.service';
import { ProjectService } from 'src/app/services/project.service';
import { SingleProjectConfig } from 'src/app/models/single-project-config';
import { MigrationService } from 'src/app/services/migration-service';
//import * as BpmnModdle from 'bpmn-moddle';
let BpmnModdle = require('bpmn-moddle').default;
......@@ -30,7 +31,7 @@ export class UpdateProjectComponent implements OnInit {
@ViewChild('backupDiagram') backupDiagram;
@ViewChild('newDiagram') newDiagram;
constructor(private fileService: FileService, private projectService: ProjectService, private route: ActivatedRoute, public http: HttpClient) {
constructor(private migrationService: MigrationService, private fileService: FileService, private projectService: ProjectService, private route: ActivatedRoute, private router: Router, public http: HttpClient) {
this.route.params.subscribe(params =>
this.actualProject = params['projectId']
)
......@@ -146,5 +147,18 @@ export class UpdateProjectComponent implements OnInit {
}
}
permissionForCompareDiagrams(){
if(this.compareDiagramsDisabled){
if(confirm("No changes of BPMN diagrams have been detected. Something changed in DMN files? By clicking 'okay', you'll continue the migration process. If you haven't made any changes of the PDA, please click 'cancel'"))
{
this.router.navigate(['project',this.actualProject,'update','matchingFlows']);
}
}else{
this.router.navigate(['project',this.actualProject,'update','matchingFlows']);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment