ui: qemu: switch processor icon to SVG

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-03-31 15:43:40 +02:00
parent 449d346f41
commit f9698f62cb
4 changed files with 47 additions and 1 deletions

View File

@ -301,6 +301,7 @@
.pve-itype-icon-serial, .pve-itype-icon-serial,
.pve-itype-icon-cloud, .pve-itype-icon-cloud,
.pve-itype-icon-pci, .pve-itype-icon-pci,
.pve-itype-icon-cpu,
.pve-itype-icon-die { .pve-itype-icon-die {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position:3px center; background-position:3px center;
@ -418,6 +419,12 @@
background-image:url(../images/icon-die.svg); background-image:url(../images/icon-die.svg);
} }
.pve-itype-icon-cpu {
background-size: 16px;
background-image:url(../images/icon-cpu.svg);
}
.pve-icon { .pve-icon {
height: 16px; height: 16px;
background-position: bottom; background-position: bottom;

View File

@ -80,6 +80,7 @@ IMAGES = ${GNOME_IMAGES} \
icon-die.svg \ icon-die.svg \
icon-sdn.svg \ icon-sdn.svg \
icon-fa-network-wired.svg\ icon-fa-network-wired.svg\
icon-cpu.svg \
icon-sdn.svg: icon-sdn.dot icon-sdn.svg: icon-sdn.dot

38
www/images/icon-cpu.svg Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="100"
height="100"
version="1.1"
>
<g fill="none" stroke="#000" stroke-width="3">
<!-- base CPU -->
<rect x="15" y="15" rx="0" ry="0" width="70" height="70" />
<rect x="30" y="30" rx="0" ry="0" width="40" height="40" fill="black"/>
<g stroke-width="5"> <!-- pins -->
<!-- left -->
<path d="m14,24.5 h-12.5"/>
<path d="m14,41.5 h-12.5"/>
<path d="m14,58.5 h-12.5"/>
<path d="m14,75.5 h-12.5"/>
<!-- right -->
<path d="m86,24.5 h+12.5"/>
<path d="m86,41.5 h+12.5"/>
<path d="m86,58.5 h+12.5"/>
<path d="m86,75.5 h+12.5"/>
<!-- top -->
<path d="m24.5,14 v-12.5"/>
<path d="m41.5,14 v-12.5"/>
<path d="m58.5,14 v-12.5"/>
<path d="m75.5,14 v-12.5"/>
<!-- bottom -->
<path d="m24.5,86 v+12.5"/>
<path d="m41.5,86 v+12.5"/>
<path d="m58.5,86 v+12.5"/>
<path d="m75.5,86 v+12.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -95,7 +95,7 @@ Ext.define('PVE.qemu.HardwareView', {
never_delete: true, never_delete: true,
editor: caps.vms['VM.Config.CPU'] || caps.vms['VM.Config.HWType'] editor: caps.vms['VM.Config.CPU'] || caps.vms['VM.Config.HWType']
? 'PVE.qemu.ProcessorEdit' : undefined, ? 'PVE.qemu.ProcessorEdit' : undefined,
tdCls: 'pmx-itype-icon-processor', tdCls: 'pve-itype-icon-cpu',
group: 3, group: 3,
defaultValue: '1', defaultValue: '1',
multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'], multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'],