Skip to content
Snippets Groups Projects
Commit 3e50820f authored by Florian Lambers's avatar Florian Lambers
Browse files

updated bpmnjsdiffer (again)

parent 8e5a4fb1
No related branches found
No related tags found
No related merge requests found
...@@ -44,15 +44,15 @@ public class FileController { ...@@ -44,15 +44,15 @@ public class FileController {
* # FE2021 * # FE2021
* # Wir benötigt um das neue BPMN-Modell einzulesen * # Wir benötigt um das neue BPMN-Modell einzulesen
*/ */
@RequestMapping(path = "/project/{projectId}/update/bpmn/x", method = RequestMethod.GET) @RequestMapping(path = "/project/{projectId}/backup/bpmn/x", method = RequestMethod.GET)
public String getUpdatedBPMNFlowSet(@PathVariable(required = true) Long projectId) { public String getBackupBPMNFlowSet(@PathVariable(required = true) Long projectId) {
Project projectForId = projectService.getProjectForId(projectId); Project projectForId = projectService.getProjectForId(projectId);
// TODO: Update-Datei, muss noch ins Versionierungskonzept eingearbeitet werden // TODO: Update-Datei, muss noch ins Versionierungskonzept eingearbeitet werden
String rootPath = projectForId.getProjectDirectories().getProjectRootPath(); // D:\Eclipse orkspace\bpmn-testgenerator-tool-master\OnlineSchuhDemo String rootPath = projectForId.getProjectDirectories().getProjectRootPath(); // D:\Eclipse orkspace\bpmn-testgenerator-tool-master\OnlineSchuhDemo
// Hardcoded, die Funktion getBpmnFiles() findet nicht mehrere bpmn dateien sonder nur eine // Hardcoded, die Funktion getBpmnFiles() findet nicht mehrere bpmn dateien sonder nur eine
String bpmnPath = "src\\main\\resources\\test.bpmn"; String bpmnPath = "src\\main\\resources\\backup\\diagram.bpmn";
Path bpmn = Paths.get(rootPath, bpmnPath); Path bpmn = Paths.get(rootPath, bpmnPath);
File bpmnFile = new File(bpmn.toString()); File bpmnFile = new File(bpmn.toString());
String bpmnContent = readFile(bpmnFile); String bpmnContent = readFile(bpmnFile);
......
...@@ -3057,9 +3057,9 @@ ...@@ -3057,9 +3057,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "12.19.3", "version": "12.20.35",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.3.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.35.tgz",
"integrity": "sha512-8Jduo8wvvwDzEVJCOvS/G6sgilOLvvhn1eMmK3TW8/T217O7u1jdrK6ImKLv80tVryaPSVeKu6sjDEiFjd4/eg==", "integrity": "sha512-fsSWQa0FpolfK709jVqkmtMBtrfdRPM1ZSRlayrnVOqfiABLZJJDw1OA++VuQdpOKSgJgt/7buf/B4GPSH3EWQ==",
"dev": true "dev": true
}, },
"@types/q": { "@types/q": {
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"@types/bpmn-moddle": "^5.1.5", "@types/bpmn-moddle": "^5.1.5",
"@types/jasmine": "^3.6.1", "@types/jasmine": "^3.6.1",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^12.19.3", "@types/node": "^12.20.35",
"codelyzer": "^5.1.2", "codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0", "jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
......
...@@ -93,4 +93,8 @@ export class BpmnDiagramComponent implements AfterContentInit, OnInit, OnDestroy ...@@ -93,4 +93,8 @@ export class BpmnDiagramComponent implements AfterContentInit, OnInit, OnDestroy
fitViewPort() { fitViewPort() {
this.bpmnJS.get('canvas').zoom('fit-viewport'); this.bpmnJS.get('canvas').zoom('fit-viewport');
} }
getBpmnContainer() {
return this.bpmnJS;
}
} }
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<h4>Current BPMN-Diagram</h4> <h4>Current BPMN-Diagram</h4>
<app-bpmn-diagram [diagram]="diagram"></app-bpmn-diagram> <app-bpmn-diagram [diagram]="diagram" #backupDiagram></app-bpmn-diagram>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<h4>BPMN-Diagram with Changes</h4> <h4>BPMN-Diagram with Changes</h4>
<app-bpmn-diagram [diagram]="diagramNew"></app-bpmn-diagram> <app-bpmn-diagram [diagram]="diagramNew" #newDiagram></app-bpmn-diagram>
</div> </div>
</div> </div>
......
...@@ -18,8 +18,8 @@ export class FileService { ...@@ -18,8 +18,8 @@ export class FileService {
} }
// REST CALL: /project/{id}/update/bpmn/x // REST CALL: /project/{id}/update/bpmn/x
public async getUpdatedBPMNDiagram(projectId: number): Promise<string> { public async getBackupBPMNDiagram(projectId: number): Promise<string> {
const url = `${environment.apiBaseUrl}project/${projectId}/update/bpmn/x`; const url = `${environment.apiBaseUrl}project/${projectId}/backup/bpmn/x`;
return <string>await this.http.get(url, {responseType: 'text'}).toPromise(); return <string>await this.http.get(url, {responseType: 'text'}).toPromise();
} }
} }
...@@ -23,6 +23,20 @@ ...@@ -23,6 +23,20 @@
/**#00C851*/ /**#00C851*/
/**#ff4444*/ /**#ff4444*/
} }
.marker-removed:not(.djs-connection) .djs-visual > :nth-child(1) {
fill: red !important;
stroke: red !important;
}
.marker-removed.djs-connection .djs-visual > :nth-child(1) {
stroke: red !important;
}
.marker-added:not(.djs-connection) .djs-visual > :nth-child(1) {
fill: green !important;
stroke: green !important;
}
.marker-added.djs-connection .djs-visual > :nth-child(1) {
stroke: green !important;
}
</style> </style>
<body> <body>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"types": [] "types": ["node"]
}, },
"files": [ "files": [
"main.ts", "main.ts",
......
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