Display placeholder in installedsoftware, Ref: #361

This commit is contained in:
ziajka 2019-04-04 10:00:36 +02:00
parent 7b1371dff9
commit 88336ed9f7
3 changed files with 15 additions and 5 deletions

View File

@ -8,13 +8,21 @@
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
<mat-cell *matCellDef="let row;">{{ row.name }}</mat-cell>
<mat-cell *matCellDef="let row;">
<ng-container *ngIf="row.type !== 'adbutler'">
{{ row.name }}
</ng-container>
<ng-container *ngIf="row.type === 'adbutler'">
<app-adbutler></app-adbutler>
</ng-container>
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let row;" style="text-align: right">
<app-install-software [software]="row" (installedChanged)="onInstalled($event)"></app-install-software>
<app-install-software [software]="row" (installedChanged)="onInstalled($event)" *ngIf="row.type !== 'adbutler'"></app-install-software>
</mat-cell>
</ng-container>

View File

@ -47,7 +47,11 @@ export class InstalledSoftwareDataSource extends DataSource<any> {
disconnect() {}
refresh() {
this.installed.next(this.installedSoftwareService.list());
let installedSoftware = this.installedSoftwareService.list();
installedSoftware.push({
type: 'adbutler'
});
this.installed.next(installedSoftware);
}
}

View File

@ -55,7 +55,5 @@
</div>
<div class="buttons-bar"><button mat-raised-button color="primary" (click)="createModal()">Add server</button></div>
<app-adbutler></app-adbutler>
</div>
</div>