better filenames for backup configs

This commit is contained in:
Girish Ramakrishnan
2020-10-15 16:37:45 -07:00
parent 57e8faa8ab
commit ecf1852367
2 changed files with 4 additions and 2 deletions

View File

@@ -309,7 +309,8 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
if ($scope.backupConfig[k] !== SECRET_PLACEHOLDER) tmp[k] = $scope.backupConfig[k];
});
download('cloudron_backup.json', JSON.stringify(tmp));
var filename = 'cloudron-backup-config-' + (new Date).toISOString().replace(/:|T/g,'-').replace(/\..*/,'') + '.json';
download(filename, JSON.stringify(tmp));
};
$scope.backupDetails = {