mirror of
https://github.com/discourse/discourse.git
synced 2026-08-10 04:58:31 -05:00
FIX: modal backup wasn't working
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import Controller from 'discourse/controllers/controller';
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
needs: ["adminBackupsLogs"],
|
||||
|
||||
_startBackup: function (withUploads) {
|
||||
var self = this;
|
||||
Discourse.User.currentProp("hideReadOnlyAlert", true);
|
||||
Discourse.Backup.start(withUploads).then(function() {
|
||||
self.get("controllers.adminBackupsLogs").clear();
|
||||
self.send("backupStarted");
|
||||
});
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
||||
startBackup: function () {
|
||||
this._startBackup();
|
||||
},
|
||||
|
||||
startBackupWithoutUpload: function () {
|
||||
this._startBackup(false);
|
||||
},
|
||||
|
||||
cancel: function () {
|
||||
this.send("closeModal");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user