diff --git a/freezer_ui/api/api.py b/freezer_ui/api/api.py
index 5174cb2..6c05eaf 100644
--- a/freezer_ui/api/api.py
+++ b/freezer_ui/api/api.py
@@ -401,6 +401,14 @@ def backups_list(request, offset=0, time_after=None, time_before=None,
def backup_get(request, backup_id):
"""Get a single backup"""
+ # for a local or ssh backup, the backup_id contains the
+ # path of the directory to backup, so that includes "/"
+ # or "\" for windows.
+ # so we send "--" instead "/" from the client to avoid
+ # conflicts in the api endpoint
+ backup_id = backup_id.replace("/", '--')
+ backup_id = backup_id.replace("\\", '--')
+
backup = _freezerclient(request).backups.get(backup_id)
backup = Backup(backup)
return backup
diff --git a/freezer_ui/backups/tables.py b/freezer_ui/backups/tables.py
index 35138d0..620b079 100644
--- a/freezer_ui/backups/tables.py
+++ b/freezer_ui/backups/tables.py
@@ -47,12 +47,11 @@ def icons(backup):
level_txt = "Level: {} ({} backup) out of {}".format(
backup.level, "Full" if backup.level == 0 else "Incremental",
backup.max_level)
+ result.append(
+ '{}'.format(
+ level_txt, backup.level))
except Exception:
- level_txt = 'N/A'
-
- result.append(
- '{}'.format(
- level_txt, backup.level))
+ result.append("Level: {}".format("Full"))
try:
if backup.encrypted:
@@ -84,13 +83,12 @@ def icons(backup):
def backup_detail_view(backup):
return reverse("horizon:freezer_ui:backups:detail",
- args=[backup.id])
+ args=[backup.backup_id])
class BackupsTable(tables.DataTable):
- name = tables.Column('backup_name',
- verbose_name=_("Backup Name"),
- link=backup_detail_view)
+ backup_name = tables.Column('backup_name',
+ verbose_name=_("Backup Name"))
hostname = tables.Column('hostname', verbose_name=_("Hostname"))
created = tables.Column("time_stamp",
verbose_name=_("Created At"),
diff --git a/freezer_ui/backups/views.py b/freezer_ui/backups/views.py
index 476f135..159431c 100644
--- a/freezer_ui/backups/views.py
+++ b/freezer_ui/backups/views.py
@@ -51,9 +51,9 @@ class RestoreView(workflows.WorkflowView):
workflow_class = restore_workflow.Restore
def get_object(self, *args, **kwargs):
- id = self.kwargs['backup_id']
+ backup_id = self.kwargs['backup_id']
try:
- return freezer_api.backup_get(self.request, id)
+ return freezer_api.backup_get(self.request, backup_id)
except Exception:
redirect = reverse("horizon:freezer_ui:backups:index")
msg = _('Unable to retrieve details.')
@@ -63,12 +63,13 @@ class RestoreView(workflows.WorkflowView):
return 'name' in self.kwargs and bool(self.kwargs['name'])
def get_workflow_name(self):
- backup = freezer_api.backup_get(self.request, self.kwargs['backup_id'])
+ backup_id = self.kwargs['backup_id']
+ backup = freezer_api.backup_get(self.request, backup_id)
backup_date = datetime.datetime.fromtimestamp(
- int(backup.data_dict[0]['backup_metadata']['time_stamp']))
+ int(backup.data_dict['backup_metadata']['time_stamp']))
backup_date_str = django_date(backup_date, 'SHORT_DATETIME_FORMAT')
return "Restore '{}' from {}".format(
- backup.data_dict[0]['backup_metadata']['backup_name'],
+ backup.data_dict['backup_metadata']['backup_name'],
backup_date_str)
def get_initial(self):
@@ -77,5 +78,4 @@ class RestoreView(workflows.WorkflowView):
def get_workflow(self, *args, **kwargs):
workflow = super(RestoreView, self).get_workflow(*args, **kwargs)
workflow.name = self.get_workflow_name()
-
return workflow
diff --git a/freezer_ui/backups/workflows/restore.py b/freezer_ui/backups/workflows/restore.py
index 5d7ca62..c84a387 100644
--- a/freezer_ui/backups/workflows/restore.py
+++ b/freezer_ui/backups/workflows/restore.py
@@ -83,10 +83,10 @@ class Restore(workflows.Workflow):
"original_name": job, # this is the job_id
"action": "restore",
"backup_name":
- backup.data_dict[0]['backup_metadata']['backup_name'],
+ backup.data_dict['backup_metadata']['backup_name'],
"restore_abs_path": data['path'],
"container":
- backup.data_dict[0]['backup_metadata']['container'],
+ backup.data_dict['backup_metadata']['container'],
"restore_from_host": client.hostname,
"max_retries": 3,
"max_retries_interval": 60,
diff --git a/freezer_ui/jobs/workflows/action.py b/freezer_ui/jobs/workflows/action.py
index d02dd03..74797ac 100644
--- a/freezer_ui/jobs/workflows/action.py
+++ b/freezer_ui/jobs/workflows/action.py
@@ -324,12 +324,13 @@ class SnapshotConfiguration(workflows.Step):
contributes = ('use_snapshot',
'is_windows',
'vssadmin',
- 'lvm_auto_snap',
- 'lvm_srcvol',
- 'lvm_snapname',
- 'lvm_snapsize',
- 'lvm_dirmount',
- 'lvm_volgroup',)
+ # 'lvm_auto_snap',
+ # 'lvm_srcvol',
+ # 'lvm_snapname',
+ # 'lvm_snapsize',
+ # 'lvm_dirmount',
+ # 'lvm_volgroup',
+ )
class AdvancedConfigurationAction(workflows.Action):
@@ -527,25 +528,26 @@ class AdvancedConfigurationAction(workflows.Action):
class AdvancedConfiguration(workflows.Step):
action_class = AdvancedConfigurationAction
contributes = ('log_file',
- 'exclude',
- 'proxy',
- 'os_auth_ver',
- 'upload_limit',
- 'download_limit',
- 'optimize',
- 'compression',
- 'max_segment_size',
- 'hostname',
- 'encryption_password',
- 'no_incremental',
- 'max_level',
- 'always_level',
- 'restart_always_level',
- 'insecure',
- 'dereference_symlink',
- 'dry_run',
- 'max_priority',
- 'quiet',)
+ # 'exclude',
+ # 'proxy',
+ # 'os_auth_ver',
+ # 'upload_limit',
+ # 'download_limit',
+ # 'optimize',
+ # 'compression',
+ # 'max_segment_size',
+ # 'hostname',
+ # 'encryption_password',
+ # 'no_incremental',
+ # 'max_level',
+ # 'always_level',
+ # 'restart_always_level',
+ # 'insecure',
+ # 'dereference_symlink',
+ # 'dry_run',
+ # 'max_priority',
+ # 'quiet',
+ )
class RulesConfigurationAction(workflows.Action):
diff --git a/requirements.txt b/requirements.txt
index 14571dc..69f775e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-parsedatetime>=1.4
\ No newline at end of file
+parsedatetime>=1.4