Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-108215
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Aug 24, 2021
2 parents fb948b9 + e992908 commit 5523f1a
Show file tree
Hide file tree
Showing 67 changed files with 534 additions and 837 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/APM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: APM Issue
description: Issues related to the curated APM UI in Kibana
labels: Team:apm
title: "[APM] "
body:
- type: markdown
attributes:
value: |
Thank you for our interest in Elastic APM. This issue tracker is meant for reporting bugs and problems with APM UI. For questions around how to use or setup APM, please refer to our [Discuss Forum](https://discuss.elastic.co/)
- type: input
attributes:
label: Kibana version
validations:
required: true
- type: input
attributes:
label: APM Server version (if applicable)
validations:
required: false
- type: input
attributes:
label: Elasticsearch version (if applicable)
validations:
required: false
- type: textarea
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Actual Behavior
description: A concise description of what you're experiencing.
validations:
required: false


Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export const VarValueField: FC<Props> = ({ type, value, onChange }) => {
compressed
name="value"
value={value as number}
onChange={(e) => onChange(e.target.value)}
onChange={(e) => onChange(parseFloat(e.target.value))}
/>
);
} else if (type === 'boolean') {
}

if (type === 'boolean') {
return (
<EuiButtonGroup
name="value"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,23 @@
*/

import React from 'react';
import { Switch } from 'react-router-dom';

import { shallow, ShallowWrapper } from 'enzyme';

import { rerender } from '../../../test_helpers';

import { CrawlerLanding } from './crawler_landing';
import { CrawlerOverview } from './crawler_overview';
import { CrawlerRouter } from './crawler_router';
import { CrawlerSingleDomain } from './crawler_single_domain';

describe('CrawlerRouter', () => {
let wrapper: ShallowWrapper;
const OLD_ENV = process.env;

beforeEach(() => {
jest.clearAllMocks();
wrapper = shallow(<CrawlerRouter />);
});

afterEach(() => {
process.env = OLD_ENV;
});

it('renders a landing page by default', () => {
expect(wrapper.find(Switch)).toHaveLength(1);
expect(wrapper.find(CrawlerLanding)).toHaveLength(1);
});

it('renders a crawler overview in dev', () => {
process.env.NODE_ENV = 'development';
rerender(wrapper);

expect(wrapper.find(CrawlerOverview)).toHaveLength(1);
});

it('renders a crawler single domain view', () => {
expect(wrapper.find(CrawlerOverview)).toHaveLength(1);
expect(wrapper.find(CrawlerSingleDomain)).toHaveLength(1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import { Route, Switch } from 'react-router-dom';

import { ENGINE_CRAWLER_DOMAIN_PATH, ENGINE_CRAWLER_PATH } from '../../routes';

import { CrawlerLanding } from './crawler_landing';
import { CrawlerOverview } from './crawler_overview';
import { CrawlerSingleDomain } from './crawler_single_domain';

export const CrawlerRouter: React.FC = () => {
return (
<Switch>
<Route exact path={ENGINE_CRAWLER_PATH}>
{process.env.NODE_ENV === 'development' ? <CrawlerOverview /> : <CrawlerLanding />}
<CrawlerOverview />
</Route>
<Route exact path={ENGINE_CRAWLER_DOMAIN_PATH}>
<CrawlerSingleDomain />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
EuiDataGridColumn,
EuiFlexGroup,
EuiFlexItem,
EuiContextMenu,
EuiContextMenuPanel,
EuiPopover,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -212,26 +212,21 @@ function ObservabilityActions({
onUpdateFailure: onAlertStatusUpdated,
});

const actionsPanels = useMemo(() => {
const actionsMenuItems = useMemo(() => {
return [
{
id: 0,
content: [
timelines.getAddToExistingCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
timelines.getAddToNewCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
...(alertPermissions.crud ? statusActionItems : []),
],
},
timelines.getAddToExistingCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
timelines.getAddToNewCaseButton({
event,
casePermissions,
appId: observabilityFeatureId,
onClose: afterCaseSelection,
}),
...(alertPermissions.crud ? statusActionItems : []),
];
}, [afterCaseSelection, casePermissions, timelines, event, statusActionItems, alertPermissions]);

Expand All @@ -255,26 +250,28 @@ function ObservabilityActions({
aria-label="View alert in app"
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiPopover
button={
<EuiButtonIcon
display="empty"
size="s"
color="text"
iconType="boxesHorizontal"
aria-label="More"
onClick={() => toggleActionsPopover(eventId)}
/>
}
isOpen={openActionsPopoverId === eventId}
closePopover={closeActionsPopover}
panelPaddingSize="none"
anchorPosition="downLeft"
>
<EuiContextMenu panels={actionsPanels} initialPanelId={0} />
</EuiPopover>
</EuiFlexItem>
{actionsMenuItems.length > 0 && (
<EuiFlexItem>
<EuiPopover
button={
<EuiButtonIcon
display="empty"
size="s"
color="text"
iconType="boxesHorizontal"
aria-label="More"
onClick={() => toggleActionsPopover(eventId)}
/>
}
isOpen={openActionsPopoverId === eventId}
closePopover={closeActionsPopover}
panelPaddingSize="none"
anchorPosition="downLeft"
>
<EuiContextMenuPanel size="s" items={actionsMenuItems} />
</EuiPopover>
</EuiFlexItem>
)}
</EuiFlexGroup>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/observability/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const config = {
index: schema.string({ defaultValue: 'observability-annotations' }),
}),
unsafe: schema.object({
alertingExperience: schema.object({ enabled: schema.boolean({ defaultValue: false }) }),
cases: schema.object({ enabled: schema.boolean({ defaultValue: false }) }),
alertingExperience: schema.object({ enabled: schema.boolean({ defaultValue: true }) }),
cases: schema.object({ enabled: schema.boolean({ defaultValue: true }) }),
}),
}),
};
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/rule_registry/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const config = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
write: schema.object({
enabled: schema.boolean({ defaultValue: false }),
enabled: schema.boolean({ defaultValue: true }),
}),
unsafe: schema.object({
legacyMultiTenancy: schema.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe.skip('Marking alerts as acknowledged', () => {
refreshPage();
waitForAlertsToBeLoaded();
goToOpenedAlerts();

waitForAlertsToBeLoaded();
const expectedNumberOfAlerts = +numberOfAlerts - numberOfAlertsToBeMarkedAcknowledged;
cy.get(ALERTS_COUNT).should('have.text', `${expectedNumberOfAlerts} alerts`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ describe('DraggableLegendItem', () => {
wrapper.find(`[data-test-subj="legend-item-${legendItem.dataProviderId}"]`).first().text()
).toEqual(legendItem.value);
});

it('always hides the Top N action for legend items', () => {
expect(
wrapper.find(`[data-test-subj="legend-item-${legendItem.dataProviderId}"]`).prop('hideTopN')
).toEqual(true);
});
});
Loading

0 comments on commit 5523f1a

Please sign in to comment.