From de0454f420f78c0ded2280b6f59d8948661b350b Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Wed, 3 Jun 2020 14:22:37 +0200 Subject: [PATCH] Fix for platforms and adapters --- .../add-ios-template.component.ts | 18 ++++++++++++++---- src/app/services/ios-configuration.service.ts | 5 ++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.ts b/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.ts index 44af13c1..5447f498 100644 --- a/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.ts +++ b/src/app/components/preferences/dynamips/add-ios-template/add-ios-template.component.ts @@ -225,13 +225,23 @@ export class AddIosTemplateComponent implements OnInit { let name: string = this.iosImageForm.get("imageName").value.split('-')[0]; this.iosNameForm.controls['templateName'].setValue(name); - if (this.platforms.includes(name.split('-')[0])) { + if (name === 'c3620' || name === 'c3640' || name === 'c3660') { + this.iosNameForm.controls['platform'].setValue('c3600'); + this.selectedPlatform = 'c3600'; + } else { this.iosNameForm.controls['platform'].setValue(name); this.selectedPlatform = name; - - this.iosNameForm.controls['chassis'].setValue(''); - this.iosMemoryForm.controls['memory'].setValue(this.defaultRam[name]); } + + if (name === 'c1700') { + this.iosNameForm.controls['chassis'].setValue('1720'); + } else if (name === 'c2600') { + this.iosNameForm.controls['chassis'].setValue('2610'); + } else { + this.iosNameForm.controls['chassis'].setValue(''); + } + + this.iosMemoryForm.controls['memory'].setValue(this.defaultRam[name]); } onPlatformChosen() { diff --git a/src/app/services/ios-configuration.service.ts b/src/app/services/ios-configuration.service.ts index 408058a3..dd3f49c6 100644 --- a/src/app/services/ios-configuration.service.ts +++ b/src/app/services/ios-configuration.service.ts @@ -62,7 +62,10 @@ export class IosConfigurationService { "c1700": 128, "c2600": 128, "c2691": 256, - "c3600": 256, + "c3600": 192, + "c3620": 192, + "c3640": 192, + "c3660": 192, "c3725": 256, "c3745": 256, "c7200": 512