mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-31 08:25:35 +00:00
Update for appliances
This commit is contained in:
parent
6f991e4885
commit
b32fdf4fc2
@ -106,6 +106,7 @@
|
||||
|
||||
<div>
|
||||
<button mat-button matStepperPrevious>Back</button>
|
||||
<button mat-button [hidden]="action!=='install'" (click)="updateAppliances()">Update from online registry</button>
|
||||
<button mat-button (click)="onCloseClick()">Cancel</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
|
@ -168,6 +168,12 @@ export class NewTemplateDialogComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
updateAppliances() {
|
||||
this.applianceService.updateAppliances(this.server).subscribe((appliances) => {
|
||||
this.appliances = appliances;
|
||||
})
|
||||
}
|
||||
|
||||
refreshImages() {
|
||||
this.qemuService.getImages(this.server).subscribe((qemuImages) => {
|
||||
this.qemuImages = qemuImages;
|
||||
|
@ -21,4 +21,8 @@ export class ApplianceService {
|
||||
getUploadPath(server: Server, emulator: string, filename: string) {
|
||||
return `http://${server.host}:${server.port}/v2/compute/${emulator}/images/${filename}`;
|
||||
}
|
||||
|
||||
updateAppliances(server: Server): Observable<Appliance[]> {
|
||||
return this.httpServer.get<Appliance[]>(server, '/appliances?update=yes') as Observable<Appliance[]>;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user