mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 11:15:48 +08:00
5c899c765b
This reverts commit c21457d6a7
.
33 lines
717 B
JavaScript
33 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");
|
|
}
|
|
|
|
}
|
|
|
|
});
|