Function syntax, raw words, string templates, no prototype builtins
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
instead of relying on the contentTypeField (which does not need to
exists, e.g. for iscsi), explicitely write it into the panel/icon
mapping and check that
better would be if we query the backend about storage capabilities,
but such an api call does not exist yet, so this should be ok for now
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
extracting the logic from the previous checkbox listener into a function, which
is also called on field changes and once in afterrender. Calling it initially
makes sure the hint is also displayed at the beginning when editing a storage
with no retention options configured, and the initial disabling of the input
fields for the isCreate case now also happens through that call.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
... as this is now allowed by the API (createSchema() in PVE::SectionConfig).
It is only allowed by the update API call (updateSchema()).
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Normally it's better to configure pruning (backup retention) on the
backup server only, as then multiple client settings may not
interfere with each other due to outdated or to strict prune
settings (remember, the strictest prune setting always wins).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Support all prune keep- settings we have.
masked if the storage cannot support backups.
We do not care if it is disabled as content type for now, a user can
just set them nonetheless (could show a hint though).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This removes *a lot* of code duplication.
I add a base class for the storage edit window and for its containing
input panel, they implement the shared stuff. Especially the window
was mostly a 1:1 copy...
I look hard for a way to split up this patch, but I did not really
found one which would not generate a lot of work for no value added
(value being 'revertability' and better git history here).
nd actually not too much happens, the same thing happens just over
and over again.
Thus, I've thrown in the dynamic creation of the storage add menu
items here too.
I remove all storage specific Edit windows, they where all just >95%
duplicates of each other.
Special functionallity, i.e. some data deletion/transforming before
submitting gets done with onGetValues.
For the RBD external vs PVE plugin I just added a minimal child class
to RBD which only tells it'S parent that it is the pve one, this is
nice for the mapping and should be easy to understand when reading
the code.
Tried to test an add and an edit of all visible storage plugins,
seems to be OK now.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>