'p': gettext('Premium')
},
- noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="http://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
+ noSubKeyHtml: 'You do not have a valid subscription for this server. Please visit <a target="_blank" href="https://www.proxmox.com/products/proxmox-ve/subscription-service-plans">www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
'Linux': [
- { desc: '4.X/3.X/2.6 Kernel', val: 'l26' },
+ { desc: '5.x - 2.6 Kernel', val: 'l26' },
{ desc: '2.4 Kernel', val: 'l24' }
],
'Microsoft Windows': [
- { desc: '10/2016', val: 'win10' },
+ { desc: '10/2016/2019', val: 'win10' },
{ desc: '8.x/2012/2012r2', val: 'win8' },
{ desc: '7/2008r2', val: 'win7' },
{ desc: 'Vista/2008', val: 'w2k8' },
case 'good':
icon = 'good fa-check';
break;
+ case 'upgrade':
+ icon = 'warning fa-upload';
+ break;
case 'old':
icon = 'warning fa-refresh';
break;
map_ceph_health: {
'HEALTH_OK':'good',
+ 'HEALTH_UPGRADE':'upgrade',
'HEALTH_OLD':'old',
'HEALTH_WARN':'warning',
'HEALTH_ERR':'critical'
var keystring = '' ;
agentstring += ', ' + key + ': ';
- if (PVE.Parser.parseBoolean(value)) {
- agentstring += Proxmox.Utils.enabledText;
+ if (key === 'type') {
+ let map = {
+ isa: "ISA",
+ virtio: "VirtIO",
+ };
+ agentstring += map[value] || Proxmox.Utils.unknownText;
} else {
- agentstring += Proxmox.Utils.disabledText;
+ if (PVE.Parser.parseBoolean(value)) {
+ agentstring += Proxmox.Utils.enabledText;
+ } else {
+ agentstring += Proxmox.Utils.disabledText;
+ }
}
});
}
},
+ render_spice_enhancements: function(values) {
+ let props = PVE.Parser.parsePropertyString(values);
+ if (Ext.Object.isEmpty(props)) {
+ return Proxmox.Utils.noneText;
+ }
+
+ let output = [];
+ if (PVE.Parser.parseBoolean(props.foldersharing)) {
+ output.push('Folder Sharing: ' + gettext('Enabled'));
+ }
+ if (props.videostreaming === 'all' || props.videostreaming === 'filter') {
+ output.push('Video Streaming: ' + props.videostreaming);
+ }
+ return output.join(', ');
+ },
+
// fixme: auto-generate this
// for now, please keep in sync with PVE::Tools::kvmkeymaps
kvm_keymaps: {
},
console_map: {
- '__default__': Proxmox.Utils.defaultText + ' (HTML5)',
+ '__default__': Proxmox.Utils.defaultText + ' (xterm.js)',
'vv': 'SPICE (remote-viewer)',
'html5': 'HTML5 (noVNC)',
'xtermjs': 'xterm.js'
ipanel: 'IScsiInputPanel',
faIcon: 'building'
},
- sheepdog: {
- name: 'Sheepdog',
- ipanel: 'SheepdogInputPanel',
- hideAdd: true,
- faIcon: 'building'
- },
cephfs: {
name: 'CephFS',
ipanel: 'CephFSInputPanel',
status = record.status + ' ha-' + record.hastate;
}
+ if (record.lock) {
+ status += ' locked lock-' + record.lock;
+ }
+
var defaults = PVE.tree.ResourceTree.typeDefaults[objType];
if (defaults && defaults.iconCls) {
var retVal = defaults.iconCls + ' ' + status;
allowSpice = consoles.spice;
allowXtermjs = !!consoles.xtermjs;
}
- var vncdefault = 'html5';
- var dv = PVE.VersionInfo.console || vncdefault;
- if ((dv === 'vv' && !allowSpice) || (dv === 'xtermjs' && !allowXtermjs)) {
- dv = vncdefault;
+ var dv = PVE.VersionInfo.console || 'xtermjs';
+ if (dv === 'vv' && !allowSpice) {
+ dv = (allowXtermjs) ? 'xtermjs' : 'html5';
+ } else if (dv === 'xtermjs' && !allowXtermjs) {
+ dv = (allowSpice) ? 'vv' : 'html5';
}
return dv;
},
openVNCViewer: function(vmtype, vmid, nodename, vmname, cmd) {
+ let scaling = 'off';
+ if (Proxmox.Utils.toolkit !== 'touch') {
+ var sp = Ext.state.Manager.getProvider();
+ scaling = sp.get('novnc-scaling', 'off');
+ }
var url = Ext.Object.toQueryString({
console: vmtype, // kvm, lxc, upgrade or shell
novnc: 1,
vmid: vmid,
vmname: vmname,
node: nodename,
- resize: 'off',
+ resize: scaling,
cmd: cmd
});
var nw = window.open("?" + url, '_blank', "innerWidth=745,innerheight=427");
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, opts) {
- var allowSpice = !!response.result.data.spice;
- PVE.Utils.openDefaultConsoleWindow(allowSpice, 'kvm', vmid, nodename, vmname);
+ let conf = response.result.data;
+ var consoles = {
+ spice: !!conf.spice,
+ xtermjs: !!conf.serial,
+ };
+ PVE.Utils.openDefaultConsoleWindow(consoles, 'kvm', vmid, nodename, vmname);
}
});
} else if (record.data.type === 'lxc' && !record.data.template) {
reader.readAsText(file);
},
- bus_counts: { ide: 4, sata: 6, scsi: 16, virtio: 16 },
+ diskControllerMaxIDs: {
+ ide: 4,
+ sata: 6,
+ scsi: 14,
+ virtio: 16,
+ },
// types is either undefined (all busses), an array of busses, or a single bus
forEachBus: function(types, func) {
- var busses = Object.keys(PVE.Utils.bus_counts);
+ var busses = Object.keys(PVE.Utils.diskControllerMaxIDs);
var i, j, count, cont;
if (Ext.isArray(types)) {
// check if we only have valid busses
for (i = 0; i < busses.length; i++) {
- if (!PVE.Utils.bus_counts[busses[i]]) {
+ if (!PVE.Utils.diskControllerMaxIDs[busses[i]]) {
throw "invalid bus: '" + busses[i] + "'";
}
}
for (i = 0; i < busses.length; i++) {
- count = PVE.Utils.bus_counts[busses[i]];
+ count = PVE.Utils.diskControllerMaxIDs[busses[i]];
for (j = 0; j < count; j++) {
cont = func(busses[i], j);
if (!cont && cont !== undefined) {
}
},
+ hardware_counts: { net: 32, usb: 5, hostpci: 16, audio: 1, efidisk: 1, serial: 4 },
+
cleanEmptyObjectKeys: function (obj) {
var propName;
for (propName in obj) {
} else {
return false;
}
- }
+ },
+
+ propertyStringSet: function(target, source, name, value) {
+ if (source) {
+ if (value === undefined) {
+ target[name] = source;
+ } else {
+ target[name] = value;
+ }
+ } else {
+ delete target[name];
+ }
+ },
+
+ updateColumns: function(container) {
+ let mode = Ext.state.Manager.get('summarycolumns') || 'auto';
+ let factor;
+ if (mode !== 'auto') {
+ factor = parseInt(mode, 10);
+ if (Number.isNaN(factor)) {
+ factor = 1;
+ }
+ } else {
+ factor = container.getSize().width < 1400 ? 1 : 2;
+ }
+
+ if (container.oldFactor === factor) {
+ return;
+ }
+
+ let items = container.query('>'); // direct childs
+ factor = Math.min(factor, items.length);
+ container.oldFactor = factor;
+
+ items.forEach((item) => {
+ item.columnWidth = 1 / factor;
+ });
+
+ // we have to update the layout twice, since the first layout change
+ // can trigger the scrollbar which reduces the amount of space left
+ container.updateLayout();
+ container.updateLayout();
+ },
},
singleton: true,