Skip to content

Commit

Permalink
Reverted other changes to reduce the diff on the commit to even small…
Browse files Browse the repository at this point in the history
…er section
  • Loading branch information
FrankHassanabad committed Nov 11, 2020
1 parent 0f234ef commit 499e721
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const schema: FormSchema<DefineStepRule> = {
...args: Parameters<ValidationFunc>
): ReturnType<ValidationFunc<{}, ERROR_CODE>> | undefined => {
const [{ value, path, formData }] = args;
const { query, filters } = value as DefineStepRule['queryBar'];
const { query, filters } = value as FieldValueQueryBar;
const needsValidation = !isMlRule(formData.ruleType);
if (!needsValidation) {
return;
Expand All @@ -96,7 +96,7 @@ export const schema: FormSchema<DefineStepRule> = {
...args: Parameters<ValidationFunc>
): ReturnType<ValidationFunc<{}, ERROR_CODE>> | undefined => {
const [{ value, path, formData }] = args;
const { query } = value as DefineStepRule['queryBar'];
const { query } = value as FieldValueQueryBar;
const needsValidation = !isMlRule(formData.ruleType);
if (!needsValidation) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import { esFilters } from '../../../../../../../../../../src/plugins/data/public';
import { Rule, RuleError } from '../../../../../containers/detection_engine/rules';
import { AboutStepRule, ActionsStepRule, DefineStepRule, ScheduleStepRule } from '../../types';
import { FieldValueQueryBar } from '../../../../../components/rules/query_bar';
import { fillEmptySeverityMappings } from '../../helpers';

export const mockQueryBar: DefineStepRule['queryBar'] = {
export const mockQueryBar: FieldValueQueryBar = {
query: {
query: 'test query',
language: 'kuery',
Expand Down

0 comments on commit 499e721

Please sign in to comment.