Skip to content
Snippets Groups Projects
Commit da4573fe authored by Till Josef Brinkhus's avatar Till Josef Brinkhus
Browse files
parents 31513b89 43e0534a
No related branches found
No related tags found
No related merge requests found
<div class="container">
<div class="row row mt-5">
<div class="col">
<h2 class="testgen-headline-message" i18n="new-project header">Migration - Übersicht</h2>
<span>Die folgenden Änderungen wurden erkannt und durchgeführt.</span>
<div *ngIf="result">
<div class="alert alert-success" role="alert">
<h5>Automatische Übernahme</h5>
<span *ngFor="let greenResult of result.greenResults">
ActionType: {{greenResult.actionType}} {{greenResult.flowElement.id}} in <b>{{greenResult.flow.name}}</b>
</span>
<div *ngIf="result.greenResults.length == 0">keine Daten</div>
</div>
<div class="alert alert-warning" role="alert">
<h5>Automatische Übernahme, aber Analyse durch Prozessanalysten vorteilhaft</h5>
<span *ngFor="let yellowResult of result.yellowResults">
ActionType: {{yellowResult.actionType}} {{yellowResult.flowElement.id}} in <b>{{yellowResult.flow.name}}</b>
</span>
<div *ngIf="result.yellowResults.length == 0">keine Daten</div>
</div>
<div class="alert alert-danger" role="alert">
<h5>Automatische Übernahme nicht möglich, der Prozessanalyst muss eingreifen</h5>
<span *ngFor="let redResult of result.redResults">
ActionType: {{redResult.actionType}} {{redResult.flowElement.id}} in <b>{{redResult.flow.name}}</b>
</span>
<div *ngIf="result.redResults.length == 0">keine Daten</div>
</div>
</div>
</div>
</div>
</div>
<app-loading *ngIf="isLoading"></app-loading>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MigrationOverviewComponent } from './migration-overview.component';
describe('MigrationOverviewComponent', () => {
let component: MigrationOverviewComponent;
let fixture: ComponentFixture<MigrationOverviewComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MigrationOverviewComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MigrationOverviewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MigrationResultWrapper } from '../models/migration-result-wrapper';
import { MigrationService } from '../services/migration-service';
@Component({
selector: 'app-migration-overview',
templateUrl: './migration-overview.component.html',
styleUrls: ['./migration-overview.component.css']
})
export class MigrationOverviewComponent implements OnInit {
projectId: number;
result: MigrationResultWrapper;
isLoading: boolean;
constructor(private migrationService: MigrationService, private route: ActivatedRoute) {
this.route.params.subscribe(params =>
this.projectId = params['projectId']
)
}
ngOnInit(): void {
this.startMigration();
}
async startMigration() {
this.isLoading = true;
this.result = await this.migrationService.getMigrationResultWrapper(this.projectId);
this.isLoading = false;
console.log(this.result);
}
}
import { BPMNFlow } from "./bpmn-flow";
import { BPMNFlowElement } from "./bpmn-flow-element";
import { MigrationResult } from "./migration-result";
import { MigrationResultWrapper } from "./migration-result-wrapper";
export interface FlowChangeWrapper {
flow: BPMNFlow;
actionType: string;
flowElement: BPMNFlowElement;
migrationResult: MigrationResult;
}
\ No newline at end of file
import { FlowChangeWrapper } from "./flow-change-wrapper";
export interface MigrationResultWrapper {
greenResults: Array<FlowChangeWrapper>;
yellowResults: Array<FlowChangeWrapper>;
redResults: Array<FlowChangeWrapper>;
}
\ No newline at end of file
export interface MigrationResult {
status: string;
priority: number;
}
\ No newline at end of file
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
import { BPMNFlowSet } from '../models/bpmn-flow-set';
import { MigrationResultWrapper } from '../models/migration-result-wrapper';
@Injectable({
providedIn: 'root'
})
export class MigrationService {
constructor(public http: HttpClient) { }
public async getMigrationResultWrapper(projectId: number): Promise<MigrationResultWrapper> {
const url = `${environment.apiBaseUrl}project/${projectId}/migration/changes`;
return <MigrationResultWrapper>await this.http.get(url).toPromise();
}
}
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