mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-154: Show network details for virtual router
-Adds new NICs tab, to display network information for each router NIC, including network name -Show guest network ID field on router details tab
This commit is contained in:
parent
11acc208d2
commit
951c124166
@ -17,8 +17,8 @@
|
||||
|
||||
|
||||
#new labels (begin) **********************************************************************************************
|
||||
|
||||
|
||||
label.isolation.uri=Isolation URI
|
||||
label.broadcast.uri=Broadcast URI
|
||||
#new labels (end) ************************************************************************************************
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,8 @@ under the License.
|
||||
<% long now = System.currentTimeMillis(); %>
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'label.broadcast.uri': '<fmt:message key="label.broadcast.uri"/>',
|
||||
'label.isolation.uri': '<fmt:message key="label.isolation.uri"/>',
|
||||
'message.zoneWizard.enable.local.storage': '<fmt:message key="message.zoneWizard.enable.local.storage"/>',
|
||||
'label.edit.tags': '<fmt:message key="label.edit.tags"/>',
|
||||
'label.local.storage.enabled': '<fmt:message key="label.local.storage.enabled"/>',
|
||||
|
||||
@ -2255,6 +2255,7 @@
|
||||
id: { label: 'label.id' },
|
||||
projectid: { label: 'label.project.id' },
|
||||
state: { label: 'label.state' },
|
||||
guestnetworkid: { label: 'label.network.id' },
|
||||
publicip: { label: 'label.public.ip' },
|
||||
guestipaddress: { label: 'label.guest.ip' },
|
||||
linklocalip: { label: 'label.linklocal.ip' },
|
||||
@ -2286,6 +2287,47 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
nics: {
|
||||
title: 'label.nics',
|
||||
multiple: true,
|
||||
fields: [
|
||||
{
|
||||
name: { label: 'label.name', header: true },
|
||||
type: { label: 'label.type' },
|
||||
traffictype: { label: 'label.traffic.type' },
|
||||
networkname: { label: 'label.network.name' },
|
||||
netmask: { label: 'label.netmask' },
|
||||
ipaddress: { label: 'label.ip.address' },
|
||||
id: { label: 'label.id' },
|
||||
networkid: { label: 'label.network.id' },
|
||||
isolationuri: { label: 'label.isolation.uri' },
|
||||
broadcasturi: { label: 'label.broadcast.uri' }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listRouters&id=" + args.context.routers[0].id),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listroutersresponse.router[0].nic;
|
||||
|
||||
args.response.success({
|
||||
actionFilter: routerActionfilter,
|
||||
data: $.map(jsonObj, function(nic, index) {
|
||||
var name = 'NIC ' + (index + 1);
|
||||
if (nic.isdefault) {
|
||||
name += ' (' + _l('label.default') + ')';
|
||||
}
|
||||
return $.extend(nic, {
|
||||
name: name
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5176,6 +5218,7 @@
|
||||
id: { label: 'label.id' },
|
||||
projectid: { label: 'label.project.id' },
|
||||
state: { label: 'label.state' },
|
||||
guestnetworkid: { label: 'label.network.id' },
|
||||
publicip: { label: 'label.public.ip' },
|
||||
guestipaddress: { label: 'label.guest.ip' },
|
||||
linklocalip: { label: 'label.linklocal.ip' },
|
||||
@ -5208,6 +5251,47 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
nics: {
|
||||
title: 'label.nics',
|
||||
multiple: true,
|
||||
fields: [
|
||||
{
|
||||
name: { label: 'label.name', header: true },
|
||||
type: { label: 'label.type' },
|
||||
traffictype: { label: 'label.traffic.type' },
|
||||
networkname: { label: 'label.network.name' },
|
||||
netmask: { label: 'label.netmask' },
|
||||
ipaddress: { label: 'label.ip.address' },
|
||||
id: { label: 'label.id' },
|
||||
networkid: { label: 'label.network.id' },
|
||||
isolationuri: { label: 'label.isolation.uri' },
|
||||
broadcasturi: { label: 'label.broadcast.uri' }
|
||||
}
|
||||
],
|
||||
dataProvider: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("listRouters&id=" + args.context.routers[0].id),
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listroutersresponse.router[0].nic;
|
||||
|
||||
args.response.success({
|
||||
actionFilter: routerActionfilter,
|
||||
data: $.map(jsonObj, function(nic, index) {
|
||||
var name = 'NIC ' + (index + 1);
|
||||
if (nic.isdefault) {
|
||||
name += ' (' + _l('label.default') + ')';
|
||||
}
|
||||
return $.extend(nic, {
|
||||
name: name
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user