mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 10:08:20 -05:00
34 lines
753 B
Text
34 lines
753 B
Text
|
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 () {
|
||
|
return this._startBackup();
|
||
|
},
|
||
|
|
||
|
startBackupWithoutUpload: function () {
|
||
|
return this._startBackup(false);
|
||
|
},
|
||
|
|
||
|
cancel: function () {
|
||
|
this.send("closeModal");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|