Commit Graph

1144 Commits

Author SHA1 Message Date
Friedrich Weber
d19dbe892b utils: render upid: htmlEncode UPID
to avoid interpreting HTML.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2025-04-04 15:24:42 +02:00
Thomas Lamprecht
68a3518d13 bump version to 4.3.7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 19:16:22 +01:00
Markus Frank
a37094b0fa form: RealmComboBox: add option to change the API path
Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 18:50:34 +01:00
Markus Frank
b4304e6691 panel: AuthView: change API path in pmx-domains model
Currently is always using the default path because it was hardcoded into
the model 'pmx-domains'. Introduce new variable storeBaseUrl because PBS
uses two different paths to access the realm/domains API.

Co-authored-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 18:50:29 +01:00
Markus Frank
ee9d92e37e fix: window: AuthEditBase: rename variable 'realm' to 'type'
PVE/PMG API returns a variable called 'type' instead of 'realm'

Fixes: 3822a03 ("window: AuthEditBase: include more information in thrown errors")
Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 18:50:29 +01:00
Thomas Lamprecht
2df5c28d3f bump version to 4.3.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-25 18:10:10 +01:00
Dominik Csapak
f6440d3ee1 object grid: fix onlineHelp setting from editorConfig for row editors
In our row editors helpers, we unconditionally set onlineHelp from
'opts.onlineHelp', even if it's undefined.

Later we use 'Ext.apply' to set first the editorConfig defaults, then
the 'rowdef.editor' settings. In javascript, the objects

{} and
{ foo: undefined }

are not the same, so Ext.apply overwrites the default from editorConfig
with that from the row definition, also for undefined.

This means if we have a default onlineHelp in editorConfig and none in
the add_*_row options, we would not show it.

To fix it, check if 'opts.onlineHelp' is truthy before setting it in
the row definition. This should not happen for other options used
from the row helper options, since those are nested
(Ext.apply does not work recursively)

This fixes a regression in pmg-gui, where we set a default onlineHelp
for e.g. the Mail Proxy Options which would not show up anymore.

Note: PMG is the only product where we used this pattern, so this
was not visible anywhere in PVE or PBS.

Fixes: 7d16f8b (object grid: allow to pass online help to row editors)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-25 18:07:02 +01:00
Thomas Lamprecht
15a62419a1 bump version to 4.3.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-25 17:08:17 +01:00
Hannes Duerr
23289264bd form: add field component for certificate fingerprints
Create a new component for (SHA256) certificate fingerprints as we can
reuse this in several places.

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
 [TL: drop filenames from commit message and fix widget alias name]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-25 17:04:22 +01:00
Maximiliano Sandoval
41c844b511 fix #6088: notification: matcher: use more descriptive strings
Add separate text for inverted and non-inverted cases, this should
reduce some confusion about how inversion works and allow for better
translations.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
 [TL: expand commit message.]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-01-28 15:21:02 +01:00
Fabian Grünbichler
82260afcdd changelog: s/UNRELEASED/bookworm
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-20 15:09:06 +01:00
Fabian Grünbichler
80b01f27bc bump version to 4.3.4
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-20 11:40:02 +01:00
Friedrich Weber
88d62e5386 acme: plugin: add htmlEncodes
to avoid interpreting html tags in the values.

When setting a tooltip via the `data-qtip` attribute, the contents
needs to be double-encoded. Ext.js internally uses `innerHTML` to
apply the generated HTML, which undoes one layer of encoding in case
of `data-qtip`.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2025-01-20 11:37:06 +01:00
Friedrich Weber
f26346a597 apt: add missing htmlEncode to qtip
to avoid interpreting html tags in the values.

When setting a tooltip via the `data-qtip` attribute, the contents
needs to be double-encoded. Ext.js internally uses `innerHTML` to
apply the generated HTML, which undoes one layer of encoding in case
of `data-qtip`.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2025-01-20 11:37:06 +01:00
Dominik Csapak
9d5d6a7815 task viewer: htmlEncode the status
so we don't accidentally interpret html tags from the task status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-01-20 11:37:01 +01:00
Dominik Csapak
7bb124c036 button: htmlEncode the name/id for the confirm message
so we don't accidentally interpret html tags

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-01-20 11:37:01 +01:00
Dominik Csapak
867bf7e6f5 utils: htmlEncode status text
so we don't accidentally interpret html tags in the output

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-01-20 11:37:01 +01:00
Maximiliano Sandoval
d710ceeeb6 webhook edit: do not split translatable strings
Splitting translatable strings deprives translators for context which
might be needed for getting the correct tenses or genders. See [1] for
example.

[1] https://wiki.gnome.org/TranslationProject(2f)DevGuidelines(2f)Never(20)split(20)sentences.html

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2025-01-15 17:19:59 +01:00
Gabriel Goller
d6d173f05d textarea field: add emptyText message to show markdown is supported
Just like in our `Notes` fields show a emptyText message that explains
that markdown can be used.

Reported-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-11-27 15:31:57 +01:00
Thomas Lamprecht
a5fb3afcf9 bump version to 4.3.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-27 12:25:47 +01:00
Fiona Ebner
ac10db95ef display-edit field: add emptyText getter and setter to support data-bind
To access the underlying fields a reference to them is now explicitly
saved after component initialisation.

First user is intended to be the path field for datastores where the
emptyText should dynamically be for a relative or absolute path.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
 [ TL: switch over from saving the xtype to query in the getter or
   setter to directly savign a reference to the underlying fields. ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-27 12:17:10 +01:00
Thomas Lamprecht
c806b73ff7 bump version to 4.3.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 18:32:26 +01:00
Gabriel Goller
1d07d61a18 form: add support for multiline textarea
This adds support for a editable multiline textarea in the ObjectGrid.
Now we can add a textarea row, which will open a textarea popup, and
encode the multi-line text into an base64 string (with utf8 support).

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
 [ TL: various style, naming fixes and add fieldOps to allow passing,
   e.g., an empty text]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-25 18:16:12 +01:00
Gabriel Goller
70382e111a window: add consent modal
Add consentModal that gets displayed before the login. Simply shows the
text in a scrollable box and contains a single button "OK".

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
2024-11-25 16:32:25 +01:00
Thomas Lamprecht
e79a20a8cc node: service state: restore original behavior
This reverts commit 461298d80a and
commit 4ca542b811 to get back to the
original state, which is already good enough here, as systemd unit
states are simply not translatable well, and are never translated by
systemd, so doing that will make most users life actually harder.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 15:39:41 +01:00
Christian Ebner
461298d80a utils: never translate systemd unit states
Translating unit states might be counter productive in case of
debugging, opt for not translating them and drop usage of the
translation helper.

This was spotted by several devs on doing translations in languages
they know, so it really seems not right to add.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
 [ TL: add last sentence to add some weight to not doing that ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 15:29:38 +01:00
Thomas Lamprecht
2686922392 bump version to 4.3.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 12:40:09 +01:00
Thomas Lamprecht
3375d11ea4 auth view/edit: make default-view checkbox opt-in
To avoid suggesting that a project has a feature that is not
implemented in the backend.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-19 12:37:26 +01:00
Thomas Lamprecht
0988db8ffc network view: pass generic editOptions config to edit window
Avoid the need to loop through every product specific feature
enablement, rather allow one to pass a generic object including them.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-16 16:37:15 +01:00
Thomas Lamprecht
358b98bf4f network edit: rename bridge_set_vids to enableBridgeVlanIds
we use camelCase in the JavaScript code and besides casing the old
name wasn't really telling and suggested that it was there to set a
specific VID not to enable setting them.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-16 16:35:51 +01:00
Thomas Lamprecht
2aa5d7e7ba network edit: shorten bridge VLAN ID label and tooltip
This is certainly a bit subjective, but IMO not much information is
lost, and the "space-separated" in the tooltip was never true (at
least for the backend), so might be even confusing; the example should
be enough to direct users in the right direction, real docs in the
documentation would be way better anyway than all those subtle UI
hints.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-16 16:33:15 +01:00
Thomas Lamprecht
ffe41ad5e3 network edit: shorten and improve bridge vlan ID validator
This does a few things, but all affecting the same validator and there
would not be much value with separate commits, so just use one.

Namely:
- reduce code by a lot, mostly by having a explicit ordered if-else
  chain that avoids the need for some extra checks as further branches
  can assume that former did not evaluate to true, thus we cans safe
  the closure that checked invalidity for a range-atom.
  While this allows entering "useless" ranges like "2-2" it's not
  clear why that should be a disallowed range, it's perfectly clear
  about what it represents.
- use Number.isNaN to avoid oddities from global isNaN that MDN warns
  against [0]
- give explicit error messages for different failure cases like
  out-of-range or not-a-number
- place error messages under gettext, our translators frequently ask
  to avoid untranslatable literals.
- support the same lists as the backend does, i.e. allow multiple
  whitespace and comma and semicolon as separators.

[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-16 16:30:30 +01:00
Aaron Lauterer
b1a3eb7195 fix #3892: network: add bridge vids field for bridge_vids
The new optional bridge_vids field allows to set that property via the
GUI. Since the backend needs to support it, the field needs to be
explicitly enabled.

For now, Proxmox VE (PVE) is the use case.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2024-11-15 18:57:28 +01:00
Shannon Sterz
9d2fc36f61 dark theme: make icons in the permissions tree in pve dark
these icons are multiply style because they seem to be handled
differently across products. so this in essence "double inverts" them
in the context where that is needed

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-11-15 16:49:17 +01:00
Thomas Lamprecht
afb219dce0 add Bulgarian as available language
Got recently contributed to proxmox-i18n in commit 8ee24fd ("add
Bulgarian translations")

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-14 22:23:50 +01:00
Dominik Csapak
e84f80271d webhook edit: display validity for added key/value fields
by calling 'isValid()' once the widget is attached to the grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-12 17:42:36 +01:00
Dominik Csapak
e872ed40f7 webhook edit: add emptytext to key-value fields
namely 'Key' and 'Value'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-12 17:42:36 +01:00
Dominik Csapak
b0eafb68a9 webhook edit: use type in add button text
so one can more easily see what gets added.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-12 17:42:36 +01:00
Dominik Csapak
3052c4dfc8 webhook edit: make items config not static
modifying static elements from the class, like done here with e.g.

 me.items[0][key] = value;

is dangerous, since it directly modifies the class definition of those
arrays/objects.

Instead move the definition in initComponent, which uses a fresh
declaration each time the component is initialized.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-12 17:42:36 +01:00
Dominik Csapak
20002254e6 webhook edit: improve layout and component hierarchy
* instead of manually setting margin/paddings and the fieldLabel, just
  use a FieldContainer instead of Container. That implements the
  Ext.form.Labelable mixin, which correctly positions the label. This
  also has the effect that the labels are now styled correctly.

* modify the margins to get a consistent spacing between fields

* reverse the order of grid/button, to be consistent with our other
  grids with this input pattern

* make the label of the textarea a proper fieldLabel with a
  FieldContainer, which gets rid of the ':' in the gettext and
  styles the label correctly.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-11-12 17:42:36 +01:00
Christoph Heiss
0f8d38b5de fix #5379: window: AuthEdit{LDAP, OpenId}: add 'Default realm' checkbox
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:58:34 +01:00
Christoph Heiss
6fe81f0cef fix #5379: panel: AuthView: add column displaying whether the realm is default
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:58:34 +01:00
Christoph Heiss
4b3850bf45 schema: make PAM realm editable using new AuthSimple panel
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:58:34 +01:00
Christoph Heiss
a285fec7e4 window: add panel for editing simple, built-in realms
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:58:34 +01:00
Christoph Heiss
b4b36ef29a panel: AuthView: use help link from schema if set
This can be used to set the `onlineHelp` identifier in the schema as
opposed to in the panel directly. Needed e.g. to share a panel between
PAM and PBS realm.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:57:46 +01:00
Christoph Heiss
be8cb1efb4 panel: AuthView: make useTypeInUrl property per-realm
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:57:46 +01:00
Christoph Heiss
3822a031dd window: AuthEditBase: include more information in thrown errors
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-11-11 23:57:46 +01:00
Thomas Lamprecht
5156cd1164 bump version to 4.3.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-11 21:58:01 +01:00
Timothy Nicholson
8f2c09235c fix #5831: ui: right-align s.m.a.r.t numerical table data
Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
2024-11-11 21:39:49 +01:00
Shannon Sterz
96fb6cfb72 password edit: add a minimum length parameter
so products can independently specify the minimum length of new
passwords

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
2024-11-11 21:38:34 +01:00