Commit Graph

60 Commits

Author SHA1 Message Date
Thomas Lamprecht
b2a5aa1812 ui: vm/hw: make extra message from deletion flexible
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 18:12:08 +01:00
Dominik Csapak
23dfddc637 gui: qemu/HardwareView: show vmstate and allow removal
so that a user can remove the 'suspended' state without resuming it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-30 17:50:10 +01:00
Dominik Csapak
18f57a2319 gui: qemu/HardwareView: use builtin reload function
ObjectGrid (an ancestor of PendingObjectGrid) does already have
a 'reload' function which does exactly the same, so get rid
of the local one here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Thomas Lamprecht
417f904f78 ui: pending revert: detect parent pending grid automatically
but cache it to avoid frequent, potential costly, up() calls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:49:31 +01:00
Thomas Lamprecht
3ee15859b2 ui: pending revert: rename baseurl config to apiurl
makes more sense and avoids confusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:48:33 +01:00
Thomas Lamprecht
591efb6725 ui: factor out pending changes revert button
makes no sense to have the, more or less, exact same 25 line method 5
times..

could be moved to widget TK, but that's for another time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:48:03 +01:00
Oguz Bektas
141aba6b62 ui: qemu: update grid button status with events from correct store
as we noticed at the container side, we should use diffStore in order
to update the button status without delay.

Effectively alls ObjectGrids, and thus their descendants,
PendingObjectGrids use a DiffStore, where we have two effective
stores, a remote store and a local, in-memory, proxy store.

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 09:00:50 +01:00
Dominik Csapak
4143529241 gui: qemu: allow move disk for EFI Disk again
with commit 0ea3b8499b we changed how
we define isUsedDisk, which was true for efidisks before, but not
after

use the existing 'isEfi' varable to include them for the move_btn
(but not the resize_btn)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-10-11 12:22:50 +02:00
Thomas Lamprecht
c570b6a96e ui: vm/efi: always allow to add EFI disk even if OVMF is not yet set
As this is annoying else, especially if the change from default to
ovmf BIOS is already a pending change..

A simple hint is enough, we do not do anything with the EFI disk if
OVMF is not set to be used anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-01 09:30:06 +02:00
Thomas Lamprecht
0ea3b8499b ui: vm/Hardware: do not depent mapping of cdrom, cloudinit, .. on the CSS class
This was pretty brittle to begin with, on should not attach logic to
CSS class names or the like, if possible.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 18:08:12 +02:00
Thomas Lamprecht
a032a91a48 ui: vm/Hardware: convert more icons from bitmap to font awesome
since commit 03558174ef we can use the
Font Awesome icons without them being shown in the remove dialog, so
convert more to them - they are vectors and look a bit better.

Also ensure that all icons are rendered as fixed width, with fa-fw

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-24 10:48:19 +02:00
Thomas Lamprecht
fa9cdaa135 ui: vm/HW: use more font awesome icons and fix color
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-23 19:18:15 +02:00
Aaron Lauterer
171ca270a0 Add audio device to HardwareView
Adds the following:

* Menu entry to create a new audio device
  only clickable if:
    * permissions are there
    * no audio device exists
* listing in the hardwarew view

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-07-23 18:29:05 +02:00
Thomas Lamprecht
7b7ca5e1f8 ui: qemu/HWView: cloudinit: use the font-awesome provided cloud symbol
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:28:20 +02:00
Thomas Lamprecht
83b4bfc314 ui: qemu/HWView: small code cleanup for remove dialog
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:27:35 +02:00
Thomas Lamprecht
03558174ef ui: qemu/HWView: only render icon when in grid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-17 13:26:59 +02:00
Dominik Csapak
2e1a8291d6 fix #2223: fix set_button_status isCDRom
value is not always a string (depending on the value that changed),
so we have to convert it to a string to have a 'match' function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-31 11:03:58 +02:00
Thomas Lamprecht
10525ed71e fix #2197: ui: editing CDROM doesn't require VM.Config.Disk rights
A user which just has the default role PVEVMUser on a VM is able to
edit the CDROM, either to no media or if storage permissions are
available also to other ISOs, through the API. So reflect this again
for the WebUI. We could add a check for "VM.Config.CDROM", but that's
not really worth, if we keep in mind that the Ext.Caps state is
heuristically only.

fixes commit d35b5b2afb

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-13 17:27:49 +00:00
Dominik Csapak
d35b5b2afb fix #1814: do not enable disk related buttons for audit user
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-10 09:50:05 +02:00
Christian Ebner
b29918337e fix: #1145 enable CT/VM firewall by default on creation via WebUI
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-04-03 11:25:25 +02:00
Dominik Csapak
aae2273c61 gui: qemu/HardwareView: add machine to HardwareView
so the user can edit this via the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Dominik Csapak
439d78210a gui: qemu/HardwareView: move scsihw and bios to HardwareView
it is guest hardware and not really an option, and we have it now
in the wizard, so it makes sense to have it here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Dominik Csapak
755f4e5469 gui: qemu/HardwareView: remove Keyboard setting
this is deprecated and should not be necessary anymore, since
qemu and novnc can handle this better if no keyboard layout is set

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Dominik Csapak
8d554444e6 gui: qemu/HardwareView: add space between groups
so that we can add items between them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Dominik Csapak
6a040799f4 gui: qemu/HardwareView: prepare Hardwareview for font-awesome icons
we want to be able to use fontawesome icons directly instead of having
to use extracted png in css classes

this patch makes it possible to use 'iconCls' with the font-awesome icon name

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-28 17:04:06 +01:00
Dominik Csapak
25a1063ac7 gui: let users add PCI devices
this enables the gui part to enable the user to add a pci device
via the gui

we disable the button after 4 devices, since that is the maximum
in the backend

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 13:31:39 +01:00
Thomas Lamprecht
3097170dad ui: qemu/HW: menu setDisable mustn't ignore caps
We passed a 'disable' config to those menu items on creation, but
promptly ignored that after the first set_button_status call, which
only checked if it's possible to add another device, but not if our
capabilities heuristic is OK.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 08:40:15 +01:00
David Limbeck
afa1997599 fix #1969: increase max unused disks
Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2018-11-09 16:51:56 +01:00
David Limbeck
cbe0b4b834 fix sorting for unused disks in HardwareView.js
sort everything based on group and order for those with multiple numbered
entries

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2018-11-09 14:02:26 +01:00
Tim Marx
3b2e557ff9 close #584: ui qemu: changed remove unused disk to asynchron call
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2018-10-18 13:26:15 +02:00
David Limbeck
cdf5bec2c9 fix #1884: vm/hardware: ensure correct value on pending changes
e.g., pending deletion of cdrom/dvd drive showed as hard disk in
hardware tab

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-08-24 11:24:38 +02:00
Thomas Lamprecht
37977fa500 ui: vm: allow to add socket backed serial devices
We show and can remove serial devices but couldn't add new ones
through the WebUI.
Add a simple component to allow adding serial ports backed by a
socket, which can be especially useful now with xterm.js

Passing through serial devices from /dev isn't possible with this, as
it is normally a root only operation and not that often used.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-05-17 09:25:34 +02:00
Dominik Csapak
1d90225274 use correct multiKey and getObjectValue calls for memory line
also show shares and if ballooning is off

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-23 12:12:47 +02:00
Dominik Csapak
b08ae04435 overwrite the built-in 'run_editor' function
this is needed for the 'enter' handler

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 14:03:59 +02:00
Dominik Csapak
c2233c8fc2 qemu/HDEdit: move diskthrottling to advanced options
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
ab1ee35244 fix editor and set_button_status for cloudinit
cloudinit images do not have an editor so return here
and value has to be a string to match
also set the remove button text correctly when selecting a cloudinit disk

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
457d5a9413 remove CPUOptions
this is now merged with ProcessorEdit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
b38d0810ca add CIDriveEdit
and use it on the HardwareView to add/remove and display the
CloudInit drives

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-16 10:05:57 +01:00
Dominik Csapak
abe824aa95 add PVE.Utils.forEachBus and use it in qemu/HardwareView
this iterates over all busses or over the ones you specify
( a single or an array )

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-16 10:05:57 +01:00
Dominik Csapak
a488da8c24 show serial ports on the gui
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-30 16:37:21 +01:00
Dominik Csapak
cd86ab24de change group of unused to 99 to that we can add things in between
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-30 16:37:21 +01:00
Thomas Lamprecht
bc0eaf5870 use PendingObjectGrid from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
e7ade592e3 use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
5720fafabc use Button from widget toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Emmanuel Kasper
ff5a8a9b44 Add a proper confirmation message when we detach an used disk
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Emmanuel Kasper
877fce5419 Fix #1526: Use 'detach' instead of 'remove' when the disk is used
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Emmanuel Kasper
72408db913 Fix JSLint type confusion warnings
The type confusion warnings arose from string and integer concatenation,
and object properties of the name which were alternatively set with
strings and integers.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-04 12:02:47 +01:00
Dominik Csapak
ec3d837288 show hostpci devices in gui
so one can see which pci devices are assigned to which vm

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:06:16 +02:00
Dominik Csapak
2668ba649c use usbedit window to add/edit usb devices
the usb device button gets disabled when there are
already 5 usb devices

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 16:05:27 +02:00
Dominik Csapak
fa522e4867 show usb devices in qemu hardware view
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00