Commit Graph

756 Commits

Author SHA1 Message Date
Thomas Lamprecht
03c4c65bab apt repos: move Official to the right & use checkbox to render enabled
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:57:33 +02:00
Thomas Lamprecht
3fc020f417 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>
2021-06-23 19:42:14 +02:00
Thomas Lamprecht
0e79ce21c1 apt repos: make add-repo a checked command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:40:54 +02:00
Thomas Lamprecht
994fe897b7 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>
2021-06-23 19:39:48 +02:00
Thomas Lamprecht
bb64cd0341 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>
2021-06-23 19:38:34 +02:00
Thomas Lamprecht
af48de6bf8 apt repos: code/format cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:01:24 +02:00
Fabian Ebner
d76eedb46f add buttons for add/enable/disable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-23 16:01:06 +02:00
Fabian Ebner
24313a9d80 add UI for APT repositories
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-23 16:01:06 +02:00
Thomas Lamprecht
89de7ec504 node/services: show masked and some unknown units as disabled (greyed out)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 15:55:00 +02:00
Thomas Lamprecht
b6eedbba04 node/services: disable start/stop for masked and unknown units-states
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 15:54:17 +02:00
Thomas Lamprecht
6607de47e8 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>
2021-06-23 15:53:32 +02:00
Thomas Lamprecht
ab34f5b215 node/service view: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-22 14:40:34 +02:00
Dominik Csapak
17c320c831 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>
2021-06-22 12:46:26 +02:00
Thomas Lamprecht
f869d73e50 css: markdown: add some nicer blockquote styling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-21 18:08:06 +02:00
Thomas Lamprecht
a610dd9e32 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>
2021-06-21 17:37:38 +02:00
Thomas Lamprecht
d1c4a7389f css: markdown: add some nicer table styling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-21 16:24:27 +02:00
Thomas Lamprecht
59754b7bf8 bump version to 3.1-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 15:32:31 +02:00
Thomas Lamprecht
51a2f11c6b 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>
2021-06-18 15:19:29 +02:00
Thomas Lamprecht
00cbb47e09 d/copyright: mark license explicitly and indent like machine readable format
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 15:18:11 +02:00
Aaron Lauterer
3d886f9422 ui: network: add columns for vlan-id and vlan-raw-device
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-06-15 14:43:58 +02:00
Thomas Lamprecht
580ccacf1a buildsys: change upload dist to bullseye
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-08 09:46:54 +02:00
Thomas Lamprecht
142d5d2cdf 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:10:15 +02:00
Thomas Lamprecht
674895d354 combo grid: reformat/place comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-07 18:10:15 +02:00
Thomas Lamprecht
e8c1bffbcb bump version to 3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:26:54 +02:00
Thomas Lamprecht
4957686b0d panel: disks: more static task window creation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:26:54 +02:00
Thomas Lamprecht
94791efabb buildsys: cleanup variable names/grouping
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:10:58 +02:00
Thomas Lamprecht
b0e33a3e2a buildsys: enforce eslint for api-viewer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:10:31 +02:00
Thomas Lamprecht
ac4fa7fee8 api-viewer: eslint fixes, code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:08:32 +02:00
Thomas Lamprecht
5eb59676c3 api-viewer: drop unused clicmdhash
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 16:08:06 +02:00
Thomas Lamprecht
8556628c93 api viewer: rename gloabl schema variable and tell eslint about it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 14:46:32 +02:00
Thomas Lamprecht
52428d6055 api viewer: eslint (auto) fixes + slight cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 14:43:51 +02:00
Thomas Lamprecht
2f80505306 don't shout: s/APIVIEWER/APIViewer/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-02 14:43:13 +02:00
Dominik Csapak
ed9ae47edd 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>
2021-06-02 13:44:37 +02:00
Dominik Csapak
4ae75df35d 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>
2021-06-02 13:44:37 +02:00
Dominik Csapak
53758e164a 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>
2021-06-02 13:44:37 +02:00
Fabian Ebner
d453438aa0 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>
2021-06-02 13:19:42 +02:00
Fabian Ebner
e3a5040c55 disk list: move title bar initialization to initComponent
to conditionally add more buttons later on.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-02 13:19:42 +02:00
Thomas Lamprecht
557c45056c 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>
2021-05-28 10:40:21 +02:00
Dominik Csapak
fe3a919417 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>
2021-05-28 07:56:23 +02:00
Dominik Csapak
a78ec00494 Toolkit: remove Datepicker fix
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-27 13:37:36 +02:00
Dominik Csapak
65ed0bf8b8 Toolkit: remove textarea fix
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-27 13:37:36 +02:00
Dominik Csapak
97b71d24a5 Toolkit: remove pie chart fix
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-27 13:37:36 +02:00
Dominik Csapak
10a6a6d5ef 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
9c1296e503 Toolkit: update focusJump override
upstream code changed a bit, update to current version

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-05-27 13:37:36 +02:00
Dominik Csapak
d78eb5ec99 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
fef7d02477 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
ee4801472d 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
322de5629f 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
518dd0b6d9 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>
2021-05-27 13:37:36 +02:00
Dominik Csapak
fba354621f 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>
2021-05-27 13:37:36 +02:00