node/APTRepositories: rework top status and error grid
instead of having a title bar and a seperate error grid,
add an always visible panel that displays the status (ok, warning, errors)
which also contains the error grid (if necessary, ala ceph summary)
this makes the panel more consistent to use and it is immediatly
visible if something is wrong
this also adds a test for the 'test' repositories, as well as a test
for not correctly configured suites
css: fix debian openlogo background-size for chrom* based browsers
The debian one higher than wide and it seems, contrary to my belief,
the background-size is not taken for both, height and width if only
one param is set, but rather the second paramet height then defaults
to `auto` which Firefox and Chromium handle different in this case.
Set both to make this fixed.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 30 Jun 2021 19:47:53 +0000 (21:47 +0200)]
node: repos: use warning, not critical for suite-errors if disabled
As in that case it's actually safe, so rather show as warning, albeit
even info/notice like would probably be enough, but still, it is not
a configuration that is wanted permanently.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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.
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
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>
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.
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>
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>
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'
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)
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
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
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
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
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:
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>
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>