Optimize create backup action
Remove the redundant 'Source File/Directory' item, adn set 'Container name or path' non required item when the 'mode' is 'cinder' or 'nova'. Closes-Bug: #1657457 Change-Id: Idab804f391e3534ad2369ec1ab6c065feab2e7da
This commit is contained in:
parent
76ca03fd28
commit
4c7386db8b
|
@ -61,7 +61,7 @@ class ActionConfigurationAction(workflows.Action):
|
|||
required=False)
|
||||
|
||||
container = forms.CharField(
|
||||
label=_("Container Name or Path *"),
|
||||
label=_("Container Name or Path"),
|
||||
help_text=_("Swift container for swift backend or "
|
||||
"path for ssh or local backend"),
|
||||
required=False)
|
||||
|
@ -160,7 +160,6 @@ class ActionConfigurationAction(workflows.Action):
|
|||
self._check_backup_name(cleaned_data)
|
||||
return cleaned_data
|
||||
|
||||
self._check_container(cleaned_data)
|
||||
self._check_backup_name(cleaned_data)
|
||||
self._check_path_to_backup(cleaned_data)
|
||||
|
||||
|
|
|
@ -115,8 +115,10 @@ function setModeOptions() {
|
|||
$("#id_sql_server_conf").closest(".form-group").show();
|
||||
} else if ($id_mode === 'cinder') {
|
||||
$("#id_cinder_vol_id").closest(".form-group").show();
|
||||
$("#id_path_to_backup").closest(".form-group").hide();
|
||||
} else if ($id_mode === 'nova') {
|
||||
$("#id_nova_inst_id").closest(".form-group").show();
|
||||
$("#id_path_to_backup").closest(".form-group").hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,4 +135,4 @@ $(function () {
|
|||
setActionOptions();
|
||||
setStorageOptions();
|
||||
setModeOptions();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue