1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #5839: Fix vnet creation in sunstone (#2392)

when changing the network mode
This commit is contained in:
Frederick Borges 2022-12-05 11:25:24 +01:00 committed by GitHub
parent 8bd2665ebf
commit 7c02f13eb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -143,7 +143,7 @@ define(function(require) {
$("div.mode_param [wizard_field]", context).prop("wizard_field_disabled", true);
$("input#vn_mad", context).removeAttr("required").removeAttr("value");
$("#vcenter_switch_name", context).removeAttr("required");
$("#vcenter_cluster_id", context).removeAttr("required");
$("#vcenter_cluster_id select", context).removeAttr("required");
$("#phydev", context).removeAttr("required");
$(".sec_groups_datatable", context).show();
$("#vnetCreateSecurityTab-label").show();
@ -153,6 +153,12 @@ define(function(require) {
$("select#nsx-transport", context).removeAttr("required").removeAttr("value");
$("select#nsx-instance-id", context).removeAttr("required").removeAttr("value");
$("select#nsx-host-id", context).removeAttr("required").removeAttr("value");
// vCenter
$("div.mode_param.vcenter", context).hide();
$("div.mode_param.vcenter [wizard_field]", context).prop("wizard_field_disabled", true);
$("input#bridge", context).removeAttr("value");
switch ($(this).find("option:selected").attr("data-form")) {
case "bridge":
$("div.mode_param.bridge", context).show();

View File

@ -139,13 +139,18 @@ define(function(require) {
$("input#vn_mad", context).removeAttr("required");
$("input#vn_mad", context).removeAttr("value");
$("#vcenter_switch_name", context).removeAttr("required");
$("#vcenter_cluster_id", context).removeAttr("required");
$("#vcenter_cluster_id select", context).removeAttr("required");
$("#phydev", context).removeAttr("required");
$(".sec_groups_datatable", context).show();
$("#vntemplateCreateSecurityTab-label").show();
$("#automatic_vlan_id option[value='NO']", context).show();
$("input[wizard_field=\"VLAN_ID\"]", context).removeAttr("required");
// vCenter
$("div.mode_param.vcenter", context).hide();
$("div.mode_param.vcenter [wizard_field]", context).prop("wizard_field_disabled", true);
$("input#bridge", context).removeAttr("value");
switch ($(this).val()) {
case "bridge":
$("div.mode_param.bridge", context).show();