2015-08-11 05:11:27 +08:00
|
|
|
import debounce from 'discourse/lib/debounce';
|
2015-11-20 21:14:50 +08:00
|
|
|
import EmailLog from 'admin/models/email-log';
|
2014-07-23 11:20:45 +08:00
|
|
|
|
2015-08-12 00:27:07 +08:00
|
|
|
export default Ember.Controller.extend({
|
2015-08-11 05:11:27 +08:00
|
|
|
filterEmailLogs: debounce(function() {
|
2014-07-23 11:20:45 +08:00
|
|
|
var self = this;
|
2015-11-20 21:14:50 +08:00
|
|
|
EmailLog.findAll(this.get("filter")).then(function(logs) {
|
2014-07-23 11:20:45 +08:00
|
|
|
self.set("model", logs);
|
|
|
|
});
|
|
|
|
}, 250).observes("filter.user", "filter.address", "filter.type", "filter.skipped_reason")
|
|
|
|
});
|