<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import _ from 'lodash';
import moment from 'moment';
//
import * as Basic from '../../../components/basic';
import * as Advanced from '../../../components/advanced';
import * as Utils from '../../../utils';
import { EntityEventManager, SecurityManager, ConfigurationManager, AuditManager } from '../../../redux';
import SearchParameters from '../../../domain/SearchParameters';
import EntityStateTableComponent, { EntityStateTable } from './EntityStateTable';
import OperationStateEnum from '../../../enums/OperationStateEnum';
import PriorityTypeEnum from '../../../enums/PriorityTypeEnum';

const manager = new EntityEventManager();
const auditManager = new AuditManager();

/**
 * Table of persisted entity events.
 *
 * @author <NAME>
 */
export class EntityEventTable extends Advanced.AbstractTableContent {

  constructor(props, context) {
    super(props, context);
    this.state = {
      filterOpened: props.filterOpened,
      detail: {
        show: false,
        entity: {},
        message: null
      },
      entityType: props._searchParameters && props._searchParameters.getFilters().has('ownerType')
        ? props._searchParameters.getFilters().get('ownerType')
        : null
    };
  }

  componentDidMount() {
    super.componentDidMount();
    //
    this.context.store.dispatch(auditManager.fetchAuditedEntitiesNames());
  }

  getContentKey() {
    return 'content.entityEvents';
  }

  getManager() {
    return manager;
  }

  getUiKey() {
    return this.props.uiKey;
  }

  useFilter(event) {
    if (event) {
      event.preventDefault();
    }
    this.refs.table.useFilterForm(this.refs.filterForm);
  }

  useFilterData(data = {}) {
    this.refs.filterForm.setData(data);
    this.refs.table.useFilterData(data);
  }

  cancelFilter(event) {
    if (event) {
      event.preventDefault();
    }
    this.refs.table.cancelFilter(this.refs.filterForm);
  }

  onEntityTypeChange(entityType) {
    this.setState({
      entityType: entityType ? entityType.value : null
    });<commit_msg>FE: support event quick filter + standard filter properties<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import _ from 'lodash';
import moment from 'moment';
//
import * as Basic from '../../../components/basic';
import * as Advanced from '../../../components/advanced';
import * as Utils from '../../../utils';
import { EntityEventManager, SecurityManager, ConfigurationManager, AuditManager } from '../../../redux';
import SearchParameters from '../../../domain/SearchParameters';
import EntityStateTableComponent, { EntityStateTable } from './EntityStateTable';
import OperationStateEnum from '../../../enums/OperationStateEnum';
import PriorityTypeEnum from '../../../enums/PriorityTypeEnum';

const manager = new EntityEventManager();
const auditManager = new AuditManager();

/**
 * Table of persisted entity events.
 *
 * @author <NAME>
 */
export class EntityEventTable extends Advanced.AbstractTableContent {

  constructor(props, context) {
    super(props, context);
    this.state = {
      filterOpened: props.filterOpened,
      detail: {
        show: false,
        entity: {},
        message: null
      },
      entityType: (props._searchParameters && props._searchParameters.getFilters().has('ownerType'))
        ? props._searchParameters.getFilters().get('ownerType')
        : null
    };
  }

  componentDidMount() {
    super.componentDidMount();
    //
    this.context.store.dispatch(auditManager.fetchAuditedEntitiesNames());
  }

  getContentKey() {
    return 'content.entityEvents';
  }

  getManager() {
    return manager;
  }

  getUiKey() {
    return this.props.uiKey;
  }

  useFilter(event) {
    if (event) {
      event.preventDefault();
    }
    this.refs.table.useFilterForm(this.refs.filterForm);
  }

  useFilterData(data = {}) {
    const _data = { ...this.refs.filterForm.getData() || {}, ...data };
    //
    this.refs.filterForm.setData(_data);
    this.refs.table.useFilterData(_data);
  }

  cancelFilter(event) {
    if (event) {
      event.preventDefault();
    }
    this.refs.table.cancelFilter(this.refs.filterForm);
  }

  onEntityTypeChange(entityType) {
    this.setState({
      entityType: entityType ? entityType.value : null
    });
{'fraction_non_alphanumeric': 0.14846765039727583, 'fraction_numerical': 0.0, 'mean_word_length': 3.204198473282443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4047633', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1254, 'n_words': 265}