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