g",SNOOPING:"snooping"},LinkDiscoveryOperation:{LISTEN:"listen",ADVERTISE:"advertise",BOTH:"both",DISABLED:"none"},LinkDiscoveryProtocol:{CDP:"cdp",LLDP:"lldp"},LacpSupport:{BASIC:"singleLag",ENHANCED:"multipleLag"},LacpMode:{ACTIVE:"active",PASSIVE:"passive"},ManageDvpgWizard:{DVPG_CONFIG_VERSION_PROP:"config.configVersion"},TcpIpStack:{DEFAULT_NET_STACK_KEY:"defaultTcpipStack",VMOTION_NET_STACK_KEY:"vmotion"}})}(),function(){"use strict";function e(e,t,i){function r(e,t,i){var r=Number(e[i]),n=Number(t[i]);return isNaN(r)&&isNaN(n)?0:isNaN(r)?-1:isNaN(n)?1:rn?1:0}function n(e,t,i){var n=Number(e[i]),o=Number(t[i]);return isNaN(n)||isNaN(o)?isNaN(n)&&!isNaN(o)?1:isNaN(o)&&!isNaN(n)?-1:e[i].localeCompare(t[i]):r(e,t,i)}function o(t){return t===y?e.getString("NetworkUi","NetworkUtil.vlanNone"):t===N?e.getString("NetworkUi","NetworkUtil.vlanAll",N):t?""+t:""}function a(e){var t=l(e);return t&&e>=0&&e<=N}function s(e){var i=l(e);return"undefined"!=typeof e&&i&&e>=t.Mtu.MIN&&e<=t.Mtu.MAX}function l(e,i,r){return i=i||0,r=r&&r<=t.MAX_SAFE_INTEGER?r:t.MAX_SAFE_INTEGER,t.POSITIVE_INTEGER_REG_EXP.test(e)&&i<=e&&e<=r}function c(t){return _.map(t,function(t){return{val:t,label:e.getString("NetworkUi","PortFailoverPolicyView."+t)}})}function p(e){return!!e&&P.test(e)}function d(e){if(!e)return!1;var t=e.split(".");return""===t[t.length-1]&&t.pop(),t.every(function(e){return e&&P.test(e)})}function g(){var t=Array.prototype.slice.call(arguments);return e.getString.apply(null,["NetworkUi"].concat(t))}function u(i,r){if(r.security){var n=i.section("security").title(e.getString("NetworkUi","PortgroupSettingsView.security"));n.property(e.getString("NetworkUi","PortSecurityPolicyView.promiscuousMode"),r.security.allowPromiscuous?e.getString("NetworkUi","PortSecurityPolicyView.accept"):e.getString("NetworkUi","PortSecurityPolicyView.reject")), n.property(e.getString("NetworkUi","PortSecurityPolicyView.mac"),r.security.macChanges?e.getString("NetworkUi","PortSecurityPolicyView.accept"):e.getString("NetworkUi","PortSecurityPolicyView.reject")),n.property(e.getString("NetworkUi","PortSecurityPolicyView.forgedTransmits"),r.security.forgedTransmits?e.getString("NetworkUi","PortSecurityPolicyView.accept"):e.getString("NetworkUi","PortSecurityPolicyView.reject"))}if(r.trafficShaping){var o=i.section("trafficShaping").title(e.getString("NetworkUi","PortgroupSettingsView.trafficShaping"));o.property(e.getString("NetworkUi","PortTrafficShapingPolicyView.avgBW"),v(r.trafficShaping.averageBandwidthSummary)),o.property(e.getString("NetworkUi","PortTrafficShapingPolicyView.peakBW"),v(r.trafficShaping.peakBandwidthSummary)),o.property(e.getString("NetworkUi","PortTrafficShapingPolicyView.burstSize"),v(r.trafficShaping.burstSizeSummary))}if(r.teamingAndFailover){var a=r.teamingAndFailover,s=i.section("teaming").title(e.getString("NetworkUi","PortgroupSettingsView.failover"));if(s.property(e.getString("NetworkUi","PortFailoverPolicyView.lbLabel"),w(a.loadBalancing)),a.loadBalancing===t.LoadBalancingPolicy.IP){var l=S(a);l&&s.warning(l),f().for/* Copyright 2016 VMware, Inc. All rights reserved. -- VMware Confidential */ /* * This js file has to be loaded first */ h5 = h5 || {}; h5.networkLibUi = { angularModule: angular.module('com.vmware.vsphere.client.networkLibUi', [ 'com.vmware.platform.ui']) }; /* Copyright 2016 VMware, Inc. All rights reserved. -- VMware Confidential */ (function() { 'use strict'; angular.module('com.vmware.vsphere.client.networkLibUi').service( 'dvsDetailsViewService', dvsDetailsViewService); dvsDetailsViewService.$inject = [ 'i18nService', 'vxPropertyViewService', 'networkUtil', 'networkUiConstants' ]; function dvsDetailsViewService ( i18nService, propertyViewService, networkUtil, networkUiConstants ) { return { build: build }; function build (dvsConfigDetailsData, isHostProxySwitchContext) { if (dvsConfigDetailsData) { var builder = propertyViewService.createPropertyViewBuilder(); var generalCategoryBuilder = builder .category("general") .title(i18nService.getString( 'NetworkUi', 'DvsConfigPage.general.title')); buildGeneralSection(dvsConfigDetailsData, isHostProxySwitchContext, generalCategoryBuilder); buildAdvancedSection(dvsConfigDetailsData, generalCategoryBuilder); buildDiscoveryProtocolSection(dvsConfigDetailsData, generalCategoryBuilder); buildAdminContactSection(dvsConfigDetailsData, generalCategoryBuilder); return builder.build(); } return {}; } function buildGeneralSection ( dvsConfigDetailsData, isHostProxySwitchContext, generalCategoryBuilder ) { // Create the general section var generalSectionTitle = i18nService.getString('NetworkUi', 'DvsConfigPage.general.title'); var generalSection = generalCategoryBuilder .section("generalSection").title(generalSectionTitle); if (dvsConfigDetailsData.name){ generalSection.property( networkUtil.getString('DvsConfigPage.general.body.name.label'), dvsConfigDetailsData.name); } if (dvsConfigDetailsData.description) { generalSection .property(i18nService.getString( 'NetworkUi', 'DvsConfigPage.general.body.notes.label'), dvsConfigDetailsData.description); } if (dvsConfigDetailsData.productVendor) { generalSection .property(networkUtil.getString( 'HostProxySwitchDetailsView.manufacturer'), dvsConfigDetailsData.productVendor); } if (dvsConfigDetailsData.productVersion) { generalSection .property(networkUtil.getString( 'HostProxySwitchDetailsView.version'), networkUtil.getString('SwitchDiagram.dvsVersionStringFormat', dvsConfigDetailsData.productVersion, dvsConfigDetailsData.productBuildNumber ? dvsConfigDetailsData.productBuildNumber : "")); } if (dvsConfigDetailsData.productBuildNumber) { generalSection .property(networkUtil.getString( 'HostProxySwitchDetailsView.version'), dvsConfigDetailsData.productVersion); } if (dvsConfigDetailsData.uplinkPorts) { generalSection .property(networkUtil.getString( 'DvsConfigPage.general.body.numberOfUplinks.label'), dvsConfigDetailsData.uplinkPorts); } if (!isHostProxySwitchContext && dvsConfigDetailsData.numberOfPorts) { generalSection .property(networkUtil.getString( 'DvsConfigPage.general.body.numberOfPorts.label'), dvsConfigDetailsData.numberOfPorts); } if (dvsConfigDetailsData.networkResourceManagementSupported) { generalSection .property(networkUtil.getString( 'DvsConfigPage.resmgmt.label'), getNiocStatus(