Skip to content

Commit

Permalink
Related-Bug: #1462613
Browse files Browse the repository at this point in the history
Interface name formatting in Interfaces tab under vRouter details page
1. Don't show "default-global-system-config" and display interface name
   like
   a. "ns15ovstap3lif (ovs-vm113:ns15ovstap3)" for logical ports
   b. "ns10ovstap1 (ovs-vm100)" for physical ports
2. Show "IP Adress" column as empty if there are no IP Addresses
   associated with that interface

Change-Id: Iecb17ad9015b0dd28d1e426609f7d3e95775b5aa
  • Loading branch information
knagakiran committed Jun 17, 2015
1 parent aa13f4d commit 9b20972
Showing 1 changed file with 16 additions and 2 deletions.
Expand Up @@ -52,12 +52,26 @@ monitorInfraComputeInterfacesClass = (function() {
dispVMName = '';
}
obj['dispName'] = obj['name'];
if(new RegExp(/logical-port|remote-physical-port/).test(obj['type'])) {
if(new RegExp(/remote-physical-port/).test(obj['type'])) {
var parts = obj['name'].split(":");
if(parts.length == 3){
if(parts.length == 3) {
if(parts[0] == 'default-global-system-config') {
obj['dispName'] = contrail.format('{0}<br/> ({1})',parts[2],parts[1]);
} else {
obj['dispName'] = contrail.format('{0}<br/> ({1}:{2})',parts[2],parts[0],parts[1]);
}
}
}
if(new RegExp(/logical-port/).test(obj['type'])) {
var parts = obj['name'].split(":");
if(parts.length == 4) {
if(parts[0] == 'default-global-system-config') {
obj['dispName'] = contrail.format('{0}<br/> ({1}:{2})',parts[3],parts[1],parts[2]);
} else {
obj['dispName'] = contrail.format('{0}<br/> ({1}:{2}:{3})',parts[3],parts[0],parts[1],parts[2]);
}
}
}
if(new RegExp(/vport|logical-port|remote-physical-port/).test(obj['type'])) {
if(obj.fip_list != null) {
var fipList = [];
Expand Down

0 comments on commit 9b20972

Please sign in to comment.