]> git.proxmox.com Git - proxmox-widget-toolkit.git/log
proxmox-widget-toolkit.git
2 years agoAPTRepositories: change updating button text/state to viewcontroller
Dominik Csapak [Wed, 30 Jun 2021 15:14:57 +0000 (17:14 +0200)]
APTRepositories: change updating button text/state to viewcontroller

we already have a viewmodel we can use, and so the handler does
not have to navigate the component tree up/down

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoAPTRepositories: make panel scrollable
Dominik Csapak [Wed, 30 Jun 2021 15:14:56 +0000 (17:14 +0200)]
APTRepositories: make panel scrollable

so that it is still usable with many errors and/or repositories

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoAPTRepositories: change separation style between panels
Dominik Csapak [Wed, 30 Jun 2021 15:14:55 +0000 (17:14 +0200)]
APTRepositories: change separation style between panels

having double borders does not look so nice, separate them with a bit
of padding

also change the warning panel to a simple header

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agonode: repos: render Origin logo for Debian & Proxmox
Thomas Lamprecht [Wed, 30 Jun 2021 19:26:18 +0000 (21:26 +0200)]
node: repos: render Origin logo for Debian & Proxmox

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode: apt: spawn a window for adding repository
Fabian Ebner [Wed, 30 Jun 2021 15:07:54 +0000 (17:07 +0200)]
node: apt: spawn a window for adding repository

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agocss: increase padding for Debian and Proxmox symbol logos
Thomas Lamprecht [Wed, 30 Jun 2021 19:21:25 +0000 (21:21 +0200)]
css: increase padding for Debian and Proxmox symbol logos

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoimages: use svgcleaner to reduce logo SVG sizes
Thomas Lamprecht [Wed, 30 Jun 2021 18:30:31 +0000 (20:30 +0200)]
images: use svgcleaner to reduce logo SVG sizes

Used svgcleaner[0] with the following safe[1] command:

```
svgcleaner INPUT.svg OUTPUT.svg --indent 1 --resolve-use no \
 --convert-shapes no --group-by-style no --join-arcto-flags no \
 --join-style-attributes no --remove-comments no --remove-declarations no \
 --remove-invisible-elements no --remove-metadata no \
 --remove-nonsvg-attributes no --remove-nonsvg-elements no \
 --remove-text-attributes no --remove-title no \
 --remove-unreferenced-ids no --trim-ids no --ungroup-groups no \
 --list-separator comma
```

Resulting size reductions:

Debian   22.51% smaller
Proxmox  51.00% smaller

Note that the Debian one had a small issue with a unused variable set
which I reported[2] and cleaned up manually for now.

[0]: https://github.com/RazrFalcon/svgcleaner
[1]: https://commons.wikimedia.org/wiki/User:JoKalliauer/Optimization#svgcleaner
[2]: https://github.com/RazrFalcon/svgcleaner/issues/240

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd Debian and Proxmox symbol logos and css
Thomas Lamprecht [Wed, 30 Jun 2021 16:24:45 +0000 (18:24 +0200)]
add Debian and Proxmox symbol logos and css

also add a new 'pmx-itype-icon' helper class for the classic bg
repeat/position option to allow more easier reuse

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode: services: fix logic for displaying unit state
Thomas Lamprecht [Wed, 30 Jun 2021 19:21:55 +0000 (21:21 +0200)]
node: services: fix logic for displaying unit state

still hacky but at least works now ;-)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: do not install css or images with executable flag
Thomas Lamprecht [Wed, 30 Jun 2021 13:20:20 +0000 (15:20 +0200)]
buildsys: do not install css or images with executable flag

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocss: some markdown heading and paragraph font-size & padding tuning
Thomas Lamprecht [Wed, 30 Jun 2021 12:21:50 +0000 (14:21 +0200)]
css: some markdown heading and paragraph font-size & padding tuning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repositories: replace OfficialHost with Origin
Fabian Ebner [Wed, 30 Jun 2021 10:20:19 +0000 (12:20 +0200)]
apt repositories: replace OfficialHost with Origin

to adapt to the new backend behavior.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoadd basic .gitignore
Thomas Lamprecht [Tue, 29 Jun 2021 10:21:06 +0000 (12:21 +0200)]
add basic .gitignore

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.1-4
Thomas Lamprecht [Mon, 28 Jun 2021 17:14:50 +0000 (19:14 +0200)]
bump version to 3.1-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode tasks: fixup overly-short comment lengths
Thomas Lamprecht [Mon, 28 Jun 2021 14:19:38 +0000 (16:19 +0200)]
node tasks: fixup overly-short comment lengths

The minimum "max length" should be 80cc, and 100cc is also fine.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode/Tasks: merge improvements from PBS and make it more generic
Dominik Csapak [Thu, 24 Jun 2021 07:16:16 +0000 (09:16 +0200)]
node/Tasks: merge improvements from PBS and make it more generic

this copies most of the task grid from pbs, but adds handling so that
users can add aribtrary filter fields

the filter fields always present are:
* since
* until
* task type
* task status

other filters fields can be added by giving an 'extraFilter' array
which must contain widget definitions that emit a 'change' event.
this is then used to update the filters for the api call

also you can add a 'preFilter' object, that sets the filter parameter
only once at the beginning

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agocbind mixin: also descend in elements with an cbind property
Thomas Lamprecht [Fri, 25 Jun 2021 06:42:39 +0000 (08:42 +0200)]
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>
2 years agobump version to 3.1-3
Thomas Lamprecht [Wed, 23 Jun 2021 21:11:46 +0000 (23:11 +0200)]
bump version to 3.1-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: move Official to the right & use checkbox to render enabled
Thomas Lamprecht [Wed, 23 Jun 2021 17:57:30 +0000 (19:57 +0200)]
apt repos: move Official to the right & use checkbox to render enabled

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: add product config-option and rework warning renderer
Thomas Lamprecht [Wed, 23 Jun 2021 17:42:08 +0000 (19:42 +0200)]
apt repos: add product config-option and rework warning renderer

product defaults to PVE. It is added in the warnings and should be
set by any instance correctly.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: make add-repo a checked command
Thomas Lamprecht [Wed, 23 Jun 2021 17:40:54 +0000 (19:40 +0200)]
apt repos: make add-repo a checked command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: style grouping headers a bit different
Thomas Lamprecht [Wed, 23 Jun 2021 17:39:46 +0000 (19:39 +0200)]
apt repos: style grouping headers a bit different

else the repo/header difference is not that big, and it gets a bit
hard to read as it feels a bit monotonic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: make enable/disable text selection dependent
Thomas Lamprecht [Wed, 23 Jun 2021 17:38:29 +0000 (19:38 +0200)]
apt repos: make enable/disable text selection dependent

the size hack is copied over from pve-manager's qemu/HardwareView

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: code/format cleanups
Thomas Lamprecht [Wed, 23 Jun 2021 17:00:57 +0000 (19:00 +0200)]
apt repos: code/format cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd buttons for add/enable/disable
Fabian Ebner [Wed, 23 Jun 2021 13:39:00 +0000 (15:39 +0200)]
add buttons for add/enable/disable

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoadd UI for APT repositories
Fabian Ebner [Wed, 23 Jun 2021 13:38:59 +0000 (15:38 +0200)]
add UI for APT repositories

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agonode/services: show masked and some unknown units as disabled (greyed out)
Thomas Lamprecht [Wed, 23 Jun 2021 13:55:00 +0000 (15:55 +0200)]
node/services: show masked and some unknown units as disabled (greyed out)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode/services: disable start/stop for masked and unknown units-states
Thomas Lamprecht [Wed, 23 Jun 2021 13:54:17 +0000 (15:54 +0200)]
node/services: disable start/stop for masked and unknown units-states

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode/services: optionally show unit/active states
Thomas Lamprecht [Wed, 23 Jun 2021 13:53:29 +0000 (15:53 +0200)]
node/services: optionally show unit/active states

show unit state by default for PVE, with a bit of an hack

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode/service view: code cleanups
Thomas Lamprecht [Tue, 22 Jun 2021 12:39:29 +0000 (14:39 +0200)]
node/service view: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopanel/JournalView: fix flickering in journal livemode
Dominik Csapak [Tue, 22 Jun 2021 09:57:25 +0000 (11:57 +0200)]
panel/JournalView: fix flickering in journal livemode

it seems that something changed in extjs 7 which does not quite
restore the correct scroll position when the identical content is set
on a component. this means that sometimes, we update the text
with the identical one, but the scroll position is now off, only
to scroll back to the bottom

this causes a flickering everytime we do the api call.

instead, only update the component when the content really changed.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agocss: markdown: add some nicer blockquote styling
Thomas Lamprecht [Mon, 21 Jun 2021 16:08:06 +0000 (18:08 +0200)]
css: markdown: add some nicer blockquote styling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoparser: sanitize HTML: allow 'disabled', 'start', 'type' and 'checked' attributes
Thomas Lamprecht [Mon, 21 Jun 2021 15:37:27 +0000 (17:37 +0200)]
parser: sanitize HTML: allow 'disabled', 'start', 'type' and 'checked' attributes

This makes check box lists like the following snipped work:

- [X] Done
- [ ] not done

Further allow the start attr, sometimes generated for ordered lists.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocss: markdown: add some nicer table styling
Thomas Lamprecht [Mon, 21 Jun 2021 14:24:27 +0000 (16:24 +0200)]
css: markdown: add some nicer table styling

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.1-2
Thomas Lamprecht [Fri, 18 Jun 2021 13:32:31 +0000 (15:32 +0200)]
bump version to 3.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agointegrate marked as markdown parser
Thomas Lamprecht [Fri, 18 Jun 2021 12:57:20 +0000 (14:57 +0200)]
integrate marked as markdown parser

Define our own, rather minimal interface so that we change the parser
under the hood if ever needed, I already did so once during
evaluating this, as first I checked out Snarkdown[0], which is really
nice for the few lines of code it needs, but is a bit to limited for
the use case.

Currently marked[1] is used, provided by the libjs-marked Debian
package.

For now statically link the marked parser in on built time to avoid
the need to add new directories to serve in our pve/pmg/pbs proxies.
This is a bit ugly but can be cleaned up afterwards transparently
too.

We sanitize the produced HTML ourselves (most MD JS parser/renderer
don't do that) by creating a real, but not active, DOM tree and
recursively prune bad nodes/attrs from it and let it spit out HTML
again at the end. While a tad inefficient it really won't matter for
our use case, as the notes/comments we render are only a few KiB of
text and it's done on the client side anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/copyright: mark license explicitly and indent like machine readable format
Thomas Lamprecht [Fri, 18 Jun 2021 13:18:11 +0000 (15:18 +0200)]
d/copyright: mark license explicitly and indent like machine readable format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: network: add columns for vlan-id and vlan-raw-device
Aaron Lauterer [Mon, 12 Apr 2021 13:14:37 +0000 (15:14 +0200)]
ui: network: add columns for vlan-id and vlan-raw-device

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agobuildsys: change upload dist to bullseye
Thomas Lamprecht [Tue, 8 Jun 2021 07:46:54 +0000 (09:46 +0200)]
buildsys: change upload dist to bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocombo grid: load: rework auto-selection and validity logic
Thomas Lamprecht [Mon, 7 Jun 2021 16:03:25 +0000 (18:03 +0200)]
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>
2 years agocombo grid: reformat/place comment
Thomas Lamprecht [Mon, 7 Jun 2021 16:02:08 +0000 (18:02 +0200)]
combo grid: reformat/place comment

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.1-1
Thomas Lamprecht [Wed, 2 Jun 2021 14:18:37 +0000 (16:18 +0200)]
bump version to 3.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopanel: disks: more static task window creation
Thomas Lamprecht [Wed, 2 Jun 2021 14:26:43 +0000 (16:26 +0200)]
panel: disks: more static task window creation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: cleanup variable names/grouping
Thomas Lamprecht [Wed, 2 Jun 2021 14:10:58 +0000 (16:10 +0200)]
buildsys: cleanup variable names/grouping

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: enforce eslint for api-viewer
Thomas Lamprecht [Wed, 2 Jun 2021 14:10:31 +0000 (16:10 +0200)]
buildsys: enforce eslint for api-viewer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi-viewer: eslint fixes, code cleanups
Thomas Lamprecht [Wed, 2 Jun 2021 14:08:32 +0000 (16:08 +0200)]
api-viewer: eslint fixes, code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi-viewer: drop unused clicmdhash
Thomas Lamprecht [Wed, 2 Jun 2021 14:08:06 +0000 (16:08 +0200)]
api-viewer: drop unused clicmdhash

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi viewer: rename gloabl schema variable and tell eslint about it
Thomas Lamprecht [Wed, 2 Jun 2021 12:46:32 +0000 (14:46 +0200)]
api viewer: rename gloabl schema variable and tell eslint about it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi viewer: eslint (auto) fixes + slight cleanup
Thomas Lamprecht [Wed, 2 Jun 2021 12:43:51 +0000 (14:43 +0200)]
api viewer: eslint (auto) fixes + slight cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodon't shout: s/APIVIEWER/APIViewer/
Thomas Lamprecht [Wed, 2 Jun 2021 12:43:13 +0000 (14:43 +0200)]
don't shout: s/APIVIEWER/APIViewer/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd proxmox-widget-toolkit-dev package
Dominik Csapak [Fri, 28 May 2021 12:13:41 +0000 (14:13 +0200)]
add proxmox-widget-toolkit-dev package

used for various other packages to dev-depend on (e.g. pve-docs)
which only contains the Toolkit.js for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoadd api-viewer source
Dominik Csapak [Fri, 28 May 2021 12:13:40 +0000 (14:13 +0200)]
add api-viewer source

so that we can reuse it across products
source was 'pbs' since that had the most features (http upgrade check)

a few changes to combine pve/pbs/pmg:
* use an optional 'cliusage' function it it exists to determine CLI usage
* check allowtoken for undefined to see if it is allowed or not
* use 'pmxapi' instead of pbs/pmg/pveapi
* rename all occurrences of 'pve' to 'pmx'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: move defaultDownloadServerUrl override to panel/RRDChart
Dominik Csapak [Fri, 28 May 2021 12:13:39 +0000 (14:13 +0200)]
Toolkit: move defaultDownloadServerUrl override to panel/RRDChart

not all users of Toolkit.js have the charts lib loaded, which means
the class does not exist then.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodisk list: add wipe disk button
Fabian Ebner [Fri, 23 Apr 2021 10:14:59 +0000 (12:14 +0200)]
disk list: add wipe disk button

which shows a confirm dialog with the most relevant information before actually
issuing the API call.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agodisk list: move title bar initialization to initComponent
Fabian Ebner [Fri, 23 Apr 2021 10:14:58 +0000 (12:14 +0200)]
disk list: move title bar initialization to initComponent

to conditionally add more buttons later on.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobuildsys: touch incremental-lint in check target to avoid triggering twice
Thomas Lamprecht [Fri, 28 May 2021 08:40:19 +0000 (10:40 +0200)]
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>
2 years agopanel/RRDChart: fix animation settings for highlight/marker
Dominik Csapak [Thu, 27 May 2021 13:15:58 +0000 (15:15 +0200)]
panel/RRDChart: fix animation settings for highlight/marker

in extjs 7.0, the marker does not have the 'fx' property anymore,
but the now documented 'animation' property does not work as it seems.

instead set the animation settings directly on the chart. The only
downside is that this is now for *all* animations, not only the
fade in of the highlight. (the default duration is 500ms)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: remove Datepicker fix
Dominik Csapak [Wed, 26 May 2021 08:58:39 +0000 (10:58 +0200)]
Toolkit: remove Datepicker fix

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: remove textarea fix
Dominik Csapak [Wed, 26 May 2021 08:58:38 +0000 (10:58 +0200)]
Toolkit: remove textarea fix

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: remove pie chart fix
Dominik Csapak [Wed, 26 May 2021 08:58:37 +0000 (10:58 +0200)]
Toolkit: remove pie chart fix

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: remove firefox touchscreen override
Dominik Csapak [Wed, 26 May 2021 08:58:36 +0000 (10:58 +0200)]
Toolkit: remove firefox touchscreen override

seems to be fixed, at least i could not reproduce here.
If users report this again, we can still revert it if necessary.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: update focusJump override
Dominik Csapak [Wed, 26 May 2021 08:58:35 +0000 (10:58 +0200)]
Toolkit: update focusJump override

upstream code changed a bit, update to current version

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: update overrides for scroll fixes
Dominik Csapak [Wed, 26 May 2021 08:58:34 +0000 (10:58 +0200)]
Toolkit: update overrides for scroll fixes

while some scrolling issues where fixed since 6.0.1, some where introduced,
namely:
* for firefox, the correct event to listen to is 'wheel' not 'mousewheel'
* the spinner scroll direction was incorrect
* the boxOverflow scroll direction was incorrect
* the boxOverflow scroll amount was too high

functions were copied from extjs source, eslintified, and adapted

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agopanel/RRDChart: fix legend/undoZoom
Dominik Csapak [Wed, 26 May 2021 08:58:33 +0000 (10:58 +0200)]
panel/RRDChart: fix legend/undoZoom

the legend is by default of type 'sprite', rever to 'dom'
but we now have to unset the '.legend', else on destruction
extjs tries to destroy it twice

also change the onAfterAnimation listener to 'redraw', since
the original event does not exist anymore, add a buffer to it
so that it is not that heavy

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agocss: add css changes for treelist
Dominik Csapak [Wed, 26 May 2021 08:58:32 +0000 (10:58 +0200)]
css: add css changes for treelist

add a new class 'x-treelist-pve-nav' so that we can use
ui: 'pve-nav'
instead of
ui: 'nav'
which has some default styling we do not want

also overwrite the font to FontAwesome
(extjs 7.0 uses 'FontAwesome 5 Free' which we do not ship)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: set clearPropertiesOnDestroy to false by default
Dominik Csapak [Wed, 26 May 2021 08:58:31 +0000 (10:58 +0200)]
Toolkit: set clearPropertiesOnDestroy to false by default

instead of the upstream default of 'async'

we do this since it creates some problems with our callbacks which can
happen during component destruction. The upstream reasoning does not
really makes sense for us normally, since we do not keep any references
around for most things, and thus the garbage collector can claim it.

note that this is only for components, Ext.Base sets it to 'true' by
default and we do not change this since we normally do not extend
from non-components

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoToolkit: set download url for draw containers to '-'
Dominik Csapak [Wed, 26 May 2021 08:58:30 +0000 (10:58 +0200)]
Toolkit: set download url for draw containers to '-'

so that there can be no privacy leak, since the default points
to senchas server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agodata/ProxmoxProxy: set responseType to undefined for XMLHTTPRequest
Dominik Csapak [Wed, 26 May 2021 08:58:29 +0000 (10:58 +0200)]
data/ProxmoxProxy: set responseType to undefined for XMLHTTPRequest

extjs 7.0 gives the responseType to the XMLHTTPRequest (which
is 'json' for a json reader), but that means that the response is
automatically decoded by the browser, with no means to get the original
return back

in our case, for successful api calls it would work, but some of our
errors are plain text, not json, so the decoded json object is 'null'
and we lose the error information

revert the type to 'undefined' which tells the browser not do do any
decoding

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoobject grid: line-wrap cleanup
Thomas Lamprecht [Sun, 23 May 2021 14:23:17 +0000 (16:23 +0200)]
object grid: line-wrap cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoobject grid: improve/add to documentation
Thomas Lamprecht [Fri, 21 May 2021 15:15:21 +0000 (17:15 +0200)]
object grid: improve/add to documentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoobject grid: allow one to declaratively specify rows
Thomas Lamprecht [Fri, 21 May 2021 14:39:23 +0000 (16:39 +0200)]
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>
2 years agoobject grid: code cleanup
Thomas Lamprecht [Fri, 21 May 2021 14:38:37 +0000 (16:38 +0200)]
object grid: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.0-2
Thomas Lamprecht [Fri, 14 May 2021 08:35:03 +0000 (10:35 +0200)]
bump version to 3.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodisk smart: fix non working smart value window
Lorenz Stechauner [Fri, 14 May 2021 07:16:10 +0000 (09:16 +0200)]
disk smart: fix non working smart value window

fix regression in refactor from commit 7eb1fb18ad6a243953c

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>
2 years agobump version to 3.0-1
Thomas Lamprecht [Thu, 13 May 2021 17:46:57 +0000 (19:46 +0200)]
bump version to 3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodebian: various trivial updates
Thomas Lamprecht [Thu, 13 May 2021 17:45:05 +0000 (19:45 +0200)]
debian: various trivial updates

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump debhelper compat level to 12
Thomas Lamprecht [Thu, 13 May 2021 17:44:45 +0000 (19:44 +0200)]
d/control: bump debhelper compat level to 12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 2.5-4
Thomas Lamprecht [Fri, 7 May 2021 16:02:04 +0000 (18:02 +0200)]
bump version to 2.5-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodisk list: factor out renderers for type and usage
Fabian Ebner [Fri, 23 Apr 2021 10:14:57 +0000 (12:14 +0200)]
disk list: factor out renderers for type and usage

to be re-used later.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agodisk list: fix minor usage renderer issue
Fabian Ebner [Fri, 23 Apr 2021 10:14:56 +0000 (12:14 +0200)]
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>
2 years agoformat/render size: allow one to specifiy if base 2 or 10 is desired
Thomas Lamprecht [Tue, 4 May 2021 08:33:28 +0000 (10:33 +0200)]
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>
2 years agoutils: code cleanup/refactoring
Thomas Lamprecht [Tue, 4 May 2021 08:27:17 +0000 (10:27 +0200)]
utils: code cleanup/refactoring

no semantic change intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodisk smart: fix layout, enable autoscroll
Thomas Lamprecht [Mon, 3 May 2021 07:38:29 +0000 (09:38 +0200)]
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>
2 years agodisk smart: code/indentation cleanup
Thomas Lamprecht [Mon, 3 May 2021 07:31:59 +0000 (09:31 +0200)]
disk smart: code/indentation cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoinfo widget: set default warning threshold to 75%
Thomas Lamprecht [Mon, 3 May 2021 07:33:24 +0000 (09:33 +0200)]
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>
2 years agoinfo widget: code cleanup
Thomas Lamprecht [Mon, 3 May 2021 07:33:08 +0000 (09:33 +0200)]
info widget: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoutils: add comment note for task descriptions
Thomas Lamprecht [Fri, 30 Apr 2021 12:10:55 +0000 (14:10 +0200)]
utils: add comment note for task descriptions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 2.5-3
Thomas Lamprecht [Sat, 24 Apr 2021 17:30:14 +0000 (19:30 +0200)]
bump version to 2.5-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoformat task status: improve replace() usage
Fabian Ebner [Fri, 9 Apr 2021 08:44:32 +0000 (10:44 +0200)]
format task status: improve replace() usage

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agoformat task status: rename variable
Fabian Ebner [Fri, 9 Apr 2021 08:44:31 +0000 (10:44 +0200)]
format task status: rename variable

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agotask status: create helper for formatting
Fabian Ebner [Fri, 9 Apr 2021 08:44:30 +0000 (10:44 +0200)]
task status: create helper for formatting

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
3 years agotoolkit: update email regex for acme account
Lorenz Stechauner [Fri, 23 Apr 2021 08:15:13 +0000 (10:15 +0200)]
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>
3 years agobump version to 2.5-2
Thomas Lamprecht [Thu, 22 Apr 2021 18:34:45 +0000 (20:34 +0200)]
bump version to 2.5-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agostatus view: query and update pveInfoWidget too for now
Thomas Lamprecht [Thu, 22 Apr 2021 18:30:28 +0000 (20:30 +0200)]
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>
3 years agoacme: separate flag to disable the 'domains=' array
Wolfgang Bumiller [Fri, 16 Apr 2021 13:35:17 +0000 (15:35 +0200)]
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>
3 years agoFileBrowser: show errors in messagebox and allow expand 'all'
Stefan Reiter [Thu, 22 Apr 2021 15:34:57 +0000 (17:34 +0200)]
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>
3 years agoFileBrowser: support 'virtual'/'v' file type
Stefan Reiter [Thu, 22 Apr 2021 15:34:56 +0000 (17:34 +0200)]
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>
3 years agoUtils: add errorCallback to monStoreErrors
Stefan Reiter [Thu, 22 Apr 2021 15:34:55 +0000 (17:34 +0200)]
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>
3 years agoutils: render_cpu: fix theoretical bug
Thomas Lamprecht [Thu, 22 Apr 2021 15:48:38 +0000 (17:48 +0200)]
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>
3 years agoutils: code cleanup and refactoring
Thomas Lamprecht [Thu, 22 Apr 2021 15:46:18 +0000 (17:46 +0200)]
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>