discourse/app/assets/javascripts/admin/controllers/admin-logs-screened-urls.js.es6
2016-03-31 17:40:54 -04:00

23 lines
556 B
JavaScript

import { exportEntity } from 'discourse/lib/export-csv';
import { outputExportResult } from 'discourse/lib/export-result';
import ScreenedUrl from 'admin/models/screened-url';
export default Ember.ArrayController.extend({
loading: false,
show() {
const self = this;
self.set('loading', true);
ScreenedUrl.findAll().then(function(result) {
self.set('model', result);
self.set('loading', false);
});
},
actions: {
exportScreenedUrlList() {
exportEntity('screened_url').then(outputExportResult);
}
}
});