From 67754192ea100aadeef182e5f6d91f1f19171d18 Mon Sep 17 00:00:00 2001
From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com>
Date: Thu, 18 Jun 2020 10:08:21 +0200
Subject: [PATCH] Info dialog updated
---
.../appliance-info-dialog.component.html | 18 ++++++++++++++++--
.../appliance-info-dialog.component.ts | 2 ++
.../new-template-dialog.component.ts | 7 +++----
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.html b/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.html
index ab48bf44..756720fa 100644
--- a/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.html
+++ b/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.html
@@ -1,8 +1,22 @@
-
appliance name
+ {{appliance.name}}
- {{data.info}}
+
+ Vendor: {{appliance.vendor_name}}
+
+
+ Status: {{appliance.status}}
+
+
+ Maintainer: {{appliance.maintainer}}
+
+
+ Adapters: {{appliance.qemu.adapters}}
+
+
+ Console type: {{appliance.qemu.console_type}}
+
diff --git a/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.ts b/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.ts
index e97830db..069ade1b 100644
--- a/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.ts
+++ b/src/app/components/project-map/new-template-dialog/appliance-info-dialog/appliance-info-dialog.component.ts
@@ -1,11 +1,13 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { Appliance } from '../../../../models/appliance';
@Component({
selector: 'appliance-info-dialog',
templateUrl: 'appliance-info-dialog.component.html',
})
export class ApplianceInfoDialogComponent {
+ public appliance: Appliance;
constructor(
public dialogRef: MatDialogRef
,
diff --git a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts
index 1d7107bd..2bdc8cb5 100644
--- a/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts
+++ b/src/app/components/project-map/new-template-dialog/new-template-dialog.component.ts
@@ -155,12 +155,11 @@ export class NewTemplateDialogComponent implements OnInit {
}
showInfo(object: any) {
- console.log(object);
-
- this.dialog.open(ApplianceInfoDialogComponent, {
+ let dialogRef = this.dialog.open(ApplianceInfoDialogComponent, {
width: '250px',
- data: {info: 'info'}
+ data: {appliance: object}
});
+ dialogRef.componentInstance.appliance = object;
}
}