mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-20 17:52:46 +00:00
Fix for network addapters c7200, c3725, c3745, c2691
This commit is contained in:
parent
7625ff5cfa
commit
6bf268b47f
@ -169,7 +169,7 @@ const routes: Routes = [
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', enableTracing: true, scrollPositionRestoration: 'enabled'})],
|
||||
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', enableTracing: false, scrollPositionRestoration: 'enabled'})],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
|
@ -88,7 +88,7 @@
|
||||
</form>
|
||||
</mat-step>
|
||||
<mat-step label="Network adapters">
|
||||
<div *ngIf="chassis[iosNameForm.get('platform').value]">
|
||||
<!-- <div *ngIf="chassis[iosNameForm.get('platform').value]">
|
||||
<div *ngFor="let index of [0,1,2,3,4,5,6,7]">
|
||||
<mat-select
|
||||
placeholder="Slot {{index}}"
|
||||
@ -100,8 +100,8 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="chassis[iosNameForm.get('platform').value]">
|
||||
</div> -->
|
||||
<div *ngIf="selectedPlatform">
|
||||
<div *ngFor="let index of [0,1,2,3,4,5,6,7]">
|
||||
<mat-select
|
||||
placeholder="Slot {{index}}"
|
||||
|
@ -28,6 +28,7 @@ export class AddIosTemplateComponent implements OnInit {
|
||||
iosImageForm: FormGroup;
|
||||
iosNameForm: FormGroup;
|
||||
iosMemoryForm: FormGroup;
|
||||
selectedPlatform: string;
|
||||
|
||||
networkAdaptersForTemplate: string[] = [];
|
||||
networkModulesForTemplate: string[] = [];
|
||||
@ -187,8 +188,8 @@ export class AddIosTemplateComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.chassis])){
|
||||
for(let i=0; i<Object.keys(this.networkAdaptersForPlatform[this.iosTemplate.chassis]).length; i++){
|
||||
if(this.networkAdaptersForPlatform[this.iosNameForm.get('platform').value]){
|
||||
for(let i=0; i<Object.keys(this.networkAdaptersForPlatform[this.iosNameForm.get('platform').value]).length; i++){
|
||||
if(!this.networkAdaptersForTemplate[i]) this.networkAdaptersForTemplate[i] = '';
|
||||
}
|
||||
}
|
||||
@ -226,6 +227,8 @@ export class AddIosTemplateComponent implements OnInit {
|
||||
|
||||
if (this.platforms.includes(name.split('-')[0])) {
|
||||
this.iosNameForm.controls['platform'].setValue(name);
|
||||
this.selectedPlatform = name;
|
||||
|
||||
this.iosNameForm.controls['chassis'].setValue('');
|
||||
this.iosMemoryForm.controls['memory'].setValue(this.defaultRam[name]);
|
||||
}
|
||||
|
@ -216,6 +216,33 @@ export class IosConfigurationService {
|
||||
}
|
||||
|
||||
getNetworkAdaptersForPlatform() {
|
||||
let networkAdaptersForPlatform = {};
|
||||
networkAdaptersForPlatform["c2691"] = {
|
||||
0: ["GT96100-FE"],
|
||||
1: this.c3700_nms
|
||||
};
|
||||
networkAdaptersForPlatform["c3725"] = {
|
||||
0: ["GT96100-FE"],
|
||||
1: this.c3700_nms,
|
||||
2: this.c3700_nms
|
||||
};
|
||||
networkAdaptersForPlatform["c3745"] = {
|
||||
0: ["GT96100-FE"],
|
||||
1: this.c3700_nms,
|
||||
2: this.c3700_nms,
|
||||
3: this.c3700_nms,
|
||||
4: this.c3700_nms
|
||||
};
|
||||
networkAdaptersForPlatform["c7200"] = {
|
||||
0: this.c7200_io,
|
||||
1: this.c7200_pas,
|
||||
2: this.c7200_pas,
|
||||
3: this.c7200_pas,
|
||||
4: this.c7200_pas,
|
||||
5: this.c7200_pas,
|
||||
6: this.c7200_pas
|
||||
};
|
||||
|
||||
return {
|
||||
"c2691": {
|
||||
0: ["GT96100-FE"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user