diff options
Diffstat (limited to 'frontend/src')
18 files changed, 303 insertions, 39 deletions
diff --git a/frontend/src/app/Shared.ts b/frontend/src/app/Shared.ts index 7be29cbf..59a2716d 100644 --- a/frontend/src/app/Shared.ts +++ b/frontend/src/app/Shared.ts @@ -2,6 +2,7 @@ import { ElementRef } from "@angular/core"; import { NgbModal } from "@ng-bootstrap/ng-bootstrap"; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { AlertDialogComponent } from './_modals/alert-dialog/alert-dialog.component'; +import { YesNoDialogComponent } from './_modals/yes-no-dialog/yes-no-dialog.component'; class Shared { constructor( @@ -26,6 +27,18 @@ class Shared { }); } } + openYesNoDialog(title: string, message: string,yesFunction:Function): void { + + if (this.dialog) { + const dialogRef = this.dialog.open(YesNoDialogComponent, { + width: '350px', + data: { title: title, message: message,yesFunction} + }); + dialogRef.afterClosed().subscribe(res => { + //nesto + }); + } + } } export default new Shared(false);
\ No newline at end of file diff --git a/frontend/src/app/_elements/item-dataset/item-dataset.component.css b/frontend/src/app/_elements/item-dataset/item-dataset.component.css index e69de29b..1457311f 100644 --- a/frontend/src/app/_elements/item-dataset/item-dataset.component.css +++ b/frontend/src/app/_elements/item-dataset/item-dataset.component.css @@ -0,0 +1,23 @@ +.card{ + margin-top:10%; + padding: 0; +} +.p-2{ + margin: 0; + padding: 0; +} +hr{ + margin: 0; + padding: 0; +} +b{ + margin-left: 5px; + margin-right: 10px; +} +th{ + margin: 10px; + padding: 10px; +} +p{ + text-align: justify; +}
\ No newline at end of file diff --git a/frontend/src/app/_elements/item-dataset/item-dataset.component.html b/frontend/src/app/_elements/item-dataset/item-dataset.component.html index dc4221f4..142a9194 100644 --- a/frontend/src/app/_elements/item-dataset/item-dataset.component.html +++ b/frontend/src/app/_elements/item-dataset/item-dataset.component.html @@ -1,16 +1,50 @@ <div class="card" style="min-width: 12rem;"> - <div class="card-header"> - {{dataset.name}} +<div class="card-header d-flex mb-2 justify-content-" style="padding: 0;margin: 0;"> + + <div class=" p-2 float-left "><b style="color: gray;">Naziv</b></div> + <div class=" p-2 float-left"><b>{{dataset.name}}</b></div> +</div> +<div class="card-body overflow-hidden"> + <b style="color: gray;">Opis</b> + <hr style="width: 20%;"> <p> {{dataset.description}}opis1234564654768798768</p> + <hr> + <div class="d-flex justify-content-center"> + <div class=" p-2" style="float: right;"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-filetype-csv" viewBox="0 0 17 17"> + <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.517 14.841a1.13 1.13 0 0 0 .401.823c.13.108.289.192.478.252.19.061.411.091.665.091.338 0 .624-.053.859-.158.236-.105.416-.252.539-.44.125-.189.187-.408.187-.656 0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357 2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384.125-.101.296-.152.512-.152.143 0 .266.023.37.068a.624.624 0 0 1 .246.181.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566 1.21 1.21 0 0 0-.5-.41 1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15-.225.099-.4.24-.527.421-.127.182-.19.395-.19.639 0 .201.04.376.122.524.082.149.2.27.352.367.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326.505.505 0 0 1-.085.29.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399.814.814 0 0 1 .475-.137c.15 0 .283.032.398.097a.7.7 0 0 1 .272.26.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964 1.441 1.441 0 0 0-.489-.272 1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223-.25.148-.44.359-.572.632-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976.131.271.322.48.572.626.25.145.554.217.914.217.293 0 .554-.055.785-.164.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363.7.7 0 0 1-.272.25.874.874 0 0 1-.401.087.845.845 0 0 1-.478-.132.833.833 0 0 1-.299-.392 1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/> + </svg> + </div> + <div class="p-2"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lock-fill" viewBox="0 0 16 16"> + <path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/> + </svg> + </div> </div> - <div class="card-body overflow-hidden"> - <p class="card-text"> - {{dataset.description}} - </p> - <table class="table table-bordered table-sm"> - <thead> - <th scope="col" *ngFor="let column of dataset.header">{{column}}</th> - <!-- treba da se namesti da kad nema hedere, da korisnik unese nazive kolona pa da se taj heder prikaze --> - </thead> - </table> - </div> -</div>
\ No newline at end of file + <hr> + <div class="col text-center"> +<button (click)=toggleDisplayDiv() class="btn btn-primary btn-sm active " mat-raised-button color="primary" style="margin: 0.5rem;">Kolone</button> + <div [hidden]="isShowDiv" style="overflow: scroll; overflow-y: hidden;"> + <table class="table table-bordered table-md"> + <thead> + <th scope="col" *ngFor="let column of dataset.header">{{column}}</th> + <!-- treba da se namesti da kad nema hedere, da korisnik unese nazive kolona pa da se taj heder prikaze --> + </thead> + </table> + </div> +</div> + <table> + <tr><td> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar-plus" viewBox="0 0 16 16"> + <path d="M8 7a.5.5 0 0 1 .5.5V9H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V10H6a.5.5 0 0 1 0-1h1.5V7.5A.5.5 0 0 1 8 7z"/> + <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/> + </svg><span style="color: grey;"> <b> Kreirano</b></span></td><td>{{dataset.dateCreated |date}}</td> + <tr><tr><td><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar-check" viewBox="0 0 16 16"> + <path d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z"/> + <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/> + </svg><span style="color: grey;"> <b> Poslednja izmena</b></span></td><td>{{dataset.lastUpdated |date}}</td> + </tr> + </table> + +</div> +<div class="card-footer"> + + </div>
\ No newline at end of file diff --git a/frontend/src/app/_elements/item-dataset/item-dataset.component.ts b/frontend/src/app/_elements/item-dataset/item-dataset.component.ts index e12de34d..320cb10f 100644 --- a/frontend/src/app/_elements/item-dataset/item-dataset.component.ts +++ b/frontend/src/app/_elements/item-dataset/item-dataset.component.ts @@ -9,7 +9,13 @@ import Dataset from 'src/app/_data/Dataset'; export class ItemDatasetComponent { @Input() dataset: Dataset = new Dataset(); - + + isShowDiv = true; + toggleDisplayDiv() { + this.isShowDiv = !this.isShowDiv; + } constructor() { } + } + diff --git a/frontend/src/app/_elements/item-model/item-model.component.css b/frontend/src/app/_elements/item-model/item-model.component.css index e69de29b..5ea24c72 100644 --- a/frontend/src/app/_elements/item-model/item-model.component.css +++ b/frontend/src/app/_elements/item-model/item-model.component.css @@ -0,0 +1,23 @@ +.card{ + margin: 0.5rem; + padding: 0; +} +.p-2{ + margin: 0; + padding: 0; +} +hr{ + margin: 0; + padding: 0; +} +b{ + margin-left: 5px; + margin-right: 10px; +} +th{ + margin: 10px; + padding: 10px; +} +p{ + text-align: justify; +}
\ No newline at end of file diff --git a/frontend/src/app/_elements/item-model/item-model.component.html b/frontend/src/app/_elements/item-model/item-model.component.html index 695c580e..c64f8ca1 100644 --- a/frontend/src/app/_elements/item-model/item-model.component.html +++ b/frontend/src/app/_elements/item-model/item-model.component.html @@ -1,13 +1,66 @@ <div class="card" style="min-width: 12rem;"> - <div class="card-header"> - {{model.name}} + <div class="card-header d-flex mb-2 justify-content-" style="padding: 0;margin: 0;"> + + <div class=" p-2 float-left "><b style="color: gray;">Naziv</b></div> + <div class=" p-2 float-left"><b>{{model.name}}</b></div> </div> - <div class="card-body overflow-hidden"> + <div class="card-body overflow-hidden"> + <app-graph [model]="model"></app-graph> + <br> + <b style="color: gray;">Opis</b><hr style="width: 20%;"> <p class="card-text"> - {{"Opis: "+ model.description}}<br> - {{"Datum kreiranja: " + model.dateCreated}}<br> - {{"Poslednje ažuriranje: " + model.lastUpdated}}<br> + {{model.description}}opis1234564654768798768 </p> - <app-graph [model]="model"></app-graph> + <hr> + + <div> + <table> + <tr><td> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar-plus" viewBox="0 0 16 16"> + <path d="M8 7a.5.5 0 0 1 .5.5V9H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V10H6a.5.5 0 0 1 0-1h1.5V7.5A.5.5 0 0 1 8 7z"/> + <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/> + </svg><span style="color: grey;"> <b> Kreirano</b></span></td><td>{{model.dateCreated |date}}</td> + <tr><tr><td><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar-check" viewBox="0 0 16 16"> + <path d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z"/> + <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/> + </svg><span style="color: grey;"> <b> Poslednja izmena</b></span></td><td>{{model.lastUpdated |date}}</td> + </tr> + </table> + </div> + </div> + <button (click)=toggleDisplayDiv() class="btn btn-default btn-lg " mat-raised-button color="primary" style="margin: 0.5rem;">Parametri</button> + <div [hidden]="isShowDiv"> + <!-- <table> + <tr> + <td><span style="color: grey;"> <b> Nasumično raspoređivanje podataka</b></span></td><td>{{randomOrd}}</td> + </tr> + <tr> + <td><span style="color: grey;"> <b> Podela podataka na trening i test skup</b></span></td><td>{{randomOrd}}</td> + </tr> + <tr> + <td><span style="color: grey;"> <b> Veličina skupa za treniranje</b></span></td><td>{{randomOrd}}</td> + </tr> + </table>--> + <hr> + <table> + <tr> + <td><span style="color: grey;"> <b> Tip problema</b></span></td><td>{{model.type}}</td> + </tr> + <tr> + <td><span style="color: grey;"> <b> Optimizator</b></span></td><td>{{model.optimizer}}</td> + </tr> + <tr> + <td> <span style="color: grey;"> <b> Funkcija gubitka</b></span></td><td>{{model.lossFunction}}</td> + </tr> + <tr> + <td><span style="color: grey;"> <b> Batch size</b></span></td><td>{{model.batchSize}}</td> + </tr> + <tr> + <td><span style="color: grey;"> <b> Broj epoha</b></span></td><td>{{model.epochs}}</td> + </tr> + + </table> + + </div> </div>
\ No newline at end of file diff --git a/frontend/src/app/_elements/item-model/item-model.component.ts b/frontend/src/app/_elements/item-model/item-model.component.ts index 7f85f43f..b837667b 100644 --- a/frontend/src/app/_elements/item-model/item-model.component.ts +++ b/frontend/src/app/_elements/item-model/item-model.component.ts @@ -9,10 +9,25 @@ import Model from 'src/app/_data/Model'; export class ItemModelComponent implements OnInit { @Input() model: Model = new Model(); + isShowDiv = true; + randomOrd=''; + toggleDisplayDiv() { + this.isShowDiv = !this.isShowDiv; + } + constructor() { } ngOnInit(): void { + /*if(this.model.randomOrder) + { + this.randomOrd='Da'; + } + else + { + this.randomOrd='Ne'; + } +*/ } } diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.css b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.css diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html new file mode 100644 index 00000000..06e74093 --- /dev/null +++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.html @@ -0,0 +1,8 @@ +<h2 mat-dialog-title class="text-muted">{{data.title}}</h2> +<div mat-dialog-content class="mt-4" style="color: rgb(81, 76, 76);"> + {{data.message}} +</div> +<div mat-dialog-actions class="d-flex justify-content-center mt-4"> + <button mat-button cdkFocusInitial (click)="onYesClick()" style="background-color: lightgray;">Da</button> + <button mat-button cdkFocusInitial (click)="onNoClick()" style="background-color: lightgray;">Ne</button> +</div>
\ No newline at end of file diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.spec.ts b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.spec.ts new file mode 100644 index 00000000..eecf6468 --- /dev/null +++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import {YesNoDialogComponent } from './yes-no-dialog.component'; + +describe('AlertDialogComponent', () => { + let component: YesNoDialogComponent; + let fixture: ComponentFixture<YesNoDialogComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ YesNoDialogComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(YesNoDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts new file mode 100644 index 00000000..de1cdd4f --- /dev/null +++ b/frontend/src/app/_modals/yes-no-dialog/yes-no-dialog.component.ts @@ -0,0 +1,33 @@ +import { Component, OnInit } from '@angular/core'; +import { Inject} from '@angular/core'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; + +interface DialogData { + title: string; + message: string; + yesFunction:Function; +} + +@Component({ + selector: 'app-yes-no-dialog', + templateUrl: './yes-no-dialog.component.html', + styleUrls: ['./yes-no-dialog.component.css'] +}) +export class YesNoDialogComponent { + + constructor( + public dialogRef: MatDialogRef<YesNoDialogComponent>, + @Inject(MAT_DIALOG_DATA) public data: DialogData, + //public dialog: MatDialog + ) {} + + onNoClick(): void { + this.dialogRef.close(); + } + onYesClick():void{ + this.data.yesFunction(); + this.dialogRef.close(); + } + + +} diff --git a/frontend/src/app/_pages/my-datasets/my-datasets.component.css b/frontend/src/app/_pages/my-datasets/my-datasets.component.css index e69de29b..57889937 100644 --- a/frontend/src/app/_pages/my-datasets/my-datasets.component.css +++ b/frontend/src/app/_pages/my-datasets/my-datasets.component.css @@ -0,0 +1,8 @@ +#header { + background-color: #003459; + padding-top: 20px; + padding-bottom: 15px; + text-align: center; + color: white; + border-radius: 5px; +}
\ No newline at end of file diff --git a/frontend/src/app/_pages/my-datasets/my-datasets.component.html b/frontend/src/app/_pages/my-datasets/my-datasets.component.html index d996bf31..0c83dc85 100644 --- a/frontend/src/app/_pages/my-datasets/my-datasets.component.html +++ b/frontend/src/app/_pages/my-datasets/my-datasets.component.html @@ -1,5 +1,8 @@ +<div id="header"> + <h1>Moji setovi podataka</h1> +</div> <div id="wrapper"> - <div id="container" class="container p-5" style="background-color: white; min-height: 100%;"> + <div id="container" class="container p-5" style="background-color: rgba(255, 255, 255, 0.8); min-height: 100%;"> <div class="row mt-3 mb-2 d-flex justify-content-center"> <div class="col-sm-6" style="margin-bottom: 10px;"> @@ -12,9 +15,10 @@ <div class="panel-footer row"><!-- panel-footer --> <div class="col-xs-6 text-center"> <div> - <button type="button" class="btn btn-default btn-lg" mat-raised-button color="primary" (click)="deleteThisDataset(dataset)">Obriši - <span class="glyphicon glyphicon-chevron-right"></span> - </button> + <div> + <button (click)="deleteThisDataset(dataset)" mat-raised-button color="warn" style="min-width: 10rem;float: right" ><mat-icon>delete</mat-icon></button> + </div> + </div> </div> </div><!-- end panel-footer --> @@ -24,6 +28,7 @@ <h2>Nema rezultata</h2> </div> </div> + </div> diff --git a/frontend/src/app/_pages/my-datasets/my-datasets.component.ts b/frontend/src/app/_pages/my-datasets/my-datasets.component.ts index 1551a3c8..19a6832b 100644 --- a/frontend/src/app/_pages/my-datasets/my-datasets.component.ts +++ b/frontend/src/app/_pages/my-datasets/my-datasets.component.ts @@ -5,6 +5,7 @@ import Dataset from 'src/app/_data/Dataset'; import { JwtHelperService } from '@auth0/angular-jwt'; import { CookieService } from 'ngx-cookie-service'; import shared from 'src/app/Shared'; +import { share } from 'rxjs'; @Component({ selector: 'app-my-datasets', @@ -41,17 +42,17 @@ export class MyDatasetsComponent implements OnInit { */ deleteThisDataset(dataset: Dataset): void{ - console.log("OK"); + shared.openYesNoDialog('Brisanje seta podataka','Da li ste sigurni da želite da obrišete ovaj set podataka?',() => { this.datasetsS.deleteDataset(dataset).subscribe((response) => { console.log("OBRISANO JE", response); //na kraju uspesnog this.getAllMyDatasets(); }, (error) =>{ if (error.error == "Dataset with name = {name} deleted") { - alert("Greška pri brisanju dataseta!"); + shared.openDialog("Greška","Greška pri brisanju dataseta!"); } }); - + }); } getAllMyDatasets(): void{ @@ -61,5 +62,6 @@ deleteThisDataset(dataset: Dataset): void{ console.log(this.myDatasets); }); } + } diff --git a/frontend/src/app/_pages/my-models/my-models.component.css b/frontend/src/app/_pages/my-models/my-models.component.css index e69de29b..19d29595 100644 --- a/frontend/src/app/_pages/my-models/my-models.component.css +++ b/frontend/src/app/_pages/my-models/my-models.component.css @@ -0,0 +1,12 @@ +button{ + margin-left: 5%; + margin-right: 5%; +} +#header { + background-color: #003459; + padding-top: 20px; + padding-bottom: 15px; + text-align: center; + color: white; + border-radius: 5px; +}
\ No newline at end of file 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 4aebc1f2..b0e9c4ef 100644 --- a/frontend/src/app/_pages/my-models/my-models.component.html +++ b/frontend/src/app/_pages/my-models/my-models.component.html @@ -1,5 +1,8 @@ +<div id="header"> + <h1>Moji modeli</h1> +</div> <div id="wrapper"> - <div id="container" class="container p-5" style="background-color: white; min-height: 100%;"> + <div id="container" class="container p-5" style="background-color: rgba(255, 255, 255, 0.8); min-height: 100%;"> <div class="row mt-3 mb-2 d-flex justify-content-center"> <div class="col-sm-6" style="margin-bottom: 10px;"> @@ -12,12 +15,12 @@ <div class="panel-footer row"><!-- panel-footer --> <div class="col-xs-6 text-center"> <div> - <button type="button" class="btn btn-default btn-lg" (click)="deleteThisModel(model)" mat-raised-button color="primary">Koristi - <span class="glyphicon glyphicon-search"></span> - </button> - <button type="button" class="btn btn-default btn-lg" mat-raised-button color="primary" (click)="deleteThisModel(model)">Obriši - <span class="glyphicon glyphicon-chevron-right"></span> - </button> + <button type="button" class="btn btn-default btn-lg"style="min-width: 7rem;float: left;" (click)="deleteThisModel(model)" mat-raised-button color="primary">Koristi + <span class="glyphicon glyphicon-search"></span> + </button> + <button (click)="deleteThisModel(model)" mat-raised-button color="warn" style="min-width: 7rem;float: right" ><mat-icon>delete</mat-icon></button> + + </div> </div> </div><!-- end panel-footer --> 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 6086b1b1..f3877e2d 100644 --- a/frontend/src/app/_pages/my-models/my-models.component.ts +++ b/frontend/src/app/_pages/my-models/my-models.component.ts @@ -32,7 +32,7 @@ export class MyModelsComponent implements OnInit { */ deleteThisModel(model: Model): void{ - console.log("OK"); + shared.openYesNoDialog('Brisanje seta podataka','Da li ste sigurni da želite da obrišete model?',() => { this.modelsS.deleteModel(model).subscribe((response) => { console.log("OBRISANOOO JEE", response); //na kraju uspesnog @@ -42,9 +42,10 @@ deleteThisModel(model: Model): void{ shared.openDialog("Obaveštenje", "Greška prilikom brisanja modela."); } }); - + }); } + getAllMyModels(): void{ this.modelsS.getMyModels().subscribe(m => { diff --git a/frontend/src/app/_pages/my-predictors/my-predictors.component.html b/frontend/src/app/_pages/my-predictors/my-predictors.component.html index 3746d35e..d38f93e4 100644 --- a/frontend/src/app/_pages/my-predictors/my-predictors.component.html +++ b/frontend/src/app/_pages/my-predictors/my-predictors.component.html @@ -1,7 +1,7 @@ <div id="header"> <h1>Trenirani modeli</h1> </div> -<div id="container" style="background-color:rgba(255, 255, 255, 0.747);"> +<div id="container" style="background-color:rgba(255, 255, 255, 0.8);"> <div class="row" *ngFor="let predictor of predictors"> <div class="left"> <app-item-predictor [predictor]="predictor"></app-item-predictor> |