Skip to content

Commit d0330d2

Browse files
committed
Merge branch 'main' into serverless/header-bar-2-ii
2 parents d57714c + 0b95987 commit d0330d2

17 files changed

Lines changed: 21 additions & 124 deletions

test/functional/apps/visualize/group6/_tsvb_tsdb_basic.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
1717
const esArchiver = getService('esArchiver');
1818
const testSubjects = getService('testSubjects');
1919

20-
describe('visual builder tsdb check', function describeIndexTests() {
20+
// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/163454
21+
describe.skip('visual builder tsdb check', function describeIndexTests() {
2122
before(async () => {
2223
log.info(`loading sample TSDB index...`);
2324
await esArchiver.load('test/functional/fixtures/es_archiver/kibana_sample_data_logs_tsdb');

x-pack/plugins/security_solution/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe(
7070
);
7171
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_DOC_COUNT_CELL).should(
7272
'contain.text',
73-
2
73+
0
7474
);
7575
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_HOST_PREVALENCE_CELL).should(
7676
'contain.text',

x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import { EventKind } from '../../shared/hooks/use_fetch_field_value_pair_by_even
3737

3838
interface PrevalenceDetailsTableCell {
3939
highlightedField: { name: string; values: string[] };
40-
scopeId: string;
4140
}
4241

4342
export const PREVALENCE_TAB_ID = 'prevalence-details';
@@ -60,7 +59,6 @@ const columns: Array<EuiBasicTableColumn<unknown>> = [
6059
render: (data: PrevalenceDetailsTableCell) => (
6160
<PrevalenceDetailsCountCell
6261
highlightedField={data.highlightedField}
63-
scopeId={data.scopeId}
6462
type={{
6563
eventKind: EventKind.signal,
6664
include: true,
@@ -75,7 +73,6 @@ const columns: Array<EuiBasicTableColumn<unknown>> = [
7573
render: (data: PrevalenceDetailsTableCell) => (
7674
<PrevalenceDetailsCountCell
7775
highlightedField={data.highlightedField}
78-
scopeId={data.scopeId}
7976
type={{
8077
eventKind: EventKind.signal,
8178
exclude: true,
@@ -90,7 +87,6 @@ const columns: Array<EuiBasicTableColumn<unknown>> = [
9087
render: (data: PrevalenceDetailsTableCell) => (
9188
<PrevalenceDetailsPrevalenceCell
9289
highlightedField={data.highlightedField}
93-
scopeId={data.scopeId}
9490
aggregationField={'host.name'}
9591
/>
9692
),
@@ -102,7 +98,6 @@ const columns: Array<EuiBasicTableColumn<unknown>> = [
10298
render: (data: PrevalenceDetailsTableCell) => (
10399
<PrevalenceDetailsPrevalenceCell
104100
highlightedField={data.highlightedField}
105-
scopeId={data.scopeId}
106101
aggregationField={'user.name'}
107102
/>
108103
),
@@ -129,7 +124,6 @@ export const PrevalenceDetails: React.FC = () => {
129124
name: summaryRow.description.data.field,
130125
values: summaryRow.description.values || [],
131126
},
132-
scopeId,
133127
});
134128

135129
return (summaryRows || []).map((summaryRow) => {

x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.test.tsx

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const highlightedField = {
2424
name: 'field',
2525
values: ['values'],
2626
};
27-
const scopeId = 'scopeId';
2827
const type = {
2928
eventKind: EventKind.signal,
3029
include: true,
@@ -39,11 +38,7 @@ describe('PrevalenceDetailsAlertCountCell', () => {
3938
});
4039

4140
const { getByTestId } = render(
42-
<PrevalenceDetailsCountCell
43-
highlightedField={highlightedField}
44-
scopeId={scopeId}
45-
type={type}
46-
/>
41+
<PrevalenceDetailsCountCell highlightedField={highlightedField} type={type} />
4742
);
4843

4944
expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_LOADING_TEST_ID)).toBeInTheDocument();
@@ -57,11 +52,7 @@ describe('PrevalenceDetailsAlertCountCell', () => {
5752
});
5853

5954
const { getByTestId } = render(
60-
<PrevalenceDetailsCountCell
61-
highlightedField={highlightedField}
62-
scopeId={scopeId}
63-
type={type}
64-
/>
55+
<PrevalenceDetailsCountCell highlightedField={highlightedField} type={type} />
6556
);
6657

6758
expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_ERROR_TEST_ID)).toBeInTheDocument();
@@ -75,11 +66,7 @@ describe('PrevalenceDetailsAlertCountCell', () => {
7566
});
7667

7768
const { getByTestId } = render(
78-
<PrevalenceDetailsCountCell
79-
highlightedField={highlightedField}
80-
scopeId={scopeId}
81-
type={type}
82-
/>
69+
<PrevalenceDetailsCountCell highlightedField={highlightedField} type={type} />
8370
);
8471

8572
expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toBeInTheDocument();
@@ -94,11 +81,7 @@ describe('PrevalenceDetailsAlertCountCell', () => {
9481
});
9582

9683
const { getByTestId } = render(
97-
<PrevalenceDetailsCountCell
98-
highlightedField={highlightedField}
99-
scopeId={scopeId}
100-
type={type}
101-
/>
84+
<PrevalenceDetailsCountCell highlightedField={highlightedField} type={type} />
10285
);
10386

10487
expect(getByTestId(PREVALENCE_DETAILS_COUNT_CELL_VALUE_TEST_ID)).toBeInTheDocument();

x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_count_cell.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ import {
1515
} from './test_ids';
1616
import type { EventType } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type';
1717
import { useFetchFieldValuePairByEventType } from '../../shared/hooks/use_fetch_field_value_pair_by_event_type';
18-
import { TimelineId } from '../../../../common/types';
1918

2019
export interface PrevalenceDetailsCountCellProps {
2120
/**
2221
* The highlighted field name and values
2322
* */
2423
highlightedField: { name: string; values: string[] };
25-
/**
26-
* The scope id
27-
*/
28-
scopeId: string;
2924
/**
3025
* Limit the search to include or exclude a specific value for the event.kind field
3126
* (alert, asset, enrichment, event, metric, state, pipeline_error, signal)
@@ -41,12 +36,10 @@ export interface PrevalenceDetailsCountCellProps {
4136
*/
4237
export const PrevalenceDetailsCountCell: VFC<PrevalenceDetailsCountCellProps> = ({
4338
highlightedField,
44-
scopeId,
4539
type,
4640
}) => {
4741
const { loading, error, count } = useFetchFieldValuePairByEventType({
4842
highlightedField,
49-
isActiveTimelines: scopeId === TimelineId.active,
5043
type,
5144
});
5245

x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.test.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const highlightedField = {
2323
name: 'field',
2424
values: ['values'],
2525
};
26-
const scopeId = 'scopeId';
2726
const aggregationField = 'aggregationField';
2827

2928
describe('PrevalenceDetailsAlertCountCell', () => {
@@ -42,7 +41,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
4241
const { getByTestId } = render(
4342
<PrevalenceDetailsPrevalenceCell
4443
highlightedField={highlightedField}
45-
scopeId={scopeId}
4644
aggregationField={aggregationField}
4745
/>
4846
);
@@ -65,7 +63,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
6563
const { getByTestId } = render(
6664
<PrevalenceDetailsPrevalenceCell
6765
highlightedField={highlightedField}
68-
scopeId={scopeId}
6966
aggregationField={aggregationField}
7067
/>
7168
);
@@ -88,7 +85,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
8885
const { getByTestId } = render(
8986
<PrevalenceDetailsPrevalenceCell
9087
highlightedField={highlightedField}
91-
scopeId={scopeId}
9288
aggregationField={aggregationField}
9389
/>
9490
);
@@ -111,7 +107,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
111107
const { getByTestId } = render(
112108
<PrevalenceDetailsPrevalenceCell
113109
highlightedField={highlightedField}
114-
scopeId={scopeId}
115110
aggregationField={aggregationField}
116111
/>
117112
);
@@ -134,7 +129,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
134129
const { getByTestId } = render(
135130
<PrevalenceDetailsPrevalenceCell
136131
highlightedField={highlightedField}
137-
scopeId={scopeId}
138132
aggregationField={aggregationField}
139133
/>
140134
);
@@ -157,7 +151,6 @@ describe('PrevalenceDetailsAlertCountCell', () => {
157151
const { getByTestId } = render(
158152
<PrevalenceDetailsPrevalenceCell
159153
highlightedField={highlightedField}
160-
scopeId={scopeId}
161154
aggregationField={aggregationField}
162155
/>
163156
);

x-pack/plugins/security_solution/public/flyout/left/components/prevalence_details_prevalence_cell.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,13 @@ import {
1414
PREVALENCE_DETAILS_PREVALENCE_CELL_VALUE_TEST_ID,
1515
} from './test_ids';
1616
import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation';
17-
import { TimelineId } from '../../../../common/types';
1817
import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field';
1918

2019
export interface PrevalenceDetailsPrevalenceCellProps {
2120
/**
2221
* The highlighted field name and values
2322
* */
2423
highlightedField: { name: string; values: string[] };
25-
/**
26-
* The scope id
27-
*/
28-
scopeId: string;
2924
/**
3025
* The aggregation field
3126
*/
@@ -38,7 +33,6 @@ export interface PrevalenceDetailsPrevalenceCellProps {
3833
*/
3934
export const PrevalenceDetailsPrevalenceCell: VFC<PrevalenceDetailsPrevalenceCellProps> = ({
4035
highlightedField,
41-
scopeId,
4236
aggregationField,
4337
}) => {
4438
const {
@@ -47,7 +41,6 @@ export const PrevalenceDetailsPrevalenceCell: VFC<PrevalenceDetailsPrevalenceCel
4741
count: aggregationCount,
4842
} = useFetchFieldValuePairWithAggregation({
4943
highlightedField,
50-
isActiveTimelines: scopeId === TimelineId.active,
5144
aggregationField,
5245
});
5346

x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const highlightedField = {
2626
name: 'field',
2727
values: ['values'],
2828
};
29-
const scopeId = 'scopeId';
3029
const callbackIfNull = jest.fn();
3130

3231
const panelContextValue = {
@@ -61,7 +60,6 @@ describe('<PrevalenceOverview />', () => {
6160
prevalenceRows: [
6261
<PrevalenceOverviewRow
6362
highlightedField={highlightedField}
64-
scopeId={scopeId}
6563
callbackIfNull={callbackIfNull}
6664
data-test-subj={'test'}
6765
/>,
@@ -106,7 +104,6 @@ describe('<PrevalenceOverview />', () => {
106104
prevalenceRows: [
107105
<PrevalenceOverviewRow
108106
highlightedField={highlightedField}
109-
scopeId={scopeId}
110107
callbackIfNull={callbackIfNull}
111108
data-test-subj={'test'}
112109
/>,

x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const highlightedField = {
1818
name: 'field',
1919
values: ['values'],
2020
};
21-
const scopeId = 'scopeId';
2221
const dataTestSubj = 'test';
2322
const iconDataTestSubj = 'testIcon';
2423
const valueDataTestSubj = 'testValue';
@@ -41,7 +40,6 @@ describe('<PrevalenceOverviewRow />', () => {
4140
const { getByTestId, getAllByText, queryByTestId } = render(
4241
<PrevalenceOverviewRow
4342
highlightedField={highlightedField}
44-
scopeId={scopeId}
4543
callbackIfNull={() => {}}
4644
data-test-subj={dataTestSubj}
4745
/>
@@ -71,7 +69,6 @@ describe('<PrevalenceOverviewRow />', () => {
7169
const { queryAllByAltText } = render(
7270
<PrevalenceOverviewRow
7371
highlightedField={highlightedField}
74-
scopeId={scopeId}
7572
callbackIfNull={callbackIfNull}
7673
data-test-subj={dataTestSubj}
7774
/>
@@ -97,7 +94,6 @@ describe('<PrevalenceOverviewRow />', () => {
9794
const { queryAllByAltText } = render(
9895
<PrevalenceOverviewRow
9996
highlightedField={highlightedField}
100-
scopeId={scopeId}
10197
callbackIfNull={callbackIfNull}
10298
data-test-subj={dataTestSubj}
10399
/>
@@ -122,7 +118,6 @@ describe('<PrevalenceOverviewRow />', () => {
122118
const { getByTestId } = render(
123119
<PrevalenceOverviewRow
124120
highlightedField={highlightedField}
125-
scopeId={scopeId}
126121
callbackIfNull={() => {}}
127122
data-test-subj={dataTestSubj}
128123
/>

x-pack/plugins/security_solution/public/flyout/right/components/prevalence_overview_row.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { PREVALENCE_ROW_UNCOMMON } from './translations';
1111
import { useFetchFieldValuePairWithAggregation } from '../../shared/hooks/use_fetch_field_value_pair_with_aggregation';
1212
import { useFetchUniqueByField } from '../../shared/hooks/use_fetch_unique_by_field';
1313
import { InsightsSummaryRow } from './insights_summary_row';
14-
import { TimelineId } from '../../../../common/types';
1514

1615
const HOST_FIELD = 'host.name';
1716
const PERCENTAGE_THRESHOLD = 0.1; // we show the prevalence if its value is below 10%
@@ -21,10 +20,6 @@ export interface PrevalenceOverviewRowProps {
2120
* The highlighted field name and values
2221
* */
2322
highlightedField: { name: string; values: string[] };
24-
/**
25-
* Maintain backwards compatibility // TODO remove when possible
26-
*/
27-
scopeId: string;
2823
/**
2924
* This is a solution to allow the parent component to NOT render if all its row children are null
3025
*/
@@ -42,19 +37,15 @@ export interface PrevalenceOverviewRowProps {
4237
*/
4338
export const PrevalenceOverviewRow: VFC<PrevalenceOverviewRowProps> = ({
4439
highlightedField,
45-
scopeId,
4640
callbackIfNull,
4741
'data-test-subj': dataTestSubj,
4842
}) => {
49-
const isActiveTimelines = scopeId === TimelineId.active;
50-
5143
const {
5244
loading: hostsLoading,
5345
error: hostsError,
5446
count: hostsCount,
5547
} = useFetchFieldValuePairWithAggregation({
5648
highlightedField,
57-
isActiveTimelines,
5849
aggregationField: HOST_FIELD,
5950
});
6051

0 commit comments

Comments
 (0)