Info dialog updated

This commit is contained in:
piotrpekala7 2020-06-18 10:08:21 +02:00
parent c415011f34
commit 67754192ea
3 changed files with 21 additions and 6 deletions

View File

@ -1,8 +1,22 @@
<div class="title-container">
<h1 mat-dialog-title>appliance name</h1>
<h1 mat-dialog-title>{{appliance.name}}</h1>
</div>
<div mat-dialog-content>
{{data.info}}
<div>
Vendor: {{appliance.vendor_name}}
</div>
<div>
Status: {{appliance.status}}
</div>
<div>
Maintainer: {{appliance.maintainer}}
</div>
<div *ngIf="appliance.qemu">
Adapters: {{appliance.qemu.adapters}}
</div>
<div *ngIf="appliance.qemu">
Console type: {{appliance.qemu.console_type}}
</div>
</div>
<div mat-dialog-actions>
<button mat-button (click)="onNoClick()" tabindex="-1" color="accent">Close</button>

View File

@ -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<ApplianceInfoDialogComponent>,

View File

@ -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;
}
}