diff --git a/src/frontend/src/app/components/header-bar/header-bar.component.html b/src/frontend/src/app/components/header-bar/header-bar.component.html index f06c6307b3804935b05be633248fe90369504a0f..ccf20135e54a0bf950cd72a7b119eb94a157fbfc 100644 --- a/src/frontend/src/app/components/header-bar/header-bar.component.html +++ b/src/frontend/src/app/components/header-bar/header-bar.component.html @@ -23,6 +23,14 @@ </div> </button> </li> + <li> + <button class="button align-bottom" (click)="importOCEL()"> + <div> + <i class="bi bi-upload btn-icon"></i> + <span><b>Import</b> OCEL</span> + </div> + </button> + </li> <li> <button class="button align-bottom" (click)="importTreeFromPTML()"> <div> @@ -184,6 +192,15 @@ accept=".xes" /> + <!-- TODO: Change Accept Format --> + <input + #fileUploadOCEL + type="file" + class="d-none" + (change)="handleSelectedEventLogFile($event, false)" + accept=".xes" + /> + <input #fileUploadProcessTree type="file" diff --git a/src/frontend/src/app/components/header-bar/header-bar.component.ts b/src/frontend/src/app/components/header-bar/header-bar.component.ts index 28a6282eecbec6f872a320292682391184a13d36..f9b3b1ba3250fa98dce146880b20af670d97c539 100644 --- a/src/frontend/src/app/components/header-bar/header-bar.component.ts +++ b/src/frontend/src/app/components/header-bar/header-bar.component.ts @@ -26,6 +26,7 @@ import { LogExportService } from 'src/app/services/logExportService/log-export.s }) export class HeaderBarComponent implements OnDestroy { @ViewChild('fileUploadEventLog') fileUploadEventLog: ElementRef; + @ViewChild('fileUploadOCEL') fileUploadOCEL: ElementRef; @ViewChild('fileUploadProcessTree') fileUploadProcessTree: ElementRef; @ViewChild('fileUploadProject') fileUploadProject: ElementRef; @ViewChild('fileUploadEventLogRetry') fileUploadEventLogRetry: ElementRef; @@ -73,6 +74,12 @@ export class HeaderBarComponent implements OnDestroy { this.fileUploadEventLog.nativeElement.click(); } + //TODO: remove comments + importOCEL(): void { + console.log("We try to upload an OCEL, but nothing is yet implemented") + this.fileUploadOCEL.nativeElement.click(); + } + handleSelectedEventLogFile(e, isRetry = false): void { const fileList: FileList = e.target.files; if (fileList.length > 0) {