aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_elements')
-rw-r--r--frontend/src/app/_elements/column-table/column-table.component.html2
-rw-r--r--frontend/src/app/_elements/folder/folder.component.ts3
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.html2
-rw-r--r--frontend/src/app/_elements/form-model/form-model.component.ts15
4 files changed, 13 insertions, 9 deletions
diff --git a/frontend/src/app/_elements/column-table/column-table.component.html b/frontend/src/app/_elements/column-table/column-table.component.html
index d5273d59..27e0f3bf 100644
--- a/frontend/src/app/_elements/column-table/column-table.component.html
+++ b/frontend/src/app/_elements/column-table/column-table.component.html
@@ -147,7 +147,7 @@
</div>
</td>
</tr>
- <tr style="padding: 0;">
+ <tr style="padding: 0;" *ngIf="experiment.encodings!=undefined">
<th style="background-color: var(--ns-primary);" (click)="openEncodingDialog()">
<span class="verticalAlign">Enkodiranje</span>&nbsp;
<span class="material-icons-round verticalAlign rotate">settings</span>
diff --git a/frontend/src/app/_elements/folder/folder.component.ts b/frontend/src/app/_elements/folder/folder.component.ts
index 418b5a7f..9dfabdb3 100644
--- a/frontend/src/app/_elements/folder/folder.component.ts
+++ b/frontend/src/app/_elements/folder/folder.component.ts
@@ -63,6 +63,7 @@ export class FolderComponent implements AfterViewInit {
this.signalRService.hubConnection.on("NotifyDataset", (dName: string, dId: string) => {
if (this.type == FolderType.Dataset) {
this.refreshFiles(dId);
+ this.okPressed.emit();
}
this.saveDisabled = false;
console.log("Notify dataset ", this.saveDisabled);
@@ -298,7 +299,7 @@ export class FolderComponent implements AfterViewInit {
this.formNewDataset!.uploadDataset((dataset: Dataset) => {
this.newFile = undefined;
this.loadingAction = false;
- this.okPressed.emit();
+ //this.okPressed.emit();
//Shared.openDialog("Obaveštenje", "Uspešno ste dodali novi izvor podataka u kolekciju. Molimo sačekajte par trenutaka da se obradi.");
this.refreshFiles();
this.createNewFile();
diff --git a/frontend/src/app/_elements/form-model/form-model.component.html b/frontend/src/app/_elements/form-model/form-model.component.html
index 55c802e9..1f0208fa 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.html
+++ b/frontend/src/app/_elements/form-model/form-model.component.html
@@ -1,4 +1,4 @@
-<div *ngIf="newModel">
+<div *ngIf="newModel!=undefined">
<div id="container">
<div class="ns-row">
diff --git a/frontend/src/app/_elements/form-model/form-model.component.ts b/frontend/src/app/_elements/form-model/form-model.component.ts
index f72ce6de..7831f573 100644
--- a/frontend/src/app/_elements/form-model/form-model.component.ts
+++ b/frontend/src/app/_elements/form-model/form-model.component.ts
@@ -27,11 +27,7 @@ export class FormModelComponent implements AfterViewInit {
@Output() editEvent = new EventEmitter();
ngAfterViewInit(): void {
- this.lossFunction = this.lossFunctions[this.forProblemType][0];
- this.outputLayerActivationFunction = this.outputLayerActivationFunctions[this.forProblemType][0];
-
- this.newModel.lossFunction = this.lossFunction;
- this.newModel.outputLayerActivationFunction = this.outputLayerActivationFunction;
+
}
selectFormControl = new FormControl('', Validators.required);
@@ -82,10 +78,17 @@ export class FormModelComponent implements AfterViewInit {
loadModel(model: Model) {
this.newModel = model;
this.forProblemType = model.type;
+ this.lossFunction = this.lossFunctions[this.forProblemType][0];
+ this.outputLayerActivationFunction = this.outputLayerActivationFunctions[this.forProblemType][0];
+
+ this.newModel.lossFunction = this.lossFunction;
+ this.newModel.outputLayerActivationFunction = this.outputLayerActivationFunction;
+ this.updateGraph();
}
updateGraph() {
- this.graph.update();
+ if(this.newModel)
+ this.graph.update();
}
removeLayer() {