mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
68030d4d52
refs https://github.com/TryGhost/Toolbox/issues/356 - this adds some basic filtering and search across the audit log events - not all of it works, but filtering by objects and searching for users should work
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
import {task, timeout} from 'ember-concurrency';
|
|
|
|
export default class AuditLogSearch extends Component {
|
|
@service store;
|
|
|
|
@action
|
|
clear() {
|
|
this.args.onChange(null);
|
|
}
|
|
|
|
@task
|
|
*searchUsersTask(term) {
|
|
yield timeout(300); // debounce
|
|
|
|
return yield this.store.query('user', {search: term, limit: 20});
|
|
}
|
|
}
|