Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Refactor SubnetConfig"
[controller.git]
/
opendaylight
/
web
/
devices
/
src
/
main
/
resources
/
js
/
page.js
diff --git
a/opendaylight/web/devices/src/main/resources/js/page.js
b/opendaylight/web/devices/src/main/resources/js/page.js
index 3fd292bdf263c9954e8e5076466666eb25e9e3a7..813df23f8254753dab7132df8aa4667b459f56fd 100644
(file)
--- a/
opendaylight/web/devices/src/main/resources/js/page.js
+++ b/
opendaylight/web/devices/src/main/resources/js/page.js
@@
-680,7
+680,11
@@
one.f.switchmanager.subnetGatewayConfig = {
one.f.switchmanager.subnetGatewayConfig.registry['currentNode'] = node;
var $ports = $('#' + one.f.switchmanager.subnetGatewayConfig.id.modal.form.ports);
var ports = nodeports[node];
one.f.switchmanager.subnetGatewayConfig.registry['currentNode'] = node;
var $ports = $('#' + one.f.switchmanager.subnetGatewayConfig.id.modal.form.ports);
var ports = nodeports[node];
- one.lib.form.select.inject($ports, ports);
+ var options = {};
+ $(ports).each(function(idx, val) {
+ options[val.internalPortName] = val.portName+' ('+val.portId+')';
+ });
+ one.lib.form.select.inject($ports, options);
one.lib.form.select.prepend($ports, { '' : 'Please Select a Port' });
$ports.val($ports.find("option:first").val());
});
one.lib.form.select.prepend($ports, { '' : 'Please Select a Port' });
$ports.val($ports.find("option:first").val());
});
@@
-797,7
+801,7
@@
one.f.switchmanager.subnetGatewayConfig = {
},
{
property: 'nodePorts',
},
{
property: 'nodePorts',
- label: '
Node/
Ports',
+ label: 'Ports',
sortable: false
}
],
sortable: false
}
],
@@
-810,10
+814,9
@@
one.f.switchmanager.subnetGatewayConfig = {
var nodePorts = JSON.parse(json);
var nodePortHtml = "<div>";
$.each(nodePorts, function(index, nodePort) {
var nodePorts = JSON.parse(json);
var nodePortHtml = "<div>";
$.each(nodePorts, function(index, nodePort) {
- var nodePortID = nodePort["nodeId"] + "/" + nodePort["nodePortId"];
- nodePortHtml += nodePort["nodeName"] + " / " + nodePort["nodePortName"];
+ nodePortHtml += nodePort["nodePortName"] + " @ " + nodePort["nodeName"];
nodePortHtml += " ";
nodePortHtml += " ";
- nodePortHtml += '<a href="#" id=' + encodeURIComponent(nodePort
ID
) +
+ nodePortHtml += '<a href="#" id=' + encodeURIComponent(nodePort
["nodePortId"]
) +
' gatewayName=' + tableRow["name"] +
' onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Remove</a>';
nodePortHtml += "<br/>";
' gatewayName=' + tableRow["name"] +
' onclick="javascript:one.f.switchmanager.subnetGatewayConfig.actions.deleteNodePort(this);">Remove</a>';
nodePortHtml += "<br/>";
@@
-1327,7
+1330,11
@@
one.f.switchmanager.spanPortConfig = {
one.f.switchmanager.spanPortConfig.registry['currentNode'] = nodeId;
var $ports = $('#' + one.f.switchmanager.spanPortConfig.id.modal.form.port);
var ports = one.f.switchmanager.spanPortConfig.registry['nodePorts'][nodeId]
one.f.switchmanager.spanPortConfig.registry['currentNode'] = nodeId;
var $ports = $('#' + one.f.switchmanager.spanPortConfig.id.modal.form.port);
var ports = one.f.switchmanager.spanPortConfig.registry['nodePorts'][nodeId]
- one.lib.form.select.inject($ports, ports);
+ var options = {};
+ $(ports).each(function(idx, val) {
+ options[val.internalPortName] = val.portName+' ('+val.portId+')';
+ });
+ one.lib.form.select.inject($ports, options);
});
$fieldset.append($label).append($select);
});
$fieldset.append($label).append($select);