discourse/app/assets/javascripts/admin/controllers/modals/admin-start-backup.js.es6
Robin Ward fab36e6cf7 Fix more deprecations:
- Remove all `needs:` code
2016-10-21 17:28:37 -04:00

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");
}
}
});