Skip to content

Commit 13cad80

Browse files
committed
merge with master
2 parents e2ac7d7 + 8cef945 commit 13cad80

File tree

53 files changed

+971
-1187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+971
-1187
lines changed

x-pack/legacy/plugins/maps/public/connected_components/layer_panel/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { fitToLayerExtent, updateSourceProp } from '../../actions/map_actions';
1212
function mapStateToProps(state = {}) {
1313
const selectedLayer = getSelectedLayer(state);
1414
return {
15-
key: selectedLayer ? selectedLayer.getId() : '',
15+
key: selectedLayer ? `${selectedLayer.getId()}${selectedLayer.isJoinable()}` : '',
1616
selectedLayer,
1717
};
1818
}

x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export function buildMapsTelemetry({
8787
const mapsCount = layerLists.length;
8888

8989
const dataSourcesCount = layerLists.map(lList => {
90+
// todo: not every source-descriptor has an id
91+
// @ts-ignore
9092
const sourceIdList = lList.map((layer: LayerDescriptor) => layer.sourceDescriptor.id);
9193
return _.uniq(sourceIdList).length;
9294
});

x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules.spec.ts

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ import {
77
FIFTH_RULE,
88
FIRST_RULE,
99
RULE_NAME,
10+
RULE_SWITCH,
1011
SECOND_RULE,
1112
SEVENTH_RULE,
1213
} from '../screens/signal_detection_rules';
1314

14-
import { goToManageSignalDetectionRules } from '../tasks/detections';
15+
import {
16+
goToManageSignalDetectionRules,
17+
waitForSignalsPanelToBeLoaded,
18+
waitForSignalsIndexToBeCreated,
19+
} from '../tasks/detections';
1520
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver';
1621
import { loginAndWaitForPageWithoutDateRange } from '../tasks/login';
1722
import {
@@ -32,8 +37,10 @@ describe('Signal detection rules', () => {
3237
esArchiverUnload('prebuilt_rules_loaded');
3338
});
3439

35-
it.skip('Sorts by activated rules', () => {
40+
it('Sorts by activated rules', () => {
3641
loginAndWaitForPageWithoutDateRange(DETECTIONS);
42+
waitForSignalsPanelToBeLoaded();
43+
waitForSignalsIndexToBeCreated();
3744
goToManageSignalDetectionRules();
3845
waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded();
3946
cy.get(RULE_NAME)
@@ -52,10 +59,24 @@ describe('Signal detection rules', () => {
5259

5360
cy.get(RULE_NAME)
5461
.eq(FIRST_RULE)
55-
.should('have.text', fifthRuleName);
56-
cy.get(RULE_NAME)
62+
.invoke('text')
63+
.then(firstRuleName => {
64+
cy.get(RULE_NAME)
65+
.eq(SECOND_RULE)
66+
.invoke('text')
67+
.then(secondRuleName => {
68+
const expectedRulesNames = `${firstRuleName} ${secondRuleName}`;
69+
cy.wrap(expectedRulesNames).should('include', fifthRuleName);
70+
cy.wrap(expectedRulesNames).should('include', seventhRuleName);
71+
});
72+
});
73+
74+
cy.get(RULE_SWITCH)
75+
.eq(FIRST_RULE)
76+
.should('have.attr', 'role', 'switch');
77+
cy.get(RULE_SWITCH)
5778
.eq(SECOND_RULE)
58-
.should('have.text', seventhRuleName);
79+
.should('have.attr', 'role', 'switch');
5980
});
6081
});
6182
});

x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/enrollment_instructions/shell/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const ShellEnrollmentInstructions: React.FunctionComponent<Props> = ({
4343
// apiKey.api_key
4444
// } sh -c "$(curl ${kibanaUrl}/api/ingest_manager/fleet/install/${currentPlatform})"`;
4545

46-
const quickInstallInstructions = `./agent enroll ${kibanaUrl} ${apiKey.api_key}`;
46+
const quickInstallInstructions = `./elastic-agent enroll ${kibanaUrl} ${apiKey.api_key}`;
4747

4848
return (
4949
<>

x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/header.tsx

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import React, { memo } from 'react';
77
import styled from 'styled-components';
88
import { EuiFlexGroup, EuiFlexItem, EuiTabs, EuiTab, EuiSpacer } from '@elastic/eui';
99
import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab';
10+
import { EuiFlexItemProps } from '@elastic/eui/src/components/flex/flex_item';
1011

1112
const Container = styled.div`
1213
border-bottom: ${props => props.theme.eui.euiBorderThin};
1314
background-color: ${props => props.theme.eui.euiPageBackgroundColor};
1415
`;
1516

16-
const Wrapper = styled.div`
17-
max-width: 1200px;
17+
const Wrapper = styled.div<{ maxWidth?: number }>`
18+
max-width: ${props => props.maxWidth || 1200}px;
1819
margin-left: auto;
1920
margin-right: auto;
2021
padding-top: ${props => props.theme.eui.paddingSizes.xl};
@@ -30,22 +31,36 @@ const Tabs = styled(EuiTabs)`
3031
`;
3132

3233
export interface HeaderProps {
34+
restrictHeaderWidth?: number;
3335
leftColumn?: JSX.Element;
3436
rightColumn?: JSX.Element;
37+
rightColumnGrow?: EuiFlexItemProps['grow'];
3538
tabs?: EuiTabProps[];
3639
}
3740

38-
const HeaderColumns: React.FC<Omit<HeaderProps, 'tabs'>> = memo(({ leftColumn, rightColumn }) => (
39-
<EuiFlexGroup alignItems="center">
40-
{leftColumn ? <EuiFlexItem>{leftColumn}</EuiFlexItem> : null}
41-
{rightColumn ? <EuiFlexItem>{rightColumn}</EuiFlexItem> : null}
42-
</EuiFlexGroup>
43-
));
41+
const HeaderColumns: React.FC<Omit<HeaderProps, 'tabs'>> = memo(
42+
({ leftColumn, rightColumn, rightColumnGrow }) => (
43+
<EuiFlexGroup alignItems="center">
44+
{leftColumn ? <EuiFlexItem>{leftColumn}</EuiFlexItem> : null}
45+
{rightColumn ? <EuiFlexItem grow={rightColumnGrow}>{rightColumn}</EuiFlexItem> : null}
46+
</EuiFlexGroup>
47+
)
48+
);
4449

45-
export const Header: React.FC<HeaderProps> = ({ leftColumn, rightColumn, tabs }) => (
50+
export const Header: React.FC<HeaderProps> = ({
51+
leftColumn,
52+
rightColumn,
53+
rightColumnGrow,
54+
tabs,
55+
restrictHeaderWidth,
56+
}) => (
4657
<Container>
47-
<Wrapper>
48-
<HeaderColumns leftColumn={leftColumn} rightColumn={rightColumn} />
58+
<Wrapper maxWidth={restrictHeaderWidth}>
59+
<HeaderColumns
60+
leftColumn={leftColumn}
61+
rightColumn={rightColumn}
62+
rightColumnGrow={rightColumnGrow}
63+
/>
4964
<EuiFlexGroup>
5065
{tabs ? (
5166
<EuiFlexItem>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
import React from 'react';
8+
import { EuiCallOut, EuiOverlayMask, EuiConfirmModal, EuiSpacer } from '@elastic/eui';
9+
import { FormattedMessage } from '@kbn/i18n/react';
10+
import { i18n } from '@kbn/i18n';
11+
import { AgentConfig } from '../../../../types';
12+
13+
export const ConfirmCreateDatasourceModal: React.FunctionComponent<{
14+
onConfirm: () => void;
15+
onCancel: () => void;
16+
agentCount: number;
17+
agentConfig: AgentConfig;
18+
}> = ({ onConfirm, onCancel, agentCount, agentConfig }) => {
19+
return (
20+
<EuiOverlayMask>
21+
<EuiConfirmModal
22+
title={
23+
<FormattedMessage
24+
id="xpack.ingestManager.createDatasource.confirmModalTitle"
25+
defaultMessage="Save and deploy changes"
26+
/>
27+
}
28+
onCancel={onCancel}
29+
onConfirm={onConfirm}
30+
cancelButtonText={
31+
<FormattedMessage
32+
id="xpack.ingestManager.deleteApiKeys.confirmModal.cancelButtonLabel"
33+
defaultMessage="Cancel"
34+
/>
35+
}
36+
confirmButtonText={
37+
<FormattedMessage
38+
id="xpack.ingestManager.createDatasource.confirmModalConfirmButtonLabel"
39+
defaultMessage="Save and deploy changes"
40+
/>
41+
}
42+
buttonColor="primary"
43+
>
44+
<EuiCallOut
45+
iconType="iInCircle"
46+
title={i18n.translate('xpack.ingestManager.createDatasource.confirmModalCalloutTitle', {
47+
defaultMessage:
48+
'This action will update {agentCount, plural, one {# agent} other {# agents}}',
49+
values: {
50+
agentCount,
51+
},
52+
})}
53+
>
54+
<FormattedMessage
55+
id="xpack.ingestManager.createDatasource.confirmModalCalloutDescription"
56+
defaultMessage="Fleet has detected that the selected agent configuration, {configName}, is already in use by
57+
some of your agents. As a result of this action, Fleet will deploy updates to all agents
58+
that use this configuration."
59+
values={{
60+
configName: <b>{agentConfig.name}</b>,
61+
}}
62+
/>
63+
</EuiCallOut>
64+
<EuiSpacer size="l" />
65+
<FormattedMessage
66+
id="xpack.ingestManager.createDatasource.confirmModalDescription"
67+
defaultMessage="This action can not be undone. Are you sure you wish to continue?"
68+
/>
69+
</EuiConfirmModal>
70+
</EuiOverlayMask>
71+
);
72+
};

x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/create_datasource_page/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
*/
66
export { CreateDatasourcePageLayout } from './layout';
77
export { DatasourceInputPanel } from './datasource_input_panel';
8+
export { ConfirmCreateDatasourceModal } from './confirm_modal';
89
export { DatasourceInputVarField } from './datasource_input_var_field';

0 commit comments

Comments
 (0)