mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 11:28:15 -05:00
c0b277d273
This change is discussed here: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821 Prior to this change we were not booting correctly with DISCOURSE_NO_CONSTANTS
32 lines
717 B
JavaScript
32 lines
717 B
JavaScript
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
|
import Backup from 'admin/models/backup';
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
needs: ["adminBackupsLogs"],
|
|
|
|
_startBackup: function (withUploads) {
|
|
var self = this;
|
|
Discourse.User.currentProp("hideReadOnlyAlert", true);
|
|
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");
|
|
}
|
|
|
|
}
|
|
|
|
});
|