mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-23 16:57:50 +00:00
Fix install button apperance and prepare for installation support
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef></mat-header-cell>
|
||||
<mat-cell *matCellDef="let row;" style="text-align: right">
|
||||
<button mat-button color="primary" (click)="install(row)" disabled="row.installed">
|
||||
<button mat-button color="primary" (click)="install(row)" [disabled]="row.installed">
|
||||
<ng-container *ngIf="row.installed">Installed</ng-container>
|
||||
<ng-container *ngIf="!row.installed">Install</ng-container>
|
||||
</button>
|
||||
|
@ -20,6 +20,11 @@ export class InstalledSoftwareComponent implements OnInit {
|
||||
this.dataSource = new InstalledSoftwareDataSource(this.installedSoftwareService);
|
||||
}
|
||||
|
||||
install(software) {
|
||||
this.installedSoftwareService.install({
|
||||
type: 'web'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class InstalledSoftwareDataSource extends DataSource<any> {
|
||||
|
@ -28,4 +28,10 @@ export class InstalledSoftwareService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
install(software) {
|
||||
const installedSoftware = this.electronService.remote.require('./installed-software.js')
|
||||
.install(software);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user