Commit 5b7183df authored by Dietmar Maurer's avatar Dietmar Maurer

HardwareView: simplify rendering code

parent 055f384f
......@@ -68,13 +68,10 @@ Ext.define('PVE.qemu.HardwareView', {
var sockets = me.getObjectValue('sockets', 1, pending);
var model = me.getObjectValue('cpu', undefined, pending);
var cores = me.getObjectValue('cores', undefined, pending);
var res = '';
if (!cores || (cores <= 1)) {
res = sockets;
} else {
res = (sockets*cores) + ' (' + sockets + ' sockets, ' + cores + ' cores)';
}
var cores = me.getObjectValue('cores', 1, pending);
var res = (sockets*cores) + ' (' + sockets + ' sockets, ' + cores + ' cores)';
if (model) {
res += ' [' + model + ']';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment