mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 00:34:15 +08:00
fab36e6cf7
- Remove all `needs:` code
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");
|
|
}
|
|
}
|
|
});
|