FIX: Backup logs were usually missing the first few lines

And because of debouncing, the log wasn't always reset at the beginning of a backup or restore.
This commit is contained in:
Gerhard Schlager
2018-09-19 20:00:03 +02:00
parent 18d5d51d98
commit 681262ddce
5 changed files with 44 additions and 51 deletions

View File

@ -1,24 +1,17 @@
import ModalFunctionality from "discourse/mixins/modal-functionality";
import Backup from "admin/models/backup";
export default Ember.Controller.extend(ModalFunctionality, {
adminBackupsLogs: Ember.inject.controller(),
_startBackup(withUploads) {
this.currentUser.set("hideReadOnlyAlert", true);
Backup.start(withUploads).then(() => {
this.get("adminBackupsLogs.logs").clear();
this.send("backupStarted");
});
},
actions: {
startBackup() {
this._startBackup();
startBackupWithUploads() {
this.send("closeModal");
this.send("startBackup", true);
},
startBackupWithoutUpload() {
this._startBackup(false);
startBackupWithoutUploads() {
this.send("closeModal");
this.send("startBackup", false);
},
cancel() {