File tree Expand file tree Collapse file tree
client/WEB-INF/classes/resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17+ label.switch.type =Switch Type
1718label.service.state =Service State
1819label.egress.default.policy =Egress Default Policy
1920label.routing =Routing
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ under the License.
2525<% long now = System . currentTimeMillis(); % >
2626<script language =" javascript" >
2727dictionary = {
28+ ' label.switch.type' : ' <fmt:message key="label.switch.type" />' ,
2829' label.service.state' : ' <fmt:message key="label.service.state" />' ,
2930' label.egress.default.policy' : ' <fmt:message key="label.egress.default.policy" />' ,
3031' label.routing' : ' <fmt:message key="label.routing" />' ,
Original file line number Diff line number Diff line change 295295 var trafficData = $trafficType . data ( 'traffic-type-data' ) ?
296296 $trafficType . data ( 'traffic-type-data' ) : { } ;
297297 var hypervisor = getData ( $trafficType . closest ( '.zone-wizard' ) ) . zone . hypervisor ;
298+ var fields = {
299+ label : {
300+ label : hypervisor + ' ' + _l ( 'label.traffic.label' ) ,
301+ defaultValue : trafficData . label
302+ }
303+ } ;
304+
305+ if ( hypervisor === 'VMware' ) {
306+ $ . extend ( fields , {
307+ vlanid : { label : 'VLAN ID' } ,
308+ switchType : {
309+ label : 'label.switch.type' ,
310+ select : function ( args ) {
311+ args . response . success ( {
312+ data : [
313+ { id : 'vmwaresvs' , description : 'VMware SVS' } ,
314+ { id : 'vmwaredvs' , description : 'VMware DVS' } ,
315+ { id : 'nexusdvs' , description : 'Nexus DVS' }
316+ ]
317+ } ) ;
318+ }
319+ }
320+ } ) ;
321+ }
298322
299323 cloudStack . dialog . createForm ( {
300324 form : {
301325 title : _l ( 'label.edit.traffic.type' ) ,
302326 desc : _l ( 'message.edit.traffic.type' ) ,
303- fields : {
304- label : {
305- label : hypervisor + ' ' + _l ( 'label.traffic.label' ) ,
306- defaultValue : trafficData . label
307- }
308- }
327+ fields : fields
309328 } ,
310329
311330 after : function ( args ) {
You can’t perform that action at this time.
0 commit comments