2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2015-11-21 09:27:06 +08:00
|
|
|
import Backup from "admin/models/backup";
|
|
|
|
|
2019-10-24 00:39:32 +08:00
|
|
|
export default Route.extend({
|
2018-01-31 19:05:06 +08:00
|
|
|
activate() {
|
|
|
|
this.messageBus.subscribe("/admin/backups", backups =>
|
2019-11-15 23:34:26 +08:00
|
|
|
this.controller.set(
|
|
|
|
"model",
|
|
|
|
backups.map(backup => Backup.create(backup))
|
|
|
|
)
|
2018-01-31 19:05:06 +08:00
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2015-08-07 00:14:59 +08:00
|
|
|
model() {
|
2015-11-21 09:27:06 +08:00
|
|
|
return Backup.find();
|
2018-01-31 19:05:06 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
deactivate() {
|
|
|
|
this.messageBus.unsubscribe("/admin/backups");
|
2015-08-07 00:14:59 +08:00
|
|
|
}
|
|
|
|
});
|