Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02: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
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
Oguz Bektas
1780a64476 filter unusable lxc mountoptions for rootfs
disable nodev and noexec per thomas' suggestion[0].

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-July/037994.html

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-07-12 12:26:44 +02:00
Thomas Lamprecht
fad28c95b1 ui: remove notify calls on viewmodel
They should not be required and result in exceptions thrown if this
component is used in combination with ExtJS debug sources

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-11 14:16:11 +02:00
Thomas Lamprecht
7b6c78818c followup: balance columns
having this new selector on the left column makes it a better fit for
both possible edit situations, rootfs is now fully balanced and both
mp/rootfs kip the "skip replication" setting on the same place - in
sync with VMs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-05 18:55:09 +02:00
Oguz Bektas
c115473dae fix #1451: allow some extra mount options for container
This allows the following non-problematic mount options for lxc
container mountpoints:
* noexec - Do not permit execution of binaries on the mounted FS
* noatime - Do not update inode access times on this filesystem
* nosuid - Do not allow suid or sgid bits to take effect
* nodev - Do not interpret character or block devices on the FS

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-07-05 18:50:04 +02:00
Fabian Grünbichler
85e6b368d1 switch MP selector to integer input
instead of combobox - 256 elements are too much.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2018-09-11 07:55:28 +02:00
Dominik Csapak
6c4429613f disable the mountpoint selector and path field by default
since in the wizard, the validity check happens before the
viewmodel can set the visible/enabled state so this is invalid there,
even if the remaining panel is valid

setting it to disabled by default, makes the fields 'valid' at the
beginning but retain their behavior

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-02 08:28:29 +02:00
Dominik Csapak
dc683ca068 better focus of lxc/MPEdit
this gives the focus to either the 'path' field
or to the 'X' tool (if it is a rootfs)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 13:51:30 +02:00
Dominik Csapak
34c235bea6 lxc/MPEdit: rework for advanced options
this is a complete rework of the inputpanel (long overdue)
it uses a viewModel and viewcontroller to avoid the
multiple is zfs/root/bind checks and concentrate them
in one place

also some features get optimized (e.g. the noreplication checkbox)

adds a setNodename to the DiskStorageSelector so that we can bind
the nodename there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Thomas Lamprecht
658bf72581 ui: MPEdit: add setUnprivileged to allow data binding
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-02-22 15:04:51 +01:00
Thomas Lamprecht
ef4ef788d5 use InputPanel 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
Thomas Lamprecht
9fccc702ec use windowEdit 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
Thomas Lamprecht
09cacce778 use KVCombobox 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
Thomas Lamprecht
896c0d5019 use Checkbox 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
c6c8e2fcea add defaultSize parameter for DiskStorageSelector and set it to 8 for lxc
we had it previously on 8GB for containers, but with the refactoring,
this got lost. this patch changes this back

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-11 12:01:23 +01:00
Dominik Csapak
1ca8a8f20a Do not translate Unix/Linux specific terms
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-28 11:26:40 +01:00
Dominik Csapak
234d2e37b7 use DiskStorageSelector in lxc/MPEdit.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00
Dominik Csapak
342225bfda move lxc mountpoint edit from ResourceEdit.js to MPEdit.js
to follow qemu code

also fix the jslint errors in MountPointInputPanel and MountPointEdit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:03 +01:00