From 4d27a748165be62e41c8bb8b6e2c3684e30391c4 Mon Sep 17 00:00:00 2001 From: Hannes Hansen Date: Tue, 7 Nov 2023 14:12:02 +0100 Subject: [PATCH] changed deployment start stop process --- .../confirm-dialog.component.css | 0 .../confirm-dialog.component.html | 7 + .../confirm-dialog.component.spec.ts | 21 ++ .../confirm-dialog.component.ts | 28 +++ .../main-navigation.component.html | 6 +- src/app/core/core.module.ts | 6 +- src/app/core/services/api/api.service.ts | 6 +- .../module-manager-mock.service.ts | 27 ++- .../module-manager-service.service.ts | 47 ++++- src/app/core/services/util/util.service.ts | 9 +- src/app/deployments/deployments.module.ts | 2 + .../pages/list/deployment-list.component.html | 69 ++++++- .../pages/list/deployment-list.component.ts | 190 +++++++++++++++--- src/app/jobs/list/list.component.html | 8 +- 14 files changed, 365 insertions(+), 61 deletions(-) create mode 100644 src/app/core/components/confirm-dialog/confirm-dialog.component.css create mode 100644 src/app/core/components/confirm-dialog/confirm-dialog.component.html create mode 100644 src/app/core/components/confirm-dialog/confirm-dialog.component.spec.ts create mode 100644 src/app/core/components/confirm-dialog/confirm-dialog.component.ts diff --git a/src/app/core/components/confirm-dialog/confirm-dialog.component.css b/src/app/core/components/confirm-dialog/confirm-dialog.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/core/components/confirm-dialog/confirm-dialog.component.html b/src/app/core/components/confirm-dialog/confirm-dialog.component.html new file mode 100644 index 0000000..56e14fa --- /dev/null +++ b/src/app/core/components/confirm-dialog/confirm-dialog.component.html @@ -0,0 +1,7 @@ + diff --git a/src/app/core/components/confirm-dialog/confirm-dialog.component.spec.ts b/src/app/core/components/confirm-dialog/confirm-dialog.component.spec.ts new file mode 100644 index 0000000..cf09cfd --- /dev/null +++ b/src/app/core/components/confirm-dialog/confirm-dialog.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmDialogComponent } from './confirm-dialog.component'; + +describe('ConfirmDialogComponent', () => { + let component: ConfirmDialogComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ConfirmDialogComponent] + }); + fixture = TestBed.createComponent(ConfirmDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/core/components/confirm-dialog/confirm-dialog.component.ts b/src/app/core/components/confirm-dialog/confirm-dialog.component.ts new file mode 100644 index 0000000..ebd8392 --- /dev/null +++ b/src/app/core/components/confirm-dialog/confirm-dialog.component.ts @@ -0,0 +1,28 @@ +import { Component, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; + +@Component({ + selector: 'app-confirm-dialog', + templateUrl: './confirm-dialog.component.html', + styleUrls: ['./confirm-dialog.component.css'] +}) +export class ConfirmDialogComponent { + message!: string + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) data: any + ) { + this.message = data.message + } + + cancel() { + this.dialogRef.close(false) + } + + confirm() { + this.dialogRef.close(true) + + } +} + diff --git a/src/app/core/components/main-navigation/main-navigation.component.html b/src/app/core/components/main-navigation/main-navigation.component.html index 8f8168d..439656e 100644 --- a/src/app/core/components/main-navigation/main-navigation.component.html +++ b/src/app/core/components/main-navigation/main-navigation.component.html @@ -2,13 +2,13 @@
  • - -