From d839260b73dca6feab8198f52d1299cc1037c856 Mon Sep 17 00:00:00 2001 From: Axolotle Date: Fri, 25 Sep 2020 18:40:09 +0200 Subject: [PATCH] add BackupInfo view/route --- app/src/i18n/locales/en.json | 2 +- app/src/router/routes.js | 13 ++ app/src/views/backup/BackupInfo.vue | 265 ++++++++++++++++++++++++++++ app/src/views/backup/BackupList.vue | 1 + 4 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 app/src/views/backup/BackupInfo.vue diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 954cf27a..72d4d8c6 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -65,7 +65,7 @@ "confirm_install_app_danger": "WARNING! This application is still experimental (if not explicitly not working) and it is likely to break your system! You should probably NOT install it unless you know what you are doing. Are you willing to take that risk?", "confirm_migrations_skip": "Skipping migrations is not recommended. Are you sure you want to do that?", "confirm_postinstall": "You are about to launch the post-installation process on the domain %s. It may take a few minutes, *do not interrupt the operation*.", - "confirm_restore": "Are you sure you want to restore %s?", + "confirm_restore": "Are you sure you want to restore {name}?", "confirm_service_restart": "Are you sure you want to restart {name}?", "confirm_service_start": "Are you sure you want to start {name}?", "confirm_service_stop": "Are you sure you want to stop {name}?", diff --git a/app/src/router/routes.js b/app/src/router/routes.js index 526142fd..597c0c03 100644 --- a/app/src/router/routes.js +++ b/app/src/router/routes.js @@ -303,6 +303,19 @@ const routes = [ { name: 'backup-list', param: 'id' } ] } + }, + { + name: 'backup-info', + path: '/backup/:id/:name', + component: () => import(/* webpackChunkName: "views/backup" */ '@/views/backup/BackupInfo'), + props: true, + meta: { + breadcrumb: [ + { name: 'backup', trad: 'backup' }, + { name: 'backup-list', param: 'id' }, + { name: 'backup-info', param: 'name' } + ] + } } ] diff --git a/app/src/views/backup/BackupInfo.vue b/app/src/views/backup/BackupInfo.vue new file mode 100644 index 00000000..12495e49 --- /dev/null +++ b/app/src/views/backup/BackupInfo.vue @@ -0,0 +1,265 @@ + + + diff --git a/app/src/views/backup/BackupList.vue b/app/src/views/backup/BackupList.vue index 07823f2d..0fec91c3 100644 --- a/app/src/views/backup/BackupList.vue +++ b/app/src/views/backup/BackupList.vue @@ -61,6 +61,7 @@ export default { methods: { fetchData () { api.get('backup/archives?with_info').then(({ archives }) => { + // FIXME use archives = null if no archives this.archives = Object.entries(archives).map(([name, data]) => { data.name = name return data