<commit_before>import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';

const ALL_EVENT_TYPES = [
    {event: 'added', icon: 'event-filter-signup', name: 'Added'},
    {event: 'edited', icon: 'event-filter-login', name: 'Edited'},
    {event: 'deleted', icon: 'event-filter-subscription', name: 'Deleted'}
];

const ALL_RESOURCE_TYPES = [
    {event: 'post', icon: 'event-filter-payment', name: 'Posts'},
    {event: 'page', icon: 'event-filter-payment', name: 'Pages'},
    {event: 'tag', icon: 'event-filter-newsletter', name: 'Tags'},
    {event: 'user', icon: 'idk', name: 'Users'},
    {event: 'integration', icon: 'event-filter-newsletter', name: 'Integrations'},
    {event: 'api_key', icon: 'event-filter-newsletter', name: 'API keys'},
    {event: 'label', icon: 'event-filter-newsletter', name: 'Labels'}
];

export default class AuditLogEventFilter extends Component {
    @service settings;
    @service feature;

    excludedEvents = null;
    excludedResources = null;

    get eventTypes() {
        const excludedEvents = (this.args.excludedEvents || '').split(',');

        return ALL_EVENT_TYPES.map(type => ({
            event: type.event,
            icon: type.icon,
            name: type.name,
            isSelected: !excludedEvents.includes(type.event)
        }));
    }

    get resourceTypes() {
        const excludedEvents = (this.args.excludedResources || '').split(',');

        return ALL_RESOURCE_TYPES.map(type => ({
            event: type.event,
            icon: type.icon,
            name: type.name,
            isSelected: !excludedEvents.includes(type.event)<commit_msg>Added `webhook` as a supported filtering resource<commit_after>import Component from '@glimmer/component';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';

const ALL_EVENT_TYPES = [
    {event: 'added', icon: 'event-filter-signup', name: 'Added'},
    {event: 'edited', icon: 'event-filter-login', name: 'Edited'},
    {event: 'deleted', icon: 'event-filter-subscription', name: 'Deleted'}
];

const ALL_RESOURCE_TYPES = [
    {event: 'post', icon: 'event-filter-payment', name: 'Posts'},
    {event: 'page', icon: 'event-filter-payment', name: 'Pages'},
    {event: 'tag', icon: 'event-filter-newsletter', name: 'Tags'},
    {event: 'user', icon: 'idk', name: 'Users'},
    {event: 'integration', icon: 'event-filter-newsletter', name: 'Integrations'},
    {event: 'api_key', icon: 'event-filter-newsletter', name: 'API keys'},
    {event: 'webhook', icon: 'event-filter-newsletter', name: 'Webhooks'},
    {event: 'label', icon: 'event-filter-newsletter', name: 'Labels'}
];

export default class AuditLogEventFilter extends Component {
    @service settings;
    @service feature;

    excludedEvents = null;
    excludedResources = null;

    get eventTypes() {
        const excludedEvents = (this.args.excludedEvents || '').split(',');

        return ALL_EVENT_TYPES.map(type => ({
            event: type.event,
            icon: type.icon,
            name: type.name,
            isSelected: !excludedEvents.includes(type.event)
        }));
    }

    get resourceTypes() {
        const excludedEvents = (this.args.excludedResources || '').split(',');

        return ALL_RESOURCE_TYPES.map(type => ({
            event: type.event,
            icon: type.icon,
            name: type.name,
            isSelected: !excludedEvents.includes(type.event)
{'fraction_non_alphanumeric': 0.165379113018598, 'fraction_numerical': 0.0, 'mean_word_length': 3.310727496917386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7588391', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1070, 'n_words': 261}