Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Lamprecht
2ef4b8ed12 ui: form/USB Selector: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 16:51:35 +02:00
Thomas Lamprecht
399ffa767f ui: eslint: enforce "dot-notation" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:45:01 +01:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
ca51630938 ui: USB selector: use new API endpoint
so that we can sunset the usbscan from pve-storage's scan API, which
was never fitting there anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-02 11:28:40 +01:00
Thomas Lamprecht
bce6af8520 ui: usbselector: show product name and enable anyMatch search
Show "Product (usbid)" instead of only "usbid" for slightly better
UX.

Still allows to only enter a USBID and hit enter, even if the ID is
not in the store (i.e., currently unplugged).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 18:05:24 +02:00
Thomas Lamprecht
ff49fd4623 ui: usbselector: refactor USB Speed rendering, add USB 3.1
Fixes also an issue where unregonized (often faster) devices would
get recognized as "USB 1.x" due to the else fallback.

Now, if we do not recognize the speed value, just print the speed
with the MBps unit (it's not exactly megabit per second, but mega
baud (= symbols) per second - the effective rate is dependent on the
used signal encoding)

adapt widths a bit further

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 18:04:32 +02:00
Thomas Lamprecht
2278a74bc2 ui: usbselector: add empty text for UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 18:00:18 +02:00
Aaron Lauterer
98dcc9fb54 ui: vm/usbselector: cleanup unused code
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-09-26 17:25:25 +02:00
Thomas Lamprecht
d155bbc960 ui: usbselector/usbedit: make widths a bit larger
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 16:39:02 +02:00
Thomas Lamprecht
dcf22a4bca ui: usbselector: return string not false when invalid
If the return value is not exact Boolean(true) this is used for
error, so false gets converted to string and shown in error tooltip,
address that

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-26 16:36:25 +02:00
Thomas Lamprecht
56a353b9e7 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

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
0fc95a12ee use ComboGrid from proxmox-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
Dominik Csapak
f46721af8e add usbselector and usb edit window for qemu
the edit window has 3 radiobuttons (spice,device,port)

and a checkbox for usb3 (which gets disabled and checked
if you choose a usb3 device)

also it makes use of the help feature

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-08 15:57:56 +02:00