},
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">'
+ +'<a target="_blank" href="https://www.proxmox.com/en/proxmox-virtual-environment/pricing">'
+'www.proxmox.com</a> to get a list of available options.',
kvm_ostypes: {
'Linux': [
- { desc: '5.x - 2.6 Kernel', val: 'l26' },
+ { desc: '6.x - 2.6 Kernel', val: 'l26' },
{ desc: '2.4 Kernel', val: 'l24' },
],
'Microsoft Windows': [
'efidisk but no OMVF BIOS': gettext('EFI Disk without OMVF BIOS'),
},
+ renderNotFound: what => Ext.String.format(gettext("No {0} found"), what),
+
get_kvm_osinfo: function(value) {
var info = { base: 'Other' }; // default
if (value) {
render_as_property_string: v => !v ? Proxmox.Utils.defaultText : PVE.Parser.printPropertyString(v),
render_scsihw: function(value) {
- if (!value) {
+ if (!value || value === '__default__') {
return Proxmox.Utils.defaultText + ' (LSI 53C895A)';
} else if (value === 'lsi') {
return 'LSI 53C895A';
serial2: gettext('Serial terminal') + ' 2',
serial3: gettext('Serial terminal') + ' 3',
virtio: 'VirtIO-GPU',
+ 'virtio-gl': 'VirGL GPU',
none: Proxmox.Utils.noneText,
},
return Ext.htmlEncode(first + " " + last);
},
+ // expecting the following format:
+ // [v2:10.10.10.1:6802/2008,v1:10.10.10.1:6803/2008]
+ render_ceph_osd_addr: function(value) {
+ value = value.trim();
+ if (value.startsWith('[') && value.endsWith(']')) {
+ value = value.slice(1, -1); // remove []
+ }
+ value = value.replaceAll(',', '\n'); // split IPs in lines
+ let retVal = '';
+ for (const i of value.matchAll(/^(v[0-9]):(.*):([0-9]*)\/([0-9]*)$/gm)) {
+ retVal += `${i[1]}: ${i[2]}:${i[3]}<br>`;
+ }
+ return retVal.length < 1 ? value : retVal;
+ },
+
windowHostname: function() {
return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match,
function(m, addr, offset, original) { return addr; });
allowSpice = consoles.spice;
allowXtermjs = !!consoles.xtermjs;
}
- let dv = PVE.VersionInfo.console || (type === 'kvm' ? 'vv' : 'xtermjs');
+ let dv = PVE.UIOptions.options.console || (type === 'kvm' ? 'vv' : 'xtermjs');
if (dv === 'vv' && !allowSpice) {
dv = allowXtermjs ? 'xtermjs' : 'html5';
} else if (dv === 'xtermjs' && !allowXtermjs) {
}
},
- hardware_counts: { net: 32, usb: 5, hostpci: 16, audio: 1, efidisk: 1, serial: 4, rng: 1, tpmstate: 1 },
+ hardware_counts: {
+ net: 32,
+ usb: 14,
+ usb_old: 5,
+ hostpci: 16,
+ audio: 1,
+ efidisk: 1,
+ serial: 4,
+ rng: 1,
+ tpmstate: 1,
+ },
+
+ // we can have usb6 and up only for specific machine/ostypes
+ get_max_usb_count: function(ostype, machine) {
+ if (!ostype) {
+ return PVE.Utils.hardware_counts.usb_old;
+ }
+
+ let match = /-(\d+).(\d+)/.exec(machine ?? '');
+ if (!match || PVE.Utils.qemu_min_version([match[1], match[2]], [7, 1])) {
+ if (ostype === 'l26') {
+ return PVE.Utils.hardware_counts.usb;
+ }
+ let os_match = /^win(\d+)$/.exec(ostype);
+ if (os_match && os_match[1] > 7) {
+ return PVE.Utils.hardware_counts.usb;
+ }
+ }
+
+ return PVE.Utils.hardware_counts.usb_old;
+ },
+
+ // parameters are expected to be arrays, e.g. [7,1], [4,0,1]
+ // returns true if toCheck is equal or greater than minVersion
+ qemu_min_version: function(toCheck, minVersion) {
+ let i;
+ for (i = 0; i < toCheck.length && i < minVersion.length; i++) {
+ if (toCheck[i] < minVersion[i]) {
+ return false;
+ }
+ }
+
+ if (minVersion.length > toCheck.length) {
+ for (; i < minVersion.length; i++) {
+ if (minVersion[i] !== 0) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ },
cleanEmptyObjectKeys: function(obj) {
for (const propName of Object.keys(obj)) {
});
win.getViewModel().set('isInstalled', isInstalled);
container.add(win);
+ win.on('close', () => {
+ container.el.unmask();
+ });
win.show();
callback(win);
}
rstore,
/not (installed|initialized)/i,
(_, error) => {
- nodename = nodename || 'localhost';
+ nodename = nodename || Proxmox.NodeName;
let maskTarget = maskOwnerCt ? view.ownerCt : view;
rstore.stopUpdate();
PVE.Utils.showCephInstallOrMask(maskTarget, error.statusText, nodename, win => {
};
return value.replace(/(\\\\|\\n)/g, match => replace[match]);
},
+
+ notesTemplateVars: ['cluster', 'guestname', 'node', 'vmid'],
+
+ renderTags: function(tagstext, overrides) {
+ let text = '';
+ if (tagstext) {
+ let tags = (tagstext.split(/[,; ]/) || []).filter(t => !!t);
+ if (PVE.UIOptions.shouldSortTags()) {
+ tags = tags.sort((a, b) => {
+ let alc = a.toLowerCase();
+ let blc = b.toLowerCase();
+ return alc < blc ? -1 : blc < alc ? 1 : a.localeCompare(b);
+ });
+ }
+ text += ' ';
+ tags.forEach((tag) => {
+ text += Proxmox.Utils.getTagElement(tag, overrides);
+ });
+ }
+ return text;
+ },
+
+ tagCharRegex: /^[a-z0-9+_.-]+$/i,
+
+ verificationStateOrder: {
+ 'failed': 0,
+ 'none': 1,
+ 'ok': 2,
+ '__default__': 3,
+ },
},
singleton: true,