added the following (necessary) changes:
* use Proxmox.Utils.authSchema
* omit the sync button/handler, but add a possibilty to add extra buttons
* check for an 'edit' property in the authSchema for enabling editing
* removed the onlineHelp property
* removed 'TFA' column (can be added by the caller)
node: repos: only show suites warning at the top if enabled repository is affected
The warning still shows up for the disabled repository itself, but
having a disabled repository with a bad suite is not problematic for
the configuration status as a whole.
alows to make the code simpler too, but we need to instantiate the
selection model explicitly, as we use a bit of a weird layout here to
be able to show the pending changes at the bottom, if any, so the
main gridpanel is not the parent of the toolbar buttons, so the
std-remove button does not automatically finds the selection model
when searching in the parent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
since we use a buffered store on a grid, we cannot use our
normal monStoreErrors from Utils (The store on the grid is a memorystore
without our 'proxmox' proxy, and the store in the viewmodel is not
initialized yet in the init)
simply set the mask in the already existing 'updateLayout' function
which is exactly the right place for the buffered store load
since we use a remotefilter on a bufferedstore, the only event where
we can check if the selected element is still there is the 'refresh'
event. Simply deselect if the seleceted element is not in the store
The href, and in some browser also the src attrs on img, or a tags
can be made to execute JS rather easily, catch thoseand just remove
the attr if, after creating an URL object from it, it does not looks
like it's a http(s) request.
Further, filter out the style tag completely, as that can be misused
too, even if only to break cosmetics.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
node: repo: avoid using IDs on elements, as that breaks easily on clusters
Anything where more instances can exist, even if only for a very
short time, must NOT use `id` as that needs to be unique in all
current instances of components/elements of the whole gui.
Here it broke most of the gui when switching between node, as the new
nodes repo gui was instantiated before the old ones was completely
destroyed, so there where (at least) two elements with the same id ->
💥 boom.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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>