Commit Graph

681 Commits

Author SHA1 Message Date
Dominik Csapak
6a504e1995 add window/AuthEditBase from PVE
basically a straight copy, with the exception that it references
Proxmox.Utils.authSchema instead of PVE.Utils.authSchema

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 14:46:27 +02:00
Fabian Ebner
e455399aef 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.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-09 14:42:55 +02:00
Thomas Lamprecht
89b0dd2e4f bump version to 3.2-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-08 14:32:40 +02:00
Dominik Csapak
68152254af window/SafeDestroy: add taskDone and apiCallDone callbacks
like in edit window, so we can reacto to a successful task/api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-08 14:07:19 +02:00
Fabian Ebner
bfab8fc134 node: tasks: use helper to format status again
which avoids the all-caps "WARNINGS:" and uses the localized version.
The call was thrown out by the big overhaul in
9e059d560c.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-08 11:50:27 +02:00
Thomas Lamprecht
bb5511d569 network: use std remove button for confirm
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>
2021-07-06 20:55:56 +02:00
Thomas Lamprecht
99f3e147e4 code cleanups, inline more, use arrow-fns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 20:54:59 +02:00
Thomas Lamprecht
b51cbf5a00 d/control: bump eslint requirement
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 14:14:09 +02:00
Thomas Lamprecht
4e77e86d47 bump version to 3.2-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:50:58 +02:00
Dominik Csapak
abde5f2bad node/Tasks: add 'clear filter' button
that does two things,

show the user that some filters are active (even if filters are collapsed),
and let the user to reset the filters all at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
a86b1f26da node/Task: show errors on store load
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
12a6f6824f node/Tasks: deselect entries when filter changes
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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
f00e321173 node/Task: remove leftover 'datastore' reference
this does nothing here, since the 'datastore' would be an
'extraFilter' defined in pbs itself

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Thomas Lamprecht
6bac17e394 node: repos: always skip "you get updates" on parsing error
As normally that means that the host does not gets updates, as most
apt use will fail too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:39:24 +02:00
Thomas Lamprecht
4227a5578a node: repos: improve repo-parsing error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:38:46 +02:00
Thomas Lamprecht
6c9af17882 node: repos: factor out addCritical into closure
now that there's more use for it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:38:16 +02:00
Dominik Csapak
25d17082b0 node/APTRepositories: make 'no pve repositories' an error
since we also show it as error in the node summary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:25:35 +02:00
Thomas Lamprecht
e1fc474412 bump version to 3.2-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 10:11:46 +02:00
Thomas Lamprecht
fb4bb95e9d utils: fix typo in variable name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 10:11:46 +02:00
Thomas Lamprecht
5b2485ace3 utils: updateColumnWidth: allow overriding tresholdWidth and make that more general
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 09:46:58 +02:00
Thomas Lamprecht
8b7e349a25 utils: column width handler: drop duplicate
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 09:34:32 +02:00
Thomas Lamprecht
76899da698 info widget: early return from update if text & value stayed the same
No need then and if we'd call into update we'd still generate new
elements which is annoying for debugging and extra DOM work we can
avoid.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 22:01:40 +02:00
Thomas Lamprecht
1d3d61ead9 markdown: extend blocked tags in sanitizer
not all of those are really problematic, but it's always easier to
start out stricter than required and see if any user even would use
those.

It seems that we should probably switch to a white-list approach...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 20:52:56 +02:00
Thomas Lamprecht
f2c4f9bdc2 markdown: make sanitizer more strict
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>
2021-07-04 20:06:28 +02:00
Thomas Lamprecht
71bc0913bd markdown: encode bad nodes HTML instead of pruning it
As pruning means content an user wrote into the box, even if with
malicious intend, gets hidden and that can be quite confusing..

So rather get the outerHTML, transform it with ExtJS's htmlEncode and
set it again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 19:22:40 +02:00
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