Commit Graph

257 Commits

Author SHA1 Message Date
Thomas Lamprecht
b1b0fcbcd3 ui: lxc/context cmd: factor out confirmed CT command
unifying CT and VM command menu would be pretty easy now, but I need
to wrap the eslint stuff up, so cannot chase all tails..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:19:08 +02:00
Thomas Lamprecht
23ebe427ec ui: lxc/context cmd: code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 10:14:18 +02:00
Thomas Lamprecht
c511ca9cec ui: lxc/Network: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 08:46:35 +02:00
Thomas Lamprecht
7aaa492bbd ui: lxc/Mountpoints: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 08:45:46 +02:00
Thomas Lamprecht
4fd034b13e ui: lxc/CreateWizard: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 08:45:03 +02:00
Dominic Jäger
f09f1c27ad ui: eslint: Miscellaneous eslint fixes
Function syntax, raw words, string templates, no prototype builtins

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
91a47a766f ui: eslint: State equalities more precisely
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
f1374bff13 ui: eslint: Remove useless escapes
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
55ee6ba132 ui: eslint: No unused or duplicate variables
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
46d9a35c33 ui: eslint: fix usage of 'me'
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominik Csapak
a8ea1b6876 ui: use some icons from widget-toolkit
we moved them there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00
Fabian Ebner
2452e18de4 ui: use new SafeDestroyGuest window
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Fabian Ebner
23b596dce0 ui: avoid errors when 'template' property is not present in guest status
The API doesn't advertise the property as non-optional and it's safer and more
in line with the surrounding code.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-03-15 13:59:52 +01:00
Thomas Lamprecht
fa8d397162 ui: eslint: some more trailing comma fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:48:50 +01: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
d2021707e3 ui: eslint: enforce "no-extra-boolean-cast" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:43:40 +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
ef725143c6 ui: eslint: enforce "no-unneeded-ternary" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:41:11 +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
2a4971d8c9 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +01:00
Wolfgang Bumiller
5865b59747 ad #3140: allow interface suffix in dns entries
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-25 12:33:54 +01:00
Thomas Lamprecht
49aac03491 ui: lxc: code cleanup ssh key upload
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-22 10:22:10 +01:00
Oguz Bektas
641da26d54 lxc: increase limit of max cores from 128 to 8192
to match the recently change in the container backend

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-09-15 11:24:26 +02:00
Stephan Leemburg
e08f07de20 Bump maximum number of container net interfaces from 10 to 32
Signed-off-by: Stephan Leemburg <stephan.leemburg@it-functions.nl>
2020-08-27 12:58:16 +02:00
Dominik Csapak
d8cb744d2f fix #2810: reset state of mounts array in initComponent
so that each new instance has an empty mounts list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-24 09:45:47 +02:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
b552db1897 ui: lxc/network: fix initial empty text on edit
Editing an existing interface with DHCP set showed the emptyText
"None", which is confusing (and wrong)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-02-10 16:34:47 +01:00
Dominik Csapak
a216345471 gui: lxc/Network: add 'None' EmptyText for static mode
this way it is more clear that leaving that field empty results in
no configured ip for that interface, this may help prevent
users to select 'dhcp' for e.g. ipv6 when they do not want an ipv6
and do not have a dhcp6 server in the network (which would result
in a long boot time of the container, because of the dhcp timeout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-10 16:27:20 +01:00
Dominik Csapak
99541dcceb gui: lxc/Network: remove trailing whitespace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-10 11:16:32 +01:00
Thomas Lamprecht
acddfb9bd9 ui CT Features: add checkbox for new "allow mknod device creation in CT"
note that it's experimental..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 20:37:46 +01:00
Thomas Lamprecht
68c86905f9 ui LxcFeaturesEdit: refactor+cleanup and make slightly wider
Avoid the initComponent, just use autoLoad.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 20:35:40 +01:00
Dominik Csapak
b06d011e31 fix #2572: gui: make snapshot panel visible for VM.Audit
with the now rewritten panels, this works as expected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
5b1b9360eb gui: refator SnapshotTree
using the better View, ViewModel, Controller style,
while doing this, make it generic so that we can use it for qemu and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Dominik Csapak
4e0e6b77e9 gui: refactor snapshot window
using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-01-30 18:01:38 +01:00
Stefan Reiter
e341425c73 ui/vnc: reload IFrame-embedded xtermjs on LXC startup
Same as with previous QEMU patch, avoids manual reload after starting a
container while the "Console" window is open.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-19 13:56:48 +01:00
Stefan Reiter
fe45dd5f4e ui/lxc: cleanup pveSelNode to variable
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2019-12-19 13:56:48 +01:00
Thomas Lamprecht
0bead056b1 followup: rename to "Backup" but add tooltip
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-09 15:11:08 +01:00
Aaron Lauterer
2b4c02c00a ui: mpedit: activate backup on MP creation
This patch enables the backup checkbox by default for newly created
LXC mount points.

Hopefully this will help to avoid situations in the future where people
realize too late that the mount point has not been backed up when they
expected it to because they missed the checkbox.

The reason why `view.isCreate` is not passed directly is because
AFAIU the 'view.isCreate' can have one of three values:
* null - editing an existing mount point
* true - creating a new mp
* array('unusedX') - adding an unused disk again

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2019-12-09 14:31:45 +01:00
Dominik Csapak
df0875c20e gui: refactor {lxc, qemu}/Summary to panel/GuestSummary
they are both similar enough to have it only once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-12-09 14:20:37 +01:00
Thomas Lamprecht
d6896db530 ui: lxc: fix cmd menu separator hiding
use same condition boolean line as VMs have

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 14:39:25 +01:00
Fabian Ebner
5ef877b935 LXC: Disable resize button when volume is unusued
The size of an unused volume is not visible to the user and trying to resize
an unused volume runs into a 'parameter verification failed' anyways.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-29 08:41:52 +01:00
Oguz Bektas
cef9b653ec lxc: disable remove button for pending resource changes
for a pending change, it's 'revert's job to do this. pressing remove
doesn't do anything and it might be confusing for users.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-26 17:06:27 +01:00
Thomas Lamprecht
ba3c982ed0 ui: lxc: switch reboot and stop button to match VMs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-25 06:40:50 +01:00
Oguz Bektas
6aee12f1fc lxc: add reboot button
to right-click menu and dropdown menu

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-20 20:28:53 +01:00
Oguz Bektas
2f13fde351 lxc: refactor stop button
move stopBtn into shutdownBtn as a menu item.

we can remove the setDisabled() call for stopBtn near the end, since when
shutdownBtn is disabled, so is stopBtn.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-20 20:28:53 +01:00
Dominik Csapak
f9b633668f gui: lxc/MPEdit: save and use the mountpoint propertyString
this way, backend only settings do not get lost (like 'size', 'shared')
when editing in the gui

this was most obvious with the new pending options, as every time
we edited a mp, we lost its size, and even setting the options
to exactly the same as the originals, we still had the mp as
'pending', but without the size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-11-06 21:12:35 +01:00
Dominik Csapak
69f36699b6 gui: lxc/Resources: improve reload behaviour
reload when a new disk was added, and set the button status
on a reload

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
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