mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 23:14:30 +08:00
29 lines
647 B
JavaScript
29 lines
647 B
JavaScript
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
import Backup from "admin/models/backup";
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
adminBackupsLogs: Ember.inject.controller(),
|
|
|
|
_startBackup(withUploads) {
|
|
this.currentUser.set("hideReadOnlyAlert", true);
|
|
Backup.start(withUploads).then(() => {
|
|
this.get("adminBackupsLogs.logs").clear();
|
|
this.send("backupStarted");
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
startBackup() {
|
|
this._startBackup();
|
|
},
|
|
|
|
startBackupWithoutUpload() {
|
|
this._startBackup(false);
|
|
},
|
|
|
|
cancel() {
|
|
this.send("closeModal");
|
|
}
|
|
}
|
|
});
|