2018-06-15 11:03:24 -04:00
|
|
|
import Backup from "admin/models/backup";
|
2015-11-20 20:27:06 -05:00
|
|
|
|
2015-08-06 12:14:59 -04:00
|
|
|
export default Ember.Route.extend({
|
2018-01-31 06:05:06 -05:00
|
|
|
activate() {
|
2018-06-15 11:03:24 -04:00
|
|
|
this.messageBus.subscribe("/admin/backups", backups =>
|
2018-08-31 07:50:15 -04:00
|
|
|
this.controller.set("model", backups.map(backup => Backup.create(backup)))
|
2018-06-15 11:03:24 -04:00
|
|
|
);
|
2018-01-31 06:05:06 -05:00
|
|
|
},
|
|
|
|
|
2015-08-06 12:14:59 -04:00
|
|
|
model() {
|
2015-11-20 20:27:06 -05:00
|
|
|
return Backup.find();
|
2018-01-31 06:05:06 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
deactivate() {
|
|
|
|
this.messageBus.unsubscribe("/admin/backups");
|
2015-08-06 12:14:59 -04:00
|
|
|
}
|
|
|
|
});
|