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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>