diff options
Diffstat (limited to 'frontend/src/app/_pages/add-model/add-model.component.html')
-rw-r--r-- | frontend/src/app/_pages/add-model/add-model.component.html | 102 |
1 files changed, 76 insertions, 26 deletions
diff --git a/frontend/src/app/_pages/add-model/add-model.component.html b/frontend/src/app/_pages/add-model/add-model.component.html index 33066f80..e87d1431 100644 --- a/frontend/src/app/_pages/add-model/add-model.component.html +++ b/frontend/src/app/_pages/add-model/add-model.component.html @@ -38,33 +38,36 @@ </button> <h3 class="mt-3 mx-3">ili</h3> <button type="button" id="btnNewDataset" class="btn" (click)="viewNewDatasetForm()" - [ngClass]="{'btnType1': !showMyDatasets, 'btnType2': showMyDatasets}"> + [ngClass]="{'btnType1': !showMyDatasets, 'btnType2': showMyDatasets}"> Dodajte novi dataset </button> </div> - <!-- POSTOJECI ILI NOVI DATASET --> + <!-- POSTOJECI ILI NOVI DATASET --> - <!-- POSTOJECI --> - <div class="px-5"> - <div *ngIf="showMyDatasets" class="overflow-auto" style="max-height: 500px;"> - <ul class="list-group"> - <li class="list-group-item p-3" *ngFor="let dataset of myDatasets" [ngClass]="{'selectedDatasetClass': this.selectedDataset == dataset}"> - <app-item-dataset name="usersDataset" [dataset]="dataset" (click)="selectThisDataset(dataset)"></app-item-dataset> - </li> - </ul> - </div> + <!-- POSTOJECI --> + <div class="px-5"> + <div *ngIf="showMyDatasets" class="overflow-auto" style="max-height: 500px;"> + <ul class="list-group"> + <li class="list-group-item p-3" *ngFor="let dataset of myDatasets" + [ngClass]="{'selectedDatasetClass': this.selectedDataset == dataset}"> + <app-item-dataset name="usersDataset" [dataset]="dataset" + (click)="selectThisDataset(dataset)"></app-item-dataset> + </li> + </ul> </div> - - <!-- NOVI --> - <app-dataset-load *ngIf="!showMyDatasets" id="dataset" (loaded)="datasetLoaded = true"></app-dataset-load> + </div> + + <!-- NOVI --> + <app-dataset-load *ngIf="!showMyDatasets" id="dataset" (loaded)="datasetLoaded = true"></app-dataset-load> </div> <!-- ULAZNE/IZLAZNE KOLONE - POSTOJECI DATASET --> <div *ngIf="showMyDatasets && this.selectedDataset" class="mt-4"> <h2 class="text-center"> - Izabrali ste dataset: <span style="color: #003459; font-weight: bold">{{this.selectedDataset.name}}</span> + Izabrali ste dataset: <span + style="color: #003459; font-weight: bold">{{this.selectedDataset.name}}</span> </h2> <div class="row mt-5"> <div class="col d-flex justify-content-center"> @@ -72,8 +75,8 @@ <div id="divInputs" class="form-check mt-2"> <br> <div *ngFor="let item of this.selectedDataset.header; let i = index"> - <input class="form-check-input" type="checkbox" value="{{item}}" - id="cb_{{item}}" name="cbsExisting" checked [disabled]="this.selectedOutputColumnVal == item"> + <input class="form-check-input" type="checkbox" value="{{item}}" id="cb_{{item}}" + name="cbsExisting" checked [disabled]="this.selectedOutputColumnVal == item"> <label class="form-check-label" for="cb_{{item}}"> {{item}} </label> @@ -85,8 +88,8 @@ <div id="divOutputs" class="form-check mt-2"> <br> <div *ngFor="let item of this.selectedDataset.header; let i = index"> - <input class="form-check-input" type="radio" value="{{item}}" - id="rb_{{item}}" name="rbsExisting" (change)="this.selectedOutputColumnVal = item"> + <input class="form-check-input" type="radio" value="{{item}}" id="rb_{{item}}" + name="rbsExisting" (change)="this.selectedOutputColumnVal = item"> <label class="form-check-label" for="rb_{{item}}"> {{item}} </label> @@ -105,8 +108,8 @@ <div id="divInputs" class="form-check mt-2"> <br> <div *ngFor="let item of datasetLoadComponent.dataset.header; let i = index"> - <input class="form-check-input" type="checkbox" value="{{item}}" - id="cb_{{item}}" name="cbsNew" checked [disabled]="this.selectedOutputColumnVal == item"> + <input class="form-check-input" type="checkbox" value="{{item}}" id="cb_{{item}}" + name="cbsNew" checked [disabled]="this.selectedOutputColumnVal == item"> <label class="form-check-label" for="cb_{{item}}"> {{item}} </label> @@ -118,14 +121,60 @@ <div id="divOutputs" class="form-check mt-2"> <br> <div *ngFor="let item of datasetLoadComponent.dataset.header; let i = index"> - <input class="form-check-input" type="radio" value="{{item}}" - id="rb_{{item}}" name="rbsNew" (change)="this.selectedOutputColumnVal = item"> + <input class="form-check-input" type="radio" value="{{item}}" id="rb_{{item}}" name="rbsNew" + (change)="this.selectedOutputColumnVal = item"> <label class="form-check-label" for="rb_{{item}}"> {{item}} </label> </div> </div> </div> + + + <div class="my-2"> + <h2>Popunjavanje nedostajućih vrednosti:</h2> + <div class="form-check"> + <input type="radio" [(ngModel)]="newModel.nullValues" [value]="NullValueOptions.DeleteRows" + class="form-check-input" value="deleteRows" name="fillMissing" id="delRows" checked + data-bs-toggle="collapse" data-bs-target="#fillMissingCustom.show"> + <label for="delRows" class="form-check-label">Obriši + redove sa nedostajućim vrednostima</label><br> + <input type="radio" [(ngModel)]="newModel.nullValues" [value]="NullValueOptions.DeleteColumns" + class="form-check-input" value="deleteCols" name="fillMissing" id="delCols" + data-bs-toggle="collapse" data-bs-target="#fillMissingCustom.show"> + <label for="delCols" class="form-check-label">Obriši + kolone sa nedostajućim vrednostima</label><br> + <input type="radio" [(ngModel)]="newModel.nullValues" [value]="NullValueOptions.Replace" + class="form-check-input" name="fillMissing" id="replace" data-bs-toggle="collapse" + data-bs-target="#fillMissingCustom:not(.show)"> + <label for="replace" class="form-check-label">Izabraću + vrednosti koje će da zamene nedostajuće vrednosti za svaku kolonu...</label><br><br> + <div class="collapse" id="fillMissingCustom"> + <div> + <label for="columnReplacers" class="form-label">Unesite zamenu za svaku kolonu:</label> + <div id="columnReplacers"> + <div *ngFor="let column of datasetLoadComponent.dataset.header; let i = index" + class="my-3"> + <div class="input-group row" *ngIf="getInputById('cb_'+column).checked"> + <span class="input-group-text col-4 text-center"> + {{column}} + </span> + <input type="text" class="form-control col-4"> + <select [id]="'replaceOptions'+i" class="form-control col-4" + *ngIf="isNumber(datasetLoadComponent.csvRecords[1][i])"> + <option + *ngFor="let option of Object.keys(ReplaceWith); let optionName of Object.values(ReplaceWith)" + [value]="option"> + {{ optionName }} + </option> + </select> + </div> + </div> + </div> + </div> + </div> + </div> + </div> </div> </div> @@ -257,7 +306,8 @@ </div> <div class="col-5"> <label for="splitYesNo" class="form-check-label">Podela test skupa: - <input id="splitYesNo" class="form-check-input" type="checkbox" [checked]="newModel.randomTestSet" + <input id="splitYesNo" class="form-check-input" type="checkbox" + [checked]="newModel.randomTestSet" (change)="newModel.randomTestSet = !newModel.randomTestSet"> </label> </div> @@ -288,8 +338,8 @@ <label for="percentage" class="form-label">Procenat podataka koji se uzima za trening skup:</label> </div> <div class="col-1"> - <input id="percentage" type="number" class="form-control" min="10" max="90" step="10" value="90" [(ngModel)]="tempTestSetDistribution" - [disabled] = "!newModel.randomTestSet"> + <input id="percentage" type="number" class="form-control" min="10" max="90" step="10" value="90" + [(ngModel)]="tempTestSetDistribution" [disabled]="!newModel.randomTestSet"> </div> </div> |