mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 05:03:58 +08:00
32 lines
685 B
JavaScript
32 lines
685 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
|
|
export default Ember.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");
|
|
}
|
|
|
|
}
|
|
|
|
});
|