From b2658648e59519b42762f785264df7cac7483a95 Mon Sep 17 00:00:00 2001 From: Ivan Anfimov Date: Thu, 4 Sep 2025 14:50:53 +0000 Subject: [PATCH] Fix for various mistakes with spaces and remove * at the fields since such is not used anywhere in Horizon Change-Id: Ic1606782ff0bfca2a201be012891f00a61ebbb70 Signed-off-by: Ivan Anfimov --- freezer_ui/actions/tables.py | 2 +- freezer_ui/actions/workflows/action.py | 207 ++++++++++++------------- freezer_ui/backups/tables.py | 2 +- freezer_ui/clients/tables.py | 2 +- freezer_ui/jobs/tables.py | 8 +- freezer_ui/sessions/tables.py | 4 +- 6 files changed, 112 insertions(+), 113 deletions(-) diff --git a/freezer_ui/actions/tables.py b/freezer_ui/actions/tables.py index f04f63d..eff175e 100644 --- a/freezer_ui/actions/tables.py +++ b/freezer_ui/actions/tables.py @@ -21,7 +21,7 @@ import freezer_ui.api.api as freezer_api class DeleteAction(tables.DeleteAction): - help_text = _("Delete actions is not recoverable.") + help_text = _("Deleted Actions is not recoverable.") @staticmethod def action_present(count): diff --git a/freezer_ui/actions/workflows/action.py b/freezer_ui/actions/workflows/action.py index 4fdd107..9d23f3d 100644 --- a/freezer_ui/actions/workflows/action.py +++ b/freezer_ui/actions/workflows/action.py @@ -28,18 +28,18 @@ class ActionConfigurationAction(workflows.Action): required=False) backup_name = forms.CharField( - label=_("Action Name *"), + label=_("Action Name"), required=False) action = forms.ChoiceField( - help_text=_("Set the action to be taken")) + help_text=_("Set the action to be taken.")) mode = forms.ChoiceField( - help_text=_("Choose what you want to backup"), + help_text=_("Choose what you want to backup."), required=False) storage = forms.ChoiceField( - help_text=_("Set storage backend for a backup")) + help_text=_("Set storage backend for a backup.")) engine_name = forms.ChoiceField( help_text=_("Engine to be used for backup/restore. " @@ -49,73 +49,73 @@ class ActionConfigurationAction(workflows.Action): "blocks changes will be verified and only the changed " "blocks will be backed up. Tar is faster, but is uses " "more space and bandwidth. Rsync is slower, but uses " - "less space and bandwidth. Nova engine can be used to" - " backup/restore running instances. Backing up instances" - " and it's metadata.")) + "less space and bandwidth. Nova engine can be used to " + "backup/restore running instances. Backing up instances " + "and it's metadata.")) mysql_conf = forms.CharField( - label=_("MySQL Configuration File *"), + label=_("MySQL Configuration File"), help_text=_("Set the path where the MySQL configuration file " - "is on the file system "), + "is on the file system."), required=False) sql_server_conf = forms.CharField( - label=_("SQL Server Configuration File *"), - help_text=_("Set the path where the SQL Server configuration file" - " is on the file system"), + label=_("SQL Server Configuration File"), + help_text=_("Set the path where the SQL Server configuration file " + "is on the file system."), required=False) path_to_backup = forms.CharField( - label=_("Source File/Directory *"), - help_text=_("The file or directory you want to back up."), + label=_("Source File/Directory"), + help_text=_("The file or directory you want to backup."), required=False) container = forms.CharField( label=_("Container Name or Path"), - help_text=_("Swift container for swift backend or " - "path for ssh or local backend"), + help_text=_("Swift container for Swift backend or " + "path for SSH or local backend."), required=False) restore_abs_path = forms.CharField( - label=_("Restore Absolute Path *"), - help_text=_("Set the absolute path where you" - " want your data restored."), + label=_("Restore Absolute Path"), + help_text=_("Set the absolute path where you " + "want your data restored."), required=False) restore_from_host = forms.CharField( label=_("Restore From Host"), - help_text=_("Set the hostname used to identify the" - " data you want to restore from." - " If you want to restore data in the same" - " host where the backup was executed just" - " type from your shell: '$ hostname' and" - " the output is the value that needs to" - " be passed to this option. Mandatory" - " with Restore"), + help_text=_("Set the hostname used to identify the " + "data you want to restore from. " + "If you want to restore data in the same " + "host where the backup was executed just " + "type from your shell: '$ hostname' and " + "the output is the value that needs to " + "be passed to this option. Mandatory " + "with Restore."), required=False) restore_from_date = forms.CharField( label=_("Restore From Date"), help_text=_("Set the absolute path where you want " - "your data restored.Please provide " + "your data restored. Please provide " "datetime in format 'YYYY-MM-DDThh:mm:ss' " "i.e. '1979-10-03T23:23:23'. Make sure the " - "'T' is between date and time"), + "'T' is between date and time."), required=False) cinder_vol_id = forms.CharField( - label=_("Cinder Volume ID *"), - help_text=_("Id of cinder volume for backup"), + label=_("Cinder Volume ID"), + help_text=_("ID of Cinder Volume for backup."), required=False) nova_inst_id = forms.CharField( - label=_("Nova Instance ID *"), - help_text=_("Id of nova instance for backup"), + label=_("Nova Instance ID"), + help_text=_("ID of Nova Instance for backup."), required=False) nova_restore_network = forms.CharField( - label=_("Nova network ID *"), - help_text=_("Id of nova network for recover"), + label=_("Nova Network ID"), + help_text=_("ID of Nova Network for recover."), required=False) get_object = forms.CharField( @@ -127,42 +127,41 @@ class ActionConfigurationAction(workflows.Action): dst_file = forms.CharField( label=_("Destination File"), help_text=_("The file name used to save the object " - "on your local disk and upload file in swift."), + "on your local disk and upload file in Swift."), required=False) remove_older_than = forms.CharField( label=_("Remove Older Than"), - help_text=_("Checks in the specified container for" - " object older than the specified days." - "If i.e. 30 is specified, it will remove" - " the remote object older than 30 days." - " Default False (Disabled) The option " + help_text=_("Checks in the specified container for " + "object older than the specified days. " + "If i.e. 30 is specified, it will remove " + "the remote object older than 30 days. " + "Default: False (Disabled). The option " "--remove-older-then is deprecated and " - "will be removed soon"), + "will be removed soon."), required=False) remove_from_date = forms.CharField( label=_("Remove From Date"), - help_text=_("Checks the specified container and removes" - " objects older than the provided datetime" - " in the format YYYY-MM-DDThh:mm:ss " + help_text=_("Checks the specified container and removes " + "objects older than the provided datetime " + "in the format YYYY-MM-DDThh:mm:ss " "i.e. 1974-03-25T23:23:23. Make sure the " - "'T' is between date and time "), + "'T' is between date and time."), required=False) ssh_key = forms.CharField( - label=_("SSH Private Key *"), - help_text=_("Path for ssh private key"), + label=_("SSH Private Key"), + help_text=_("Path for SSH private key."), required=False) ssh_username = forms.CharField( - label=_("SSH Username *"), - help_text=_("Path for ssh private key"), + label=_("SSH Username"), required=False) ssh_host = forms.CharField( - label=_("SSH Host *"), - help_text=_("IP address or dns name of host to connect through ssh"), + label=_("SSH Host"), + help_text=_("IP address or DNS name of host to connect through SSH."), required=False) def clean(self): @@ -202,17 +201,17 @@ class ActionConfigurationAction(workflows.Action): def _check_nova_restore_network(self, cleaned_data): if not cleaned_data.get('nova_restore_network'): - msg = _("You must define nova network id to restore.") + msg = _("You must define Nova Network ID to restore.") self._errors['nova_restore_network'] = self.error_class([msg]) def _check_nova_inst_id(self, cleaned_data): if not cleaned_data.get('nova_inst_id'): - msg = _("You must define nova instance id to restore or backup.") + msg = _("You must define Nova Instance ID to restore or backup.") self._errors['nova_inst_id'] = self.error_class([msg]) def _check_cinder_vol_id(self, cleaned_data): if not cleaned_data.get('cinder_vol_id'): - msg = _("You must define cinder volume id to backup.") + msg = _("You must define Cinder Volume ID to backup.") self._errors['cinder_vol_id'] = self.error_class([msg]) def _check_restore_abs_path(self, cleaned_data): @@ -311,7 +310,7 @@ class SnapshotConfigurationAction(workflows.Action): snapshot = forms.BooleanField( label=_("Snapshot"), help_text=_("Use a LVM or Shadow Copy snapshot " - "to have point in time consistent backups"), + "to have point in time consistent backups."), widget=forms.CheckboxInput(), initial=False, required=False) @@ -333,44 +332,44 @@ class AdvancedConfigurationAction(workflows.Action): label=_("Log File Path"), help_text=_("Set log file. By default logs to " "/var/log/freezer.log If that file " - "is not writable, freezer tries to " + "is not writable, Freezer tries to " "log to ~/.freezer/freezer.log"), required=False) exclude = forms.CharField( label=_("Exclude Files"), - help_text=_("Exclude files, given as a PATTERN.Ex:" - " '*.log, *.pyc' will exclude any " - "file with name ending with .log. " - "Default no exclude"), + help_text=_("Exclude files, given as a PATTERN. " + "Example: '*.log, *.pyc' will exclude " + "any file with name ending with .log. " + "Default: no exclude."), widget=forms.widgets.Textarea(), required=False) proxy = forms.CharField( label=_("Proxy URL"), help_text=_("Enforce proxy that alters system " - "HTTP_PROXY and HTTPS_PROXY"), + "HTTP_PROXY and HTTPS_PROXY."), widget=forms.URLInput(), required=False) os_identity_api_version = forms.ChoiceField( label=_("OpenStack Authentication Version"), - help_text=_("Swift auth version, could be 1, 2 or 3"), + help_text=_("Swift auth version, could be 1, 2 or 3."), required=False) upload_limit = forms.IntegerField( label=_("Upload Limit"), - help_text=_("Upload bandwidth limit in Bytes per sec." - " Can be invoked with dimensions " + help_text=_("Upload bandwidth limit in Bytes per sec.. " + "Can be invoked with dimensions " "(10K, 120M, 10G)."), min_value=-1, required=False) download_limit = forms.IntegerField( label=_("Download Limit"), - help_text=_("Download bandwidth limit in Bytes per sec. " - "Can be invoked with dimensions" - " (10K, 120M, 10G)."), + help_text=_("Download bandwidth limit in Bytes per sec.. " + "Can be invoked with dimensions " + "(10K, 120M, 10G)."), min_value=-1, required=False) @@ -386,35 +385,35 @@ class AdvancedConfigurationAction(workflows.Action): max_segment_size = forms.IntegerField( label=_("Maximum Segment Size"), - help_text=_("Set the maximum file chunk size in bytes" - " to upload to swift." - " Default 67108864 bytes (64MB)"), + help_text=_("Set the maximum file chunk size in bytes " + "to upload to Swift. " + "Default: 67108864 bytes (64MB)."), min_value=1, required=False) hostname = forms.CharField( label=_("Hostname"), help_text=_("Set hostname to execute actions. If you are " - "executing freezer from one host but you want" - " to delete objects belonging to another host " + "executing freezer from one host but you want " + "to delete objects belonging to another host " "then you can set this option that hostname and " - "execute appropriate actions. Default current " - "node hostname."), + "execute appropriate actions. Default: Current " + "hostname."), required=False) encryption_password = forms.CharField( label=_("Encryption Key"), - help_text=_("Set the path where the encryption key" - "is on the file system"), + help_text=_("Set the path where the encryption key " + "is on the file system."), required=False) no_incremental = forms.BooleanField( label=_("No Incremental"), - help_text=_("Disable incremental feature. By default" - " freezer build the meta data even for " + help_text=_("Disable incremental feature. By default " + "freezer build the meta data even for " "level 0 backup. By setting this option " - "incremental meta data is not created at all." - " Default disabled"), + "incremental meta data is not created at all. " + "Default: Disabled."), widget=forms.CheckboxInput(), initial=True, required=False) @@ -423,41 +422,41 @@ class AdvancedConfigurationAction(workflows.Action): label=_("Max Level"), initial=0, min_value=0, - help_text=_("Set the backup level used with tar to implement" - " incremental backup. If a level 1 is specified " - "but no level 0 is already available, a level 0" - " will be done and subsequently backs to level 1." - " Default 0 (No Incremental)"), + help_text=_("Set the backup level used with tar to implement " + "incremental backup. If a level 1 is specified " + "but no level 0 is already available, a level 0 " + "will be done and subsequently backs to level 1. " + "Default: 0 (No Incremental)."), required=False) always_level = forms.IntegerField( label=_("Always Level"), min_value=0, - help_text=_("Set backup maximum level used with tar to" - " implement incremental backup. If a level " + help_text=_("Set backup maximum level used with tar to " + "implement incremental backup. If a level " "3 is specified, the backup will be executed " "from level 0 to level 3 and to that point " "always a backup level 3 will be executed. " "It will not restart from level 0. This option " "has precedence over --max-backup-level. " - "Default False (Disabled)"), + "Default: False (Disabled)."), required=False) restart_always_level = forms.IntegerField( label=_("Restart Always Level"), min_value=0, - help_text=_("Restart the backup from level 0 after n days. " + help_text=_("Restart the backup from level 0 after N days. " "Valid only if --always-level option if set. " "If --always-level is used together with " "--remove-older-then, there might be the " "chance where the initial level 0 will be " - "removed Default False (Disabled)"), + "removed. Default: False (Disabled)."), required=False) insecure = forms.BooleanField( - label=_("insecure"), - help_text=_("Allow to access swift servers without" - " checking SSL certs."), + label=_("Insecure"), + help_text=_("Allow to access Swift servers without " + "checking SSL certificates."), widget=forms.CheckboxInput(), required=False) @@ -465,14 +464,14 @@ class AdvancedConfigurationAction(workflows.Action): label=_("Follow Symlinks"), help_text=_("Follow hard and soft links and archive " "and dump the files they refer to. " - "Default False"), + "Default: False."), widget=forms.CheckboxInput(), required=False) dry_run = forms.BooleanField( label=_("Dry Run"), help_text=_("Do everything except writing or " - "removing objects"), + "removing objects."), widget=forms.CheckboxInput(), required=False) @@ -483,14 +482,14 @@ class AdvancedConfigurationAction(workflows.Action): "on Linux) and real-time for " "I/O. The process priority " "will be set only if nice and " - "ionice are installed Default " - "disabled. Use with caution."), + "ionice are installed. Default: " + "Disabled. Use with caution."), widget=forms.CheckboxInput(), required=False) quiet = forms.BooleanField( label=_("Quiet"), - help_text=_("Suppress error messages"), + help_text=_("Suppress error messages."), widget=forms.CheckboxInput(), required=False) @@ -535,8 +534,8 @@ class RulesConfigurationAction(workflows.Action): label=_("Max Retries"), initial=0, min_value=0, - help_text=_("In case of error, set the amount" - " of retries for this job"), + help_text=_("In case of error, set the amount " + "of retries for this job."), required=False) max_retries_interval = forms.IntegerField( @@ -544,12 +543,12 @@ class RulesConfigurationAction(workflows.Action): initial=0, min_value=0, help_text=_("Set the interval between executions " - "for retries in seconds"), + "for retries in seconds."), required=False) mandatory = forms.BooleanField( label=_("Mandatory"), - help_text=_("Set this action as mandatory"), + help_text=_("Set this action as mandatory."), widget=forms.CheckboxInput(), required=False) @@ -570,7 +569,7 @@ class ActionWorkflow(workflows.Workflow): slug = "action" name = _("Action Configuration") finalize_button_name = _("Save") - success_message = _('Action queued correctly. It will appear soon') + success_message = _('Action queued correctly. It will appear soon.') failure_message = _('Unable to save action file.') success_url = "horizon:disaster_recovery:actions:index" diff --git a/freezer_ui/backups/tables.py b/freezer_ui/backups/tables.py index 3c3f5a5..46238e7 100644 --- a/freezer_ui/backups/tables.py +++ b/freezer_ui/backups/tables.py @@ -37,7 +37,7 @@ class Restore(tables.LinkAction): class DeleteBackup(tables.DeleteAction): - help_text = _("Delete backups is not recoverable.") + help_text = _("Deleted Backups is not recoverable.") @staticmethod def action_present(count): diff --git a/freezer_ui/clients/tables.py b/freezer_ui/clients/tables.py index d02c66d..958c2d7 100644 --- a/freezer_ui/clients/tables.py +++ b/freezer_ui/clients/tables.py @@ -26,7 +26,7 @@ class Filter(tables.FilterAction): class DeleteClient(tables.DeleteAction): - help_text = _("Delete Clients is not recoverable.") + help_text = _("Deleted Clients is not recoverable.") @staticmethod def action_present(count): diff --git a/freezer_ui/jobs/tables.py b/freezer_ui/jobs/tables.py index 93a705c..43cb744 100644 --- a/freezer_ui/jobs/tables.py +++ b/freezer_ui/jobs/tables.py @@ -44,7 +44,7 @@ class AttachJobToSession(tables.LinkAction): class DeleteJob(tables.DeleteAction): - help_text = _("Delete jobs is not recoverable.") + help_text = _("Deleted Jobs is not recoverable.") @staticmethod def action_present(count): @@ -190,7 +190,7 @@ class JobsTable(tables.DataTable): class DeleteAction(tables.DeleteAction): - help_text = _("Delete actions is not recoverable.") + help_text = _("Deleted Actions is not recoverable.") @staticmethod def action_present(count): @@ -203,8 +203,8 @@ class DeleteAction(tables.DeleteAction): @staticmethod def action_past(count): return ngettext_lazy( - "Deleted action File", - "Deleted action Files", + "Deleted Action File", + "Deleted Action Files", count ) diff --git a/freezer_ui/sessions/tables.py b/freezer_ui/sessions/tables.py index 4bbd4e2..ab3ca95 100644 --- a/freezer_ui/sessions/tables.py +++ b/freezer_ui/sessions/tables.py @@ -41,7 +41,7 @@ class CreateJob(tables.LinkAction): class DeleteSession(tables.DeleteAction): - help_text = _("Delete sessions is not recoverable.") + help_text = _("Deleted Sessions is not recoverable.") @staticmethod def action_present(count): @@ -81,7 +81,7 @@ class DeleteMultipleActions(DeleteSession): class DeleteJobFromSession(tables.DeleteAction): name = "delete_job_from_session" - help_text = _("Delete jobs is not recoverable.") + help_text = _("Deleted Jobs is not recoverable.") @staticmethod def action_present(count):