Fix for platforms and adapters

This commit is contained in:
piotrpekala7 2020-06-03 14:22:37 +02:00
parent 6bf268b47f
commit de0454f420
2 changed files with 18 additions and 5 deletions

View File

@ -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() {

View File

@ -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