Skip to content

Commit

Permalink
Resoleve web-ui seems to not send the correct custom adapters list we…
Browse files Browse the repository at this point in the history
…bui custom network adapter option for node #1339
  • Loading branch information
rajnikantsolarwinds committed Oct 17, 2022
1 parent 88f4455 commit 9f61f03
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export class CustomAdaptersTableComponent {
let adapter: CustomAdapter = {
adapter_number: this.adapters.length,
adapter_type: this.networkTypes[0],
mac_address:null,
port_name:null
};
this.adapters = this.adapters.concat([adapter]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export class CustomAdaptersComponent {
this.adapters.push({
adapter_number: n.adapter_number,
adapter_type: n.adapter_type,
mac_address:n.mac_address,
port_name:n.port_name
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
this.customAdaptersConfigurator.adapters.push({
adapter_number: adapter.adapter_number,
adapter_type: adapter.adapter_type,
mac_address:adapter.mac_address,
port_name:adapter.port_name
});
});
}
Expand All @@ -128,6 +130,8 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
this.qemuTemplate.custom_adapters.push({
adapter_number: i,
adapter_type: 'e1000',
mac_address:'',
port_name:''
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
this.customAdaptersConfigurator.adapters.push({
adapter_number: adapter.adapter_number,
adapter_type: adapter.adapter_type,
mac_address:adapter.mac_address,
port_name:adapter.port_name

});
});
}
Expand All @@ -109,6 +112,8 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
this.virtualBoxTemplate.custom_adapters.push({
adapter_number: i,
adapter_type: 'e1000',
mac_address:'',
port_name:''
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export class VmwareTemplateDetailsComponent implements OnInit {
this.customAdaptersConfigurator.adapters.push({
adapter_number: adapter.adapter_number,
adapter_type: adapter.adapter_type,
mac_address:adapter.mac_address,
port_name:adapter.port_name
});
});
}
Expand All @@ -115,6 +117,8 @@ export class VmwareTemplateDetailsComponent implements OnInit {
this.vmwareTemplate.custom_adapters.push({
adapter_number: i,
adapter_type: 'e1000',
mac_address:'',
port_name:''
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
onSaveClick() {
if (this.generalSettingsForm.valid) {
this.node.custom_adapters = [];
this.customAdapters.adapters.forEach((n) => {
this.customAdapters.adapters.forEach((n,i) => {
this.node.custom_adapters.push({
adapter_number: n.adapter_number,
adapter_type: n.adapter_type,
mac_address: n.mac_address ?? n.mac_address,
port_name: n.port_name ?? this.node.port_name_format.replace('{0}',`${i}`)
});
});

Expand Down
3 changes: 3 additions & 0 deletions src/app/models/qemu/qemu-custom-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export class CustomAdapter {
adapter_number: number;
adapter_type: string;
mac_address:string;
port_name: string;
}

0 comments on commit 9f61f03

Please sign in to comment.