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

Conflicts:
	webroot/monitor/infra/vrouter/ui/js/monitor_infra_vrouter_interfaces.js

Change-Id: I72bff21eb5b737d8a408b74f03d68465213e4db0
  • Loading branch information
knagakiran committed Jun 17, 2015
1 parent 905b78e commit 3870510
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 3870510

Please sign in to comment.