mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-17 14:28:13 +00:00
Update add-ios-template.component.ts
This commit is contained in:
@ -134,6 +134,7 @@ export class AddIosTemplateComponent implements OnInit {
|
|||||||
this.iosTemplate.image = this.iosImageForm.get("imageName").value;
|
this.iosTemplate.image = this.iosImageForm.get("imageName").value;
|
||||||
this.iosTemplate.name = this.iosNameForm.get('templateName').value;
|
this.iosTemplate.name = this.iosNameForm.get('templateName').value;
|
||||||
this.iosTemplate.platform = this.iosNameForm.get('platform').value;
|
this.iosTemplate.platform = this.iosNameForm.get('platform').value;
|
||||||
|
|
||||||
if (this.chassis[this.iosNameForm.get('platform').value]) this.iosTemplate.chassis = this.iosNameForm.get('chassis').value;
|
if (this.chassis[this.iosNameForm.get('platform').value]) this.iosTemplate.chassis = this.iosNameForm.get('chassis').value;
|
||||||
this.iosTemplate.ram = this.iosMemoryForm.get('memory').value;
|
this.iosTemplate.ram = this.iosMemoryForm.get('memory').value;
|
||||||
|
|
||||||
@ -155,14 +156,14 @@ export class AddIosTemplateComponent implements OnInit {
|
|||||||
|
|
||||||
completeAdaptersData() {
|
completeAdaptersData() {
|
||||||
if (this.chassis[this.iosTemplate.platform]) {
|
if (this.chassis[this.iosTemplate.platform]) {
|
||||||
if(Object.keys(this.networkAdapters[this.iosTemplate.platform])){
|
if(Object.keys(this.networkAdapters[this.iosTemplate.chassis])){
|
||||||
for(let i=0; i<Object.keys(this.networkAdapters[this.iosTemplate.platform]).length; i++){
|
for(let i=0; i<Object.keys(this.networkAdapters[this.iosTemplate.chassis]).length; i++){
|
||||||
if(!this.networkAdaptersForTemplate[i]) this.networkAdaptersForTemplate[i] = '';
|
if(!this.networkAdaptersForTemplate[i]) this.networkAdaptersForTemplate[i] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.platform])){
|
if(Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.chassis])){
|
||||||
for(let i=0; i<Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.platform]).length; i++){
|
for(let i=0; i<Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.chassis]).length; i++){
|
||||||
if(!this.networkAdaptersForTemplate[i]) this.networkAdaptersForTemplate[i] = '';
|
if(!this.networkAdaptersForTemplate[i]) this.networkAdaptersForTemplate[i] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user