diff options
3 files changed, 13 insertions, 3 deletions
diff --git a/frontend/src/app/_elements/form-dataset/form-dataset.component.html b/frontend/src/app/_elements/form-dataset/form-dataset.component.html index b96276bd..7e836192 100644 --- a/frontend/src/app/_elements/form-dataset/form-dataset.component.html +++ b/frontend/src/app/_elements/form-dataset/form-dataset.component.html @@ -1,6 +1,5 @@ <div class="folderBox" *ngIf="dataset"> - - + <div class="topBar"> <div class="kolona mb-3"> <div class="fileButton"> @@ -43,10 +42,14 @@ <div class="file-container" [ngClass]="{'dottedClass': !tableData.hasInput}"> <i class="material-icons-outlined icon-display" [ngClass]="{'hidden': tableData.hasInput}">file_upload</i> + <input class="file" id="file-upload" (change)="changeListener($event)" #fileInput type="file" accept=".csv"> <div class="mt-5 datatable"> + <button mat-button [ngClass]="{'hidden': !tableData.hasInput}" (click)="test()"><mat-icon>keyboard_arrow_left</mat-icon></button> + <button mat-button [ngClass]="{'hidden': !tableData.hasInput}" (click)="test()"><mat-icon>keyboard_arrow_right</mat-icon></button> + <app-datatable [tableData]="tableData"></app-datatable> </div> diff --git a/frontend/src/app/_elements/form-dataset/form-dataset.component.ts b/frontend/src/app/_elements/form-dataset/form-dataset.component.ts index 94ef9905..11d7faed 100644 --- a/frontend/src/app/_elements/form-dataset/form-dataset.component.ts +++ b/frontend/src/app/_elements/form-dataset/form-dataset.component.ts @@ -24,6 +24,8 @@ export class FormDatasetComponent { files: File[] = []; rowsNumber: number = 0; colsNumber: number = 0; + begin:number=-1; + end:number=11; @Input() dataset: Dataset; //dodaj ! potencijalno @@ -40,7 +42,9 @@ export class FormDatasetComponent { } //@ViewChild('fileImportInput', { static: false }) fileImportInput: any; cemu je ovo sluzilo? - + test(){ + console.log("radi"); + } clear(){ this.tableData.hasInput = false; } diff --git a/frontend/src/app/_services/datasets.service.ts b/frontend/src/app/_services/datasets.service.ts index 2211996f..6d0e06db 100644 --- a/frontend/src/app/_services/datasets.service.ts +++ b/frontend/src/app/_services/datasets.service.ts @@ -27,6 +27,9 @@ export class DatasetsService { getDatasetFile(fileId: any): any { return this.http.get(`${Configuration.settings.apiURL}/file/csvRead/${fileId}/-1/11`, { headers: this.authService.authHeader(), responseType: 'text' }); } + getDatasetFilePaging(fileId:any,begin:any,end:any){ + return this.http.get(`${Configuration.settings.apiURL}/file/csvRead/${fileId}/${begin}/${end}`, { headers: this.authService.authHeader(), responseType: 'text' }); + } getDatasetFilePartial(fileId: any, startRow: number, rowNum: number): Observable<any> { return this.http.get(`${Configuration.settings.apiURL}/file/csvRead/${fileId}/${startRow}/${rowNum}`, { headers: this.authService.authHeader(), responseType: 'text' }); } |