Commit Graph

563 Commits

Author SHA1 Message Date
Thomas Lamprecht
a39544136d bump version to 2.6-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-15 17:29:32 +01:00
Thomas Lamprecht
b1c2c8154d add EOL notice component
to avoid copying the same thing to three different product's GUIs
this year..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-15 17:28:57 +01:00
Thomas Lamprecht
ac4b6393d6 bump version to 2.6-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 09:34:40 +02:00
Thomas Lamprecht
dfc86baacb buildsys: touch incremental-lint in check target to avoid triggering twice
Without this the check and the, through the 'install' target
triggered, incremental lint target triggered a full eslint run.

Makes it similar to what PBS did from the beginning of eslint
inclusion..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 557c45056c)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 09:32:10 +02:00
Thomas Lamprecht
86568d27c1 cbind mixin: also descend in elements with an cbind property
Not only into those with an xtype one, as we can either have a
implicit default xtype (e.g., in tbars for buttons, or set explicitly
via the `defaults` mechanism) or want to apply cbinds to stores or
other objects.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 5995eddcc4)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 09:32:10 +02:00
Thomas Lamprecht
585f3c31e7 combo grid: load: rework auto-selection and validity logic
We do not want to trigger an autoSelect if there's a value set, even
if it isn't found in the store, as that hides the fact that an (now)
invalid valid is configured from the user, which can be confusing if
something is not working, as when editing an object it seems like a
valid value is selected.

Further, if a value is set we mark the field as invalid from the
start, at least if it's neither disabled nor allowed to have a
value which is does not exists in the backing store.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-07 18:07:38 +02:00
Thomas Lamprecht
a0451be0ca combo grid: reformat/place comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-07 18:07:38 +02:00
Thomas Lamprecht
1b0b0c9c7b object grid: line-wrap cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-23 16:23:17 +02:00
Thomas Lamprecht
dc6f0d6399 bump version to 2.5-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-21 17:40:26 +02:00
Thomas Lamprecht
bb22262862 object grid: improve/add to documentation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-21 17:39:43 +02:00
Thomas Lamprecht
c92dd68bab object grid: allow one to declaratively specify rows
So that users of this component do not necesacrrily need to add an
initComponent override and make the `me.add_XYZ_row()` there, but
instead can use something like:

  gridRows: [
    {
      xtype: 'text',
      name: 'http-proxy',
      text: gettext('HTTP proxy'),
      defaultValue: Proxmox.Utils.noneText,
      vtype: 'HttpProxy',
      deleteEmpty: true,
    },
  ],

I avoid using `rows` as config key as that is internally used for
quite a few things, and potentially some existing users (did not
checked all). We can still switch to that easily if it is deemed to
be better...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-21 17:39:43 +02:00
Thomas Lamprecht
22b189e40c object grid: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-21 17:39:43 +02:00
Thomas Lamprecht
2e8620aea2 bump version to 2.5-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 10:30:43 +02:00
Lorenz Stechauner
229cf5a35d disk smart: fix non working smart value window
fix regression in refactor from commit 7eb1fb18ad

Reported in forum:
https://forum.proxmox.com/threads/gui-disks-tab-cant-showup-smart-values.89180/
https://forum.proxmox.com/threads/smart-values-bug-in-6-4-6.89179/

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-14 10:30:02 +02:00
Thomas Lamprecht
c42e4596e5 debian: various trivial updates
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-13 19:46:22 +02:00
Thomas Lamprecht
b2c52530fb d/control: bump debhelper compat level to 12
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-13 19:46:22 +02:00
Thomas Lamprecht
ff7b048364 bump version to 2.5-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 18:02:04 +02:00
Fabian Ebner
e2ecec942f disk list: factor out renderers for type and usage
to be re-used later.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-07 17:58:21 +02:00
Fabian Ebner
f38bbed7bf disk list: fix minor usage renderer issue
If there is extended information, the variable is overwritten anyways.
Avoid appending an extra space if there is no extended information.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-05-07 17:58:21 +02:00
Thomas Lamprecht
b46ad78c2d format/render size: allow one to specifiy if base 2 or 10 is desired
Storage capacity and usage seems to prefer the base ten (SI unit) use
(makes the capacity a bigger number) while memory (RAM) is normally
preferred to use base 2.

So allow both, mostly to allow consistent displaying of metrics.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 17:56:04 +02:00
Thomas Lamprecht
ce8289fc58 utils: code cleanup/refactoring
no semantic change intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-04 10:27:19 +02:00
Thomas Lamprecht
ff7ee78453 disk smart: fix layout, enable autoscroll
`layout: fit` does not much on a leaf item node, it's for children
after all. So use it at top and enable autoscroll on the text
component.

Reported in the forum:
https://forum.proxmox.com/threads/gui-smart-details-cannot-be-scrolled-down.88566/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 09:39:47 +02:00
Thomas Lamprecht
7eb1fb18ad disk smart: code/indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 09:39:47 +02:00
Thomas Lamprecht
18b79e39cf info widget: set default warning threshold to 75%
60% is just way to low, this probably could be 80% or even 85% too,
in huge setups that normally means that there's still a lot of
resources left, but be conservative for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 09:39:47 +02:00
Thomas Lamprecht
713a7f9379 info widget: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-03 09:39:47 +02:00
Thomas Lamprecht
fc0a18e6c2 utils: add comment note for task descriptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-30 14:10:55 +02:00
Thomas Lamprecht
33d34da8a7 bump version to 2.5-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 19:30:14 +02:00
Fabian Ebner
9b4b243aa1 format task status: improve replace() usage
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-23 14:37:35 +02:00
Fabian Ebner
9865b73e56 format task status: rename variable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-23 14:37:35 +02:00
Fabian Ebner
4294143f92 task status: create helper for formatting
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-23 14:37:35 +02:00
Lorenz Stechauner
df096ae3fc toolkit: update email regex for acme account
Email regex only allowed two domain parts.
(probably copy/paste error from PVE::Tools)
Now allowing multiple domain parts.

Reported in our community forum:
https://forum.proxmox.com/threads/wrong-email-validation-when-adding-acme-account.88074/

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-04-23 10:36:41 +02:00
Thomas Lamprecht
b9a9ae8c75 bump version to 2.5-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 20:34:45 +02:00
Thomas Lamprecht
689fa8a52c status view: query and update pveInfoWidget too for now
we may want to replace them someday, at least with an intermediate
widget xtype for unified querying, but it's only going through the
local descendant, which is not that bad size-wise, so don't care..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 20:30:31 +02:00
Wolfgang Bumiller
ef7a8290db acme: separate flag to disable the 'domains=' array
PVE has 2 domain lists, PMG only 1 since it requires the
additional type.

In PBS I do not want to have 2 lists either, since it seems
rather inconvenient to have 2 different ways to access the
same list.

Currently we decide this based on whether we have multiple
certificate types, which in PBS we don't, so we need a
separate option for this.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-04-22 19:57:28 +02:00
Stefan Reiter
6f9f9c71b3 FileBrowser: show errors in messagebox and allow expand 'all'
If an error is received upon expanding a node, chances are the rest of
the tree is still valid (i.e. opening a partition fails because it
doesn't contain a supported filesystem). Only show an error box for the
user, but don't mask the component in that case. Additionally, disable
the download button.

Also support an archive set to 'all' to expand all children, useful for
initializing a file-restore VM on initial load.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-22 17:52:52 +02:00
Stefan Reiter
c1c8cfa85b FileBrowser: support 'virtual'/'v' file type
Denotes objects like disks ".img.fidx" files, which shouldn't be
downloadable, but should still approximate a directory entry.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-22 17:52:52 +02:00
Stefan Reiter
661faeedf5 Utils: add errorCallback to monStoreErrors
Call a function to decide if we want to mask the component. If the
callback returns true, we assume it has already handled the error (i.e.
shown a messagebox or similar) and skip masking.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-22 17:52:52 +02:00
Thomas Lamprecht
1334cdcabc utils: render_cpu: fix theoretical bug
seems almost like this came from a failed application of the rules of
de-morgan...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 17:48:41 +02:00
Thomas Lamprecht
9e663a6a64 utils: code cleanup and refactoring
Looks like more change than it actually is, see
`--word-diff=color --word-diff-regex='\w+'`.

The single semantic change is the added space in the render_cpu,
between the maxcpu value and CPU/s text

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 17:47:41 +02:00
Thomas Lamprecht
0d58bef75c node status view: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 15:32:27 +02:00
Dominik Csapak
b87d473347 panel: add StatusView from PVE
with 2 minor fixups:
* one lint error
* binding of the 'updateValues' function in the event
  (we want to avoid breaking this when used in a context where
  a controller exists, in that case using a string will only look in
  the controller and not in the component itself anymore, so use
  the function directly)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 13:25:22 +02:00
Dominik Csapak
d365540e14 Utils: refactor updateColumns from pve-manager
we want to reuse this in pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 13:25:22 +02:00
Dominik Csapak
bf147dccb8 bring over some icons from PVE
we want to reuse them in PBS

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 13:25:22 +02:00
Dominik Csapak
ef3f1cfcc4 Utils: add several render functions from PVE
we need the 'render_cpu_model' and '*_usage' methods in PBS,
the rest are the dependencies

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 13:25:22 +02:00
Thomas Lamprecht
cca5fa0ad9 safe destroy: fix class alias
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:22:05 +02:00
Thomas Lamprecht
f2d18cd7b3 safe destroy: code/readability cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 12:47:54 +02:00
Fabian Ebner
1488907695 safe destroy: allow specifing additional items
to be used to add more checkboxes for PVE's guest destroy use case.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:39:44 +02:00
Fabian Ebner
2b1f7bb066 safe destroy: remove purge checkbox
To be replaced by generic additional items specified by the user of the window
or child class. AFAICS there are no existing users of this widget yet, so this
shouldn't break anything.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:39:44 +02:00
Thomas Lamprecht
9531c6594e rrd chart: fix y-axis segmentation when using powerOfTwo
The chart axis get initialized really, so changing the segmenter in
initComponent is not possible anymore, we can only alter the chart
base config in the constructor.

Luckily, the actual segmentation happens later, so we can pass a
flag to the y-axis and hook into the segmenter directly by creating
a new one derived from 'Ext.chart.axis.segmenter.Numeric'.

There we override the preferStep and exactStep methods to decide if
we want to calculate with base 10 or base 2.

So add a constructor to RRDChart and set the axis with the respective
segmenter, depending on the powerOfTwo config, up there initially.

Note: that makes overwriting the axes from a caller impossible, but
we do not use that anywhere, and we can control the more important
parts of the axes, like label or units already otherwise, so seems
not really required, and if, its not to hard to solve (either by
always using our new segmenter by default and handle the different
bases there directly, or by adding an explicit do not touch axes
config flag, or the like).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-17 19:20:53 +02:00
Thomas Lamprecht
4337ad5b74 rrd chart: add option to render values as power of two base
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-15 19:02:33 +02:00