From 96f2c6e2aa65ca5a8a5c8419aae14d7812e2bd83 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 11 Dec 2024 09:50:54 +0100 Subject: [PATCH] archive: add button to download the config --- dashboard/public/views/backups.html | 1 + dashboard/public/views/backups.js | 2 +- src/archives.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dashboard/public/views/backups.html b/dashboard/public/views/backups.html index 7f89bec62..330a37d67 100644 --- a/dashboard/public/views/backups.html +++ b/dashboard/public/views/backups.html @@ -794,6 +794,7 @@ + diff --git a/dashboard/public/views/backups.js b/dashboard/public/views/backups.js index 636090b1a..9eee605ee 100644 --- a/dashboard/public/views/backups.js +++ b/dashboard/public/views/backups.js @@ -501,7 +501,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat document.body.removeChild(element); } - $scope.downloadConfig = function (backup) { + $scope.downloadConfig = function (backup) { // can also be a archive object // secrets and tokens already come with placeholder characters we remove them var tmp = { remotePath: backup.remotePath, diff --git a/src/archives.js b/src/archives.js index f1c041fba..5c0ac996c 100644 --- a/src/archives.js +++ b/src/archives.js @@ -17,7 +17,7 @@ const assert = require('assert'), safe = require('safetydance'), uuid = require('uuid'); -const ARCHIVE_FIELDS = [ 'archives.id', 'backupId', 'archives.creationTime', 'backups.appConfigJson', '(archives.icon IS NOT NULL) AS hasIcon', '(archives.appStoreIcon IS NOT NULL) AS hasAppStoreIcon' ]; +const ARCHIVE_FIELDS = [ 'archives.id', 'backupId', 'archives.creationTime', 'backups.remotePath', 'backups.appConfigJson', '(archives.icon IS NOT NULL) AS hasIcon', '(archives.appStoreIcon IS NOT NULL) AS hasAppStoreIcon' ]; function postProcess(result) { assert.strictEqual(typeof result, 'object');