Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
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
2a4971d8c9 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +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
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
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
Oguz Bektas
273b5ce3a3 gui: add revert button for lxc pending changes
adds the pending button for Resources, Options and DNS screens.

Co-developed-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-10-30 09:54:02 +01:00
Oguz Bektas
9fd8d73ea8 edit/show lxc pending changes in gui
uses the new /pending and the adapted /config API endpoints
to get pending changes and show them in a PendingObjectGrid

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-10-18 21:49:28 +02:00
Thomas Lamprecht
d42ef8da91 ui: lxc: do not disable complete add resource button if no disk caps
While for now you only have elements which require the add disk
capability in the add sections it makes no sense to hide it, as it
would suggest that one can add no resource at all, and can easily
introduce a bug if we add another type of resource here, independent
of disk add cap.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 09:56:17 +02: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
Thomas Lamprecht
93bd0d75c3 fixup: lxc/Resources: add missing trailing semicolon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-09 14:18:47 +01:00
David Limbeck
1a2fdf62fa fix mount point/unused disk sorting in Resources.js
use the same sort function as for VMs based on group and order

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2018-11-09 14:02:26 +01:00
Dominik Csapak
c7164db743 add container move volume to gui
this reuses the vm HDMove window to move volumes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-07 14:55:49 +02:00
Dominik Csapak
3e4b78dc68 merge cores, cpulimit and cpuunits for containers
like we do for qemu vms

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 13:38:36 +02:00
Dominik Csapak
14a845bc7b Utils: add forEachMP
in the style of forEachBus, but for containers, so that we
only have to save the count once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Dominik Csapak
8cd96756d3 fix edit button for some panels
when using the 'run_editor' function provided by the ObjectGrid,
we have to make sure the function runs in the context of the grid,
not in that of the button, else we cannot access the
selectionModel/rows/etc. of the grid

this happened with the switch to the widget toolkit

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>
2018-02-07 10:39:57 +01:00
Dominik Csapak
35a04562fd change PVE.UserName/CSRFPreventionToken to Proxmox
this is now all in the widget-toolkit and needs to be
set/read to/from there, else we possibly get an inconsistent view on
those

this fixes as issue, where after login the ResourceStore would not update

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>
2018-01-25 14:49:11 +01:00
Thomas Lamprecht
14dd743b9e lxc/Resources: cleanup & use new features from ObjectGrid
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
8ea2c8709e use ObjectGrid 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
Philip Abernethy
c15e9cd5e4 Disallow quotas for unprivileged containers
Disables the quota checkbox for unprivileged containers in the creation
wizard, as well as when editing or adding mountpoints.
2017-09-12 09:34:48 +02:00
Dominik Csapak
ba93a9c665 move onlineHelp into classes from definition
this patch moves the onlineHelp ids into the javascript classes, instead
of defining them where we use the classes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:13:12 +01:00
Dietmar Maurer
92b5029f60 LXC GUI: Wizard now uses new 'cores' option instead of cpulimit 2016-10-29 11:05:16 +02:00
Fabian Grünbichler
203fd3488f lxc: correctly display cpulimit
the backend defaults to 0 (unlimited), so this should also be the default
in the GUI if nothing is set.
2016-09-16 06:58:27 +02:00
Dominik Csapak
597fd1b4e3 reload lxc resources also on activate
in a previous commit (26c5aba0) we changed the reload
from the activate event to afterrender, because
activate will not be fired as a lazyitem

but this only fires once, so we also reload on activate.
with the lazyitem/tabchange fix from a previous commit,
this has now the correct behaviour

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-07 08:09:53 +02:00
Dietmar Maurer
16152937f8 reduce translation overhead 2016-04-04 16:59:52 +02:00
Dominik Csapak
26c5aba03e ext6migrate: fix lxc resource view
after making the resource view lazy
the activate event does not trigger everytime
(where we reload)
so we make it the afterrender event

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-18 16:09:04 +01:00
Emmanuel Kasper
4b4885652c load/reload stores of tabpanel children on 'activate' event 2016-03-09 18:01:55 +01:00
Emmanuel Kasper
f799361886 do not use applyIf when adding items in initComponent()
our parent class Ext.grid.GridPanel sets 'tbar: null'
and Ext.applyIf() will only apply our property
if it is undefined, so switch to Ext.apply()

it is safe to use Ext.apply() because none of these classes is further extended,
so we don't have to worry that might me might override a toolbar
set further down by a child class

this fixes allows the panel to display its top toolbar with add/edit buttons
2016-03-04 06:17:33 +01:00
Dietmar Maurer
c7ee0c11ac copy lxc/Resources.js from manager to manager6 2016-03-03 10:51:31 +01:00