By default when no target storage is selected in the clone panel, the clone
will use the same storage*s* as the source.
This was not obvious to guess that from the panel.
This allows to add the components in each column in the order they
appear in the Clone Window.
References from child components are kept in an object in the parent
component so it should be the same performance-wise (contrary to to Ext.ComponentQuery
which is doing DOM parsing)
The pool membership relates here to the VM membership, not
the storage membership, so it makes sense to move it closer
to the VM ID / VM name form fields.
The snapshot selector was known to confuse first time pve users.
Some wondered that they had no snapshot called 'current' in their
snapshot trees, and other thought that snapshots would be included
in the copied image.
So before displaying the Clone Window, do an API call to verify
if the source VM has snapshots.
Until now we disabled the submit button, based on
the feature API call where we tested if the selected VM, and its snapshot
can be used as the source of a clone.
This had the following problems:
* the feature test for copy clone / linked clone always returned true,
since the passed paramaters were already filtered before user input
(ie we only allowed a linked clone to be selected if the source VM is
a template, or a snasphot to be selected if existed on source VM)
* the guest ID input field was not validated
With the current patch, the validation is now made on each of the form
fields. verifyFeature() is still used to populate a list of valid nodes
passed to the Node Selector.
This allows to display a 'CT', a 'VM', or a 'CT/VM' label
to be displayed, depending on the context.
Currently when restoring a CT backup or creating a CT via the
wizard, we are asked to enter a *VM* ID, which is confusing.