2014-08-20 12:48:56 -04:00
|
|
|
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
|
|
|
2015-08-11 12:27:07 -04:00
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
2014-08-20 12:48:56 -04:00
|
|
|
needs: ["adminBackupsLogs"],
|
|
|
|
|
|
|
|
_startBackup: function (withUploads) {
|
|
|
|
var self = this;
|
|
|
|
Discourse.User.currentProp("hideReadOnlyAlert", true);
|
2015-11-20 10:00:12 -05:00
|
|
|
Discourse.Backup.start(withUploads).then(function() {
|
2014-08-20 12:48:56 -04:00
|
|
|
self.get("controllers.adminBackupsLogs").clear();
|
|
|
|
self.send("backupStarted");
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
|
|
|
|
startBackup: function () {
|
2015-03-14 07:46:46 -04:00
|
|
|
this._startBackup();
|
2014-08-20 12:48:56 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
startBackupWithoutUpload: function () {
|
2015-03-14 07:46:46 -04:00
|
|
|
this._startBackup(false);
|
2014-08-20 12:48:56 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
cancel: function () {
|
|
|
|
this.send("closeModal");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|