Commit Graph

756 Commits

Author SHA1 Message Date
Thomas Lamprecht
65f4704b62 node: repos: handle that components can be undefined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 19:09:42 +02:00
Thomas Lamprecht
38c1f53f83 bump version to 3.2-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:34:47 +02:00
Thomas Lamprecht
eb1fff8294 node: repo: use more stati-schema like code style to configure store
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:34:46 +02:00
Thomas Lamprecht
7705801f48 node: repo: use more stati-schema like code style to set grouping feature
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:21:17 +02:00
Thomas Lamprecht
faacb77fb4 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>
2021-07-03 16:06:17 +02:00
Thomas Lamprecht
99829a9e78 bump version to 3.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:12:38 +02:00
Thomas Lamprecht
c7ca21b4b8 node: repo: health: drop br line-breaks, replaced by flex display
Firefox ignores them anyway but chrome adds them additionally, making
it look rather weird..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:09:09 +02:00
Thomas Lamprecht
96ecd62ac1 ui: repo status: adapt some warning/error gettexts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:59:56 +02:00
Thomas Lamprecht
46231d0da2 ui: repo status: do not duplicate warning to health icon
It feels quite weird to have the last warning text duplicated, the
left health icon should be a very concise summary only.

allow one to force it by setting important, but that's not yet used
anywhere.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:58:27 +02:00
Thomas Lamprecht
fe787c8c12 fixup! ui: repo status: code cleanup/refactoring 2021-07-02 23:58:02 +02:00
Thomas Lamprecht
f411afb40c ui: repo status: adapt flex-ratio and center health vertically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:57:20 +02:00
Thomas Lamprecht
5267494a87 css: add centered-flex-column class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:56:19 +02:00
Thomas Lamprecht
df7def01a1 ui: repo status: code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:12:53 +02:00
Thomas Lamprecht
de73e0b3d8 add OpenID icon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 21:58:09 +02:00
Dominik Csapak
5e0cecb7d5 node/APTRepositories: improve error/warning display
always show grid besides status, with the accumulated
stati/warnings/errors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 16:28:53 +02:00
Dominik Csapak
f59d1076d7 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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 15:31:25 +02:00
Dominik Csapak
fbbe68fd69 Utils: add get_health_icon from PVE
we'll need it here too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 15:31:25 +02:00
Thomas Lamprecht
cd20320b7f utils: followup: fix base class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:17:47 +02:00
Thomas Lamprecht
e722f108aa ui: Utils: refactor userid parsing to Utils
Originally-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:06:26 +02:00
Thomas Lamprecht
e8c60b3215 utils: add getOpenIDRedirectionAuthorization: to avoid code-duplication
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 13:53:11 +02:00
Thomas Lamprecht
665b206b0f 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>
2021-07-02 09:18:45 +02:00
Thomas Lamprecht
4fc57df439 fixup comment
forgot to save in vim when editing the comment before committing..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 08:09:39 +02:00
Thomas Lamprecht
0668981954 node: repo: highlight proxmox repos that are not producition-ready
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 08:04:39 +02:00
Thomas Lamprecht
58b7186065 node: repos: fix reversed validation on configured
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 10:49:25 +02:00
Fabian Ebner
d7aeb02f3e apt repos: use correct URL
so there is a 'result' property, which the window expects.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-01 10:46:22 +02:00
Thomas Lamprecht
824f997749 node: repos: fix add repo validator
isValid is a boolean not a callback, so won't really work and just
set the state once.

Use the `validator` and first call into the parents helper, then do
our logic and return a string  with an explanation in the expected
invalid case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 10:43:12 +02:00
Thomas Lamprecht
f0966f2930 node: repos: fallback to "Other" for unknown origin
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:58:29 +02:00
Thomas Lamprecht
5a1fddb622 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>
2021-06-30 21:47:57 +02:00
Thomas Lamprecht
205d2751f4 node: repos: fade text of disabled rows
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:47:20 +02:00
Thomas Lamprecht
5e9eb2456c node: repos: increase width of add-repo window + style cleanup
We have some longer descriptions so the default width looks crammed.

Also, avoid a intermediate variable which is only used once without
any change.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:46:12 +02:00
Dominik Csapak
7f671fee58 APTRepositories: remove unecessary selection model
this is the default anyway, no reason to explicitely create it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
e71fc6e438 APTRepositories: make the Suites warnings inline errors
by iterating only once over the info array and adding them directly
to the records this way we can avoid iterating over the records
again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
003c49829d 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>
2021-06-30 21:27:04 +02:00
Dominik Csapak
82071150f7 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>
2021-06-30 21:27:04 +02:00
Dominik Csapak
d8b5cd80c8 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>
2021-06-30 21:27:04 +02:00
Thomas Lamprecht
036f48c14d node: repos: render Origin logo for Debian & Proxmox
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Fabian Ebner
21860ea45c node: apt: spawn a window for adding repository
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
3dfb0b9a2b css: increase padding for Debian and Proxmox symbol logos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
77d6d9929e 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>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
259c29df9f 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>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
a8ab1d9820 node: services: fix logic for displaying unit state
still hacky but at least works now ;-)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
03325cedcf buildsys: do not install css or images with executable flag
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 15:20:20 +02:00
Thomas Lamprecht
87c64c495e css: some markdown heading and paragraph font-size & padding tuning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 14:21:50 +02:00
Fabian Ebner
d91987a558 apt repositories: replace OfficialHost with Origin
to adapt to the new backend behavior.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 13:41:21 +02:00
Thomas Lamprecht
e972890e69 add basic .gitignore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-29 12:21:06 +02:00
Thomas Lamprecht
0970ef7fb0 bump version to 3.1-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 19:14:50 +02:00
Thomas Lamprecht
6fc91fc698 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>
2021-06-28 16:19:40 +02:00
Dominik Csapak
9e059d560c 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>
2021-06-28 16:06:49 +02:00
Thomas Lamprecht
5995eddcc4 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>
2021-06-25 08:42:44 +02:00
Thomas Lamprecht
f5853d4605 bump version to 3.1-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 23:11:46 +02:00