2019-10-23 12:39:32 -04:00
|
|
|
import Route from "@ember/routing/route";
|
2018-06-15 11:03:24 -04:00
|
|
|
import Backup from "admin/models/backup";
|
2015-11-20 20:27:06 -05:00
|
|
|
|
2019-10-23 12:39:32 -04:00
|
|
|
export default 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 =>
|
2019-11-15 10:34:26 -05: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
|
|
|
}
|
|
|
|
});
|