aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_pages
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_pages')
-rw-r--r--frontend/src/app/_pages/add-model/add-model.component.html23
-rw-r--r--frontend/src/app/_pages/add-model/add-model.component.ts3
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.html5
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.ts15
4 files changed, 36 insertions, 10 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 afd4ceb4..7e944a19 100644
--- a/frontend/src/app/_pages/add-model/add-model.component.html
+++ b/frontend/src/app/_pages/add-model/add-model.component.html
@@ -96,12 +96,12 @@
<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
+ <label for="delRows" class="form-check-label">Obriši sve
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
+ <label for="delCols" class="form-check-label">Obriši sve
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"
@@ -114,11 +114,11 @@
<div id="columnReplacers">
<div *ngFor="let column of selectedDataset.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">
+ <span class="input-group-text col-2 text-center">
{{column}}
</span>
- <input type="text" class="form-control col-4">
- <select [id]="'replaceOptions'+i" class="form-control col-4"
+ <input type="text" class="form-control col-2">
+ <select [id]="'replaceOptions'+i" class="form-control col-2"
*ngIf="isNumber(datasetFile[1][i])">
<option
*ngFor="let option of Object.keys(ReplaceWith); let optionName of Object.values(ReplaceWith)"
@@ -126,6 +126,19 @@
{{ optionName }}
</option>
</select>
+ <select [id]="'replaceOptions'+i" class="form-control col-2"
+ *ngIf="!isNumber(datasetFile[1][i])">
+ <option *ngFor="let option of arrayColumn(datasetFile, i)"
+ [value]="option">
+ {{ option }}
+ </option>
+ </select>
+ <label class="form-control col-2" [for]="'delCol_'+column">Izbriši kolonu
+ <input type="radio" [id]="'delCol_'+column"
+ [name]="'delOp_'+column"></label>
+ <label class="form-control col-2" [for]="'delRows_'+column">Izbriši redove
+ <input type="radio" [id]="'delRows_'+column" [name]="'delOp_'+column"
+ checked></label>
</div>
</div>
</div>
diff --git a/frontend/src/app/_pages/add-model/add-model.component.ts b/frontend/src/app/_pages/add-model/add-model.component.ts
index 156e51bc..fcc8ea70 100644
--- a/frontend/src/app/_pages/add-model/add-model.component.ts
+++ b/frontend/src/app/_pages/add-model/add-model.component.ts
@@ -271,8 +271,9 @@ export class AddModelComponent implements OnInit {
!isNaN(Number(value.toString())));
}
-
getInputById(id: string): HTMLInputElement {
return document.getElementById(id) as HTMLInputElement;
}
+
+ arrayColumn = (arr: any[][], n: number) => [...new Set(arr.map(x => x[n]))];
}
diff --git a/frontend/src/app/_pages/my-models/my-models.component.html b/frontend/src/app/_pages/my-models/my-models.component.html
index e69de29b..e94f67f5 100644
--- a/frontend/src/app/_pages/my-models/my-models.component.html
+++ b/frontend/src/app/_pages/my-models/my-models.component.html
@@ -0,0 +1,5 @@
+<ul class="list-group my-2">
+ <li class="list-group-item" *ngFor="let model of myModels">
+ <app-item-model [model]="model"></app-item-model>
+ </li>
+</ul> \ No newline at end of file
diff --git a/frontend/src/app/_pages/my-models/my-models.component.ts b/frontend/src/app/_pages/my-models/my-models.component.ts
index e9bc52de..3ab57e59 100644
--- a/frontend/src/app/_pages/my-models/my-models.component.ts
+++ b/frontend/src/app/_pages/my-models/my-models.component.ts
@@ -1,15 +1,22 @@
import { Component, OnInit } from '@angular/core';
+import Model from 'src/app/_data/Model';
@Component({
selector: 'app-my-models',
templateUrl: './my-models.component.html',
styleUrls: ['./my-models.component.css']
})
-export class MyModelsComponent implements OnInit {
+export class MyModelsComponent /*implements OnInit*/ {
+ myModels: Model[];
- constructor() { }
+ constructor() {
+ this.myModels = [
+ new Model('Titanik', 'Opis titanik'),
+ new Model('Neki drugi set', 'opis'),
+ new Model('Treci set', 'opis')
+ ]; }
- ngOnInit(): void {
+ /*ngOnInit(): void {
}
-
+*/
}