mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-13 21:32:55 +00:00
Resolve Allow Virtualbox, VMware and Docker templates to be created issue but not fully tested
This commit is contained in:
parent
b430ab9a1c
commit
1d75fefb68
@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DockerImage } from '../models/docker/docker-image';
|
||||
import { Server } from '../models/server';
|
||||
@ -18,7 +19,7 @@ export class DockerService {
|
||||
}
|
||||
|
||||
getImages(server: Server): Observable<DockerImage[]> {
|
||||
return this.httpServer.get<DockerImage[]>(server, '/compute/docker/images') as Observable<DockerImage[]>;
|
||||
return this.httpServer.get<DockerImage[]>(server, `/computes/${environment.compute_id}/docker/images`) as Observable<DockerImage[]>;
|
||||
}
|
||||
|
||||
addTemplate(server: Server, dockerTemplate: any): Observable<any> {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Server } from '../models/server';
|
||||
import { VirtualBoxTemplate } from '../models/templates/virtualbox-template';
|
||||
@ -37,6 +38,6 @@ export class VirtualBoxService {
|
||||
}
|
||||
|
||||
getVirtualMachines(server: Server): Observable<VirtualBoxVm[]> {
|
||||
return this.httpServer.get<VirtualBoxVm[]>(server, '/compute/virtualbox/vms') as Observable<VirtualBoxVm[]>;
|
||||
return this.httpServer.get<VirtualBoxVm[]>(server, `/computes/${environment.compute_id}/virtualbox/vms`) as Observable<VirtualBoxVm[]>;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'environments/environment';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Server } from '../models/server';
|
||||
import { VmwareTemplate } from '../models/templates/vmware-template';
|
||||
@ -30,6 +31,6 @@ export class VmwareService {
|
||||
}
|
||||
|
||||
getVirtualMachines(server: Server): Observable<VmwareVm[]> {
|
||||
return this.httpServer.get<VmwareVm[]>(server, '/compute/vmware/vms') as Observable<VmwareVm[]>;
|
||||
return this.httpServer.get<VmwareVm[]>(server, `/computes/${environment.vm_compute_id}/vmware/vms`) as Observable<VmwareVm[]>;
|
||||
}
|
||||
}
|
||||
|
@ -2,5 +2,7 @@ export const environment = {
|
||||
solarputty_download_url: '',
|
||||
production: true,
|
||||
electron: true,
|
||||
current_version:'v3'
|
||||
current_version:'v3',
|
||||
compute_id:'local',
|
||||
vm_compute_id:'vm'
|
||||
};
|
||||
|
@ -2,5 +2,7 @@ export const environment = {
|
||||
production: false,
|
||||
electron: true,
|
||||
solarputty_download_url: '',
|
||||
current_version:'v3'
|
||||
current_version:'v3',
|
||||
compute_id:'local',
|
||||
vm_compute_id:'vm'
|
||||
};
|
||||
|
@ -3,5 +3,7 @@ export const environment = {
|
||||
electron: false,
|
||||
githubio: true,
|
||||
solarputty_download_url: '',
|
||||
current_version:'v3'
|
||||
current_version:'v3',
|
||||
compute_id:'local',
|
||||
vm_compute_id:'vm'
|
||||
};
|
||||
|
@ -3,5 +3,7 @@ export const environment = {
|
||||
electron: false,
|
||||
githubio: false,
|
||||
solarputty_download_url: '',
|
||||
current_version:'v3'
|
||||
current_version:'v3',
|
||||
compute_id:'local',
|
||||
vm_compute_id:'vm'
|
||||
};
|
||||
|
@ -7,7 +7,9 @@ export const environment = {
|
||||
electron: false,
|
||||
githubio: false,
|
||||
solarputty_download_url: '',
|
||||
current_version:'v3'
|
||||
current_version:'v3',
|
||||
compute_id:'local',
|
||||
vm_compute_id:'vm'
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user