aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_pages/my-models
diff options
context:
space:
mode:
authorDanijel Anđelković <adanijel99@gmail.com>2022-04-23 01:28:46 +0200
committerDanijel Anđelković <adanijel99@gmail.com>2022-04-23 01:28:46 +0200
commit1177f4b29b616a59af39f4aef11b116f9660357d (patch)
tree36aaa26c5b78a2a5de9d86c6cde299b25f348091 /frontend/src/app/_pages/my-models
parentc8165d451b295ec610702b36fc05b8cc6047497b (diff)
Reorganizovao stranice i komponente.
Diffstat (limited to 'frontend/src/app/_pages/my-models')
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.css12
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.html43
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.spec.ts25
-rw-r--r--frontend/src/app/_pages/my-models/my-models.component.ts59
4 files changed, 0 insertions, 139 deletions
diff --git a/frontend/src/app/_pages/my-models/my-models.component.css b/frontend/src/app/_pages/my-models/my-models.component.css
deleted file mode 100644
index 19d29595..00000000
--- a/frontend/src/app/_pages/my-models/my-models.component.css
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644
index 9b281239..00000000
--- a/frontend/src/app/_pages/my-models/my-models.component.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<div id="header">
- <h1>Moji modeli</h1>
-</div>
-<div id="wrapper">
- <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;">
- </div>
-
- <div class="row">
- <div class="col-sm-4" style="margin-bottom: 10px;" *ngFor="let model of myModels">
- <app-item-model [model]="model"></app-item-model>
-
- <div class="panel-footer row"><!-- panel-footer -->
- <div class="col-xs-6 text-center">
- <div>
- <button type="button" class="btn btn-default btn-lg"style="min-width: 7rem;float: left;" (click)="useThisModel(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 -->
-
-
-
- </div>
- </div>
- <div class="text-center" *ngIf="this.myModels.length == 0" >
- <h2>Nema rezultata</h2>
- </div>
- </div>
-
- </div>
-
-
-
-
-
- </div>
diff --git a/frontend/src/app/_pages/my-models/my-models.component.spec.ts b/frontend/src/app/_pages/my-models/my-models.component.spec.ts
deleted file mode 100644
index e431d04c..00000000
--- a/frontend/src/app/_pages/my-models/my-models.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { MyModelsComponent } from './my-models.component';
-
-describe('MyModelsComponent', () => {
- let component: MyModelsComponent;
- let fixture: ComponentFixture<MyModelsComponent>;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- declarations: [ MyModelsComponent ]
- })
- .compileComponents();
- });
-
- beforeEach(() => {
- fixture = TestBed.createComponent(MyModelsComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/frontend/src/app/_pages/my-models/my-models.component.ts b/frontend/src/app/_pages/my-models/my-models.component.ts
deleted file mode 100644
index d379fa69..00000000
--- a/frontend/src/app/_pages/my-models/my-models.component.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import shared from 'src/app/Shared';
-import Model from 'src/app/_data/Model';
-import { ModelsService } from 'src/app/_services/models.service';
-
-@Component({
- selector: 'app-my-models',
- templateUrl: './my-models.component.html',
- styleUrls: ['./my-models.component.css']
-})
-export class MyModelsComponent implements OnInit {
- myModels: Model[] = [];
- //myModel: Model;
-
- constructor(private modelsS : ModelsService, private router : Router) {
-
-
-
- }
-
- ngOnInit(): void {
- this.getAllMyModels();
-
- }
-/*
- editModel(): void{
- this.modelsS.editModel().subscribe(m => {
- this.myModel = m;
-
- })
- }
-*/
-
-deleteThisModel(model: Model): void{
- shared.openYesNoDialog('Brisanje seta podataka','Da li ste sigurni da želite da obrišete model?',() => {
- this.modelsS.deleteModel(model).subscribe((response) => {
- this.getAllMyModels();
- }, (error) =>{
- if (error.error == "Model with name = {name} deleted") {
- shared.openDialog("Obaveštenje", "Greška prilikom brisanja modela.");
- }
- });
- });
-}
-
-
-useThisModel(model: Model): void{
-
- this.router.navigate(['/training'])
-
-}
- getAllMyModels(): void{
- this.modelsS.getMyModels().subscribe(m => {
- this.myModels = m;
- });
- }
-
-}