title: gettext('Guest Agent Network Information'),
height: 300,
layout: {
- type: 'fit'
+ type: 'fit',
},
modal: true,
items: [
{
dataIndex: 'name',
text: gettext('Name'),
- flex: 3
+ flex: 3,
},
{
dataIndex: 'hardware-address',
text: gettext('MAC address'),
- width: 140
+ width: 140,
},
{
dataIndex: 'ip-addresses',
val.forEach(function(ip) {
var addr = ip['ip-address'];
var pref = ip.prefix;
- if (addr && pref) {
+ if (addr && pref) {
ips.push(addr + '/' + pref);
}
});
return ips.join('<br>');
- }
- }
- ]
- }
- ]
+ },
+ },
+ ],
+ },
+ ],
});
Ext.define('PVE.qemu.AgentIPView', {
layout: {
type: 'hbox',
- align: 'top'
+ align: 'top',
},
nics: [],
items: [
{
xtype: 'box',
- html: '<i class="fa fa-exchange"></i> IPs'
+ html: '<i class="fa fa-exchange"></i> IPs',
},
{
xtype: 'container',
layout: {
type: 'vbox',
align: 'right',
- pack: 'end'
+ pack: 'end',
},
items: [
{
flex: 1,
itemId: 'ipBox',
style: {
- 'text-align': 'right'
- }
+ 'text-align': 'right',
+ },
},
{
xtype: 'button',
win.down('grid').getStore().setData(me.nics);
win.show();
},
- text: gettext('More')
- }
- ]
- }
+ text: gettext('More'),
+ },
+ ],
+ },
],
getDefaultIps: function(nics) {
if (nic['hardware-address'] &&
nic['hardware-address'] != '00:00:00:00:00:00' &&
nic['hardware-address'] != '0:0:0:0:0:0') {
-
var nic_ips = nic['ip-addresses'] || [];
nic_ips.forEach(function(ip) {
var p = ip['ip-address'];
method: 'POST',
proxy: {
type: 'proxmox',
- url: '/api2/json/nodes/' + nodename + '/qemu/' + vmid + '/agent/network-get-interfaces'
- }
+ url: '/api2/json/nodes/' + nodename + '/qemu/' + vmid + '/agent/network-get-interfaces',
+ },
});
me.callParent();
// check if the guest agent is there on every statusstore load
me.mon(me.rstore, 'load', me.startIPStore, me);
- }
+ },
});