Ghost/ghost/admin/app/components/settings/audit-log/search.js
Daniel Lockyer 68030d4d52
Added basic filtering and searching to audit log
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
2022-08-22 15:41:04 +02:00

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});
}
}