Revision 9f1f5926

View differences:

src/sunstone/public/app/tabs/vnets-tab/form-panels/create.js
126 126
      $("div.mode_param [wizard_field]", context).prop('wizard_field_disabled', true);
127 127

  
128 128
      $('input#vn_mad', context).removeAttr('required');
129

  
129
      $('input#vn_mad', context).removeAttr('value');
130
      $('#vcenter_switch_name', context).removeAttr('required');
130 131
      switch ($(this).val()) {
131 132
      case "dummy":
132 133
        $("div.mode_param.dummy", context).show();
......
164 165

  
165 166
        $('input#bridge', context).attr('required', '');
166 167
        break;
168
      case "vcenter":
169
        $("div.mode_param.vcenter", context).show();
170
        $("div.mode_param.vcenter [wizard_field]", context).prop('wizard_field_disabled', false);
171
        $('input#bridge', context).attr('value', $('#name', context).val());
172
        $('#vcenter_switch_name', context).attr('required', '');
173
        $('input#vn_mad', context).attr('required', '');
174
        $('input#vn_mad', context).attr('value', 'vcenter');
175

  
176
        $('#div_vn_mad', context).hide();
177
        break;
167 178
      case "custom":
168 179
        $("div.mode_param.custom", context).show();
169 180
        $("div.mode_param.custom [wizard_field]", context).prop('wizard_field_disabled', false);
src/sunstone/public/app/tabs/vnets-tab/form-panels/create/wizard.hbs
87 87
            <option value="802.1Q">{{tr "802.1Q"}}</option>
88 88
            <option value="vxlan">{{tr "VXLAN"}}</option>
89 89
            <option value="ovswitch">{{tr "Open vSwitch"}}</option>
90
            <option value="vcenter">{{tr "vCenter"}}</option>
90 91
            <option value="custom">{{tr "Custom"}}</option>
91 92
          </select>
92 93
        </div>
93
        <div class="large-3 medium-6 columns mode_param custom">
94
        <div class="large-3 medium-6 columns mode_param vcenter custom" id="div_vn_mad">
94 95
          <label for="vn_mad">
95 96
            {{tr "Network Driver (VN_MAD)"}}
96 97
          </label>
......
115 116
          <div class="network_mode_description" value="ovswitch">
116 117
            {{tr "Open vSwitch, restrict network access with Open vSwitch Virtual Switch. Security Groups are not applied."}}
117 118
          </div>
119
          <div class="network_mode_description" value="vcenter">
120
            {{tr "vSphere standard switches or distributed switches with port groups. Security Groups are not applied."}}
121
          </div>
118 122
          <div class="network_mode_description" value="custom">
119 123
            {{tr "Custom, use a custom virtual network driver."}}
120 124
          </div>
......
139 143
        </div>
140 144
      </div>
141 145
      <div class="row">
142
        <div class="medium-3 columns left mode_param 8021Q vxlan ovswitch custom">
146
        <div class="medium-3 columns left mode_param 8021Q vxlan ovswitch vcenter custom">
143 147
          <label>
144 148
            {{tr "VLAN ID"}}
145 149
            <select wizard_field="AUTOMATIC_VLAN_ID">
......
159 163
          </label>
160 164
          <input type="text" wizard_field="PHYDEV" name="phydev" id="phydev" />
161 165
        </div>
162
        <div class="medium-3 columns left mode_param 8021Q vxlan custom">
166
        <div class="medium-3 columns left mode_param vcenter">
167
          <label for="phydev">
168
            {{tr "Physical device"}}
169
            <span class="tip">
170
              {{tr "Physical NIC names for uplinks. Use comma to separate values (e.g vmnic1,vmnic2)"}}
171
            </span>
172
          </label>
173
          <input type="text" wizard_field="PHYDEV" name="phydev" id="phydev" />
174
        </div>
175
        <div class="medium-3 columns left mode_param 8021Q vxlan vcenter custom">
163 176
          <label for="mtu">
164 177
            {{tr "MTU of the interface"}}
165 178
          </label>
166 179
          <input type="text" wizard_field="MTU" name="mtu" id="mtu" />
167 180
        </div>
168 181
      </div>
182
      <div class="row">
183
        <div class="medium-3 columns left mode_param vcenter">
184
          <label for="vcenter_switch_name">
185
            {{tr "Switch name"}}
186
          </label>
187
          <input type="text" wizard_field="VCENTER_SWITCH_NAME" name="vcenter_switch_name" id="vcenter_switch_name" />
188
        </div>
189
        <div class="medium-3 columns left mode_param vcenter">
190
          <label>
191
            {{tr "Number of ports"}}
192
          </label>
193
          <input type="number" wizard_field="VCENTER_SWITCH_NPORTS" name="vcenter_switch_nports" id="vcenter_switch_nports" />
194
        </div>
195
        <div class="medium-3 columns left mode_param vcenter">
196
          <label>
197
            {{tr "Port group type"}}
198
            <select wizard_field="VCENTER_PORTGROUP_TYPE">
199
              <option value="Port Group">{{tr "Port group"}}</option>
200
              <option value="Distributed Port Group">{{tr "Distributed Port Group"}}</option>
201
            </select>
202
          </label>
203
        </div>
204
      </div>
169 205
    </div>
170 206
    <div class="tabs-panel" id="vnetCreateARTab">
171 207
      <div class="row collapse" id="vnetCreateARTabCreate">

Also available in: Unified diff