diff --git a/app/src/filters/size.js b/app/src/filters/size.js new file mode 100644 index 00000000..050f70ba --- /dev/null +++ b/app/src/filters/size.js @@ -0,0 +1,6 @@ +export function humanSize (bytes) { + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'] + if (bytes === 0) return 'n/a' + const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))) + return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i] +} diff --git a/app/src/router/routes.js b/app/src/router/routes.js index 855bde46..526142fd 100644 --- a/app/src/router/routes.js +++ b/app/src/router/routes.js @@ -291,6 +291,18 @@ const routes = [ { name: 'backup', trad: 'backup' } ] } + }, + { + name: 'backup-list', + path: '/backup/:id', + component: () => import(/* webpackChunkName: "views/backup" */ '@/views/backup/BackupList'), + props: true, + meta: { + breadcrumb: [ + { name: 'backup', trad: 'backup' }, + { name: 'backup-list', param: 'id' } + ] + } } ] diff --git a/app/src/views/backup/Backup.vue b/app/src/views/backup/Backup.vue index 00cd122b..0e354f96 100644 --- a/app/src/views/backup/Backup.vue +++ b/app/src/views/backup/Backup.vue @@ -3,7 +3,7 @@
diff --git a/app/src/views/backup/BackupList.vue b/app/src/views/backup/BackupList.vue new file mode 100644 index 00000000..07823f2d --- /dev/null +++ b/app/src/views/backup/BackupList.vue @@ -0,0 +1,76 @@ + + +