Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries #80871

Merged
merged 32 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1b12a98
Add index search query bar
Oct 13, 2020
59339c4
Add second query bar and update services used to be compatible with q…
Oct 16, 2020
3f2ad7d
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Oct 16, 2020
fa4f0ef
Verify syntax and send to server. Add handling for shapes only logic …
Oct 19, 2020
2349822
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Oct 20, 2020
cb7d3b8
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 2, 2020
6680db0
Construct es queries filters server side with interval dates
Nov 2, 2020
ed259c6
Fix how query bars repopulate for alert edit
Nov 3, 2020
8f9fce2
Add parenthesis to query conditions to structure conditions correctly
Nov 3, 2020
29f1b30
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 3, 2020
4f692c4
Type fixes and clean up
Nov 4, 2020
5f5df0c
More type fixes and safety checks on the server side
Nov 4, 2020
56d646d
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 4, 2020
8e86d59
Type fix
Nov 4, 2020
791e57f
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 11, 2020
a740033
Add tests for esFormattedQuery
Nov 11, 2020
2499530
Review feedback. Remove 'temp' in names, add 'Input'
Nov 11, 2020
120c0c9
Add snapshot tests of index components
Nov 12, 2020
faf41dd
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 12, 2020
0b6fc7a
Type updates
Nov 12, 2020
fb27dc5
Snapshot updates
Nov 12, 2020
e52ed1f
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 12, 2020
ff8aaef
Update snapshot
Nov 12, 2020
56132d4
Update kibana.json to cover deps
Nov 13, 2020
870c16c
Add in kibana deps missed by merge
Nov 14, 2020
8475bf0
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 16, 2020
818dade
Update deps missed by merge
Nov 16, 2020
a4586e0
Type updates
Nov 16, 2020
984d802
Merge branch 'master' into add-query-inputs-to-geo-tracker
kibanamachine Nov 16, 2020
af9e073
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 18, 2020
733c080
Merge remote-tracking branch 'upstream/master' into add-query-inputs-…
Nov 18, 2020
c07d6f4
Add back optional plugin and tweak required plugins to undo merge cha…
Nov 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugins/stack_alerts/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"server": true,
"version": "8.0.0",
"kibanaVersion": "kibana",
"requiredPlugins": ["alerts", "features", "triggersActionsUi", "kibanaReact"],
"requiredPlugins": ["alerts", "features", "triggersActionsUi", "kibanaReact", "savedObjects", "data"],
"configPath": ["xpack", "stack_alerts"],
"ui": true
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import { shallow } from 'enzyme';
import { EntityIndexExpression } from './expressions/entity_index_expression';
import { BoundaryIndexExpression } from './expressions/boundary_index_expression';
import { ApplicationStart, DocLinksStart, HttpSetup, ToastsStart } from 'kibana/public';
import {
ActionTypeRegistryContract,
AlertTypeRegistryContract,
IErrorObject,
} from '../../../../../triggers_actions_ui/public';
import { IIndexPattern } from '../../../../../../../src/plugins/data/common';

const alertsContext = {
http: (null as unknown) as HttpSetup,
alertTypeRegistry: (null as unknown) as AlertTypeRegistryContract,
actionTypeRegistry: (null as unknown) as ActionTypeRegistryContract,
toastNotifications: (null as unknown) as ToastsStart,
docLinks: (null as unknown) as DocLinksStart,
capabilities: (null as unknown) as ApplicationStart['capabilities'],
};

const alertParams = {
index: '',
indexId: '',
geoField: '',
entity: '',
dateField: '',
trackingEvent: '',
boundaryType: '',
boundaryIndexTitle: '',
boundaryIndexId: '',
boundaryGeoField: '',
};

test('should render EntityIndexExpression', async () => {
const component = shallow(
<EntityIndexExpression
dateField={'testDateField'}
geoField={'testGeoField'}
alertsContext={alertsContext}
errors={{} as IErrorObject}
setAlertParamsDate={() => {}}
setAlertParamsGeoField={() => {}}
setAlertProperty={() => {}}
setIndexPattern={() => {}}
indexPattern={('' as unknown) as IIndexPattern}
isInvalid={false}
/>
);

expect(component).toMatchSnapshot();
});

test('should render EntityIndexExpression w/ invalid flag if invalid', async () => {
const component = shallow(
<EntityIndexExpression
dateField={'testDateField'}
geoField={'testGeoField'}
alertsContext={alertsContext}
errors={{} as IErrorObject}
setAlertParamsDate={() => {}}
setAlertParamsGeoField={() => {}}
setAlertProperty={() => {}}
setIndexPattern={() => {}}
indexPattern={('' as unknown) as IIndexPattern}
isInvalid={true}
/>
);

expect(component).toMatchSnapshot();
});

test('should render BoundaryIndexExpression', async () => {
const component = shallow(
<BoundaryIndexExpression
alertParams={alertParams}
alertsContext={alertsContext}
errors={{} as IErrorObject}
boundaryIndexPattern={('' as unknown) as IIndexPattern}
setBoundaryIndexPattern={() => {}}
setBoundaryGeoField={() => {}}
setBoundaryNameField={() => {}}
boundaryNameField={'testNameField'}
/>
);

expect(component).toMatchSnapshot();
});
Loading