1 minute ago
@@ -12377,7 +12377,7 @@ exports[`TrustedAppsGrid renders correctly when new page and page size set (not
data-test-subj="trustedAppCard-subHeader-touchedBy-createdBy-value"
>
someone
@@ -12442,7 +12442,7 @@ exports[`TrustedAppsGrid renders correctly when new page and page size set (not
data-test-subj="trustedAppCard-subHeader-touchedBy-updatedBy-value"
>
someone
@@ -12472,7 +12472,7 @@ exports[`TrustedAppsGrid renders correctly when new page and page size set (not
data-test-subj="trustedAppCard-subHeader-effectScope-value"
>
@@ -12484,7 +12484,7 @@ exports[`TrustedAppsGrid renders correctly when new page and page size set (not
class="euiSpacer euiSpacer--l"
/>
Trusted App 9
diff --git a/x-pack/plugins/security_solution/public/network/pages/details/index.tsx b/x-pack/plugins/security_solution/public/network/pages/details/index.tsx
index ef7dea5164468..f8aa0a5d85730 100644
--- a/x-pack/plugins/security_solution/public/network/pages/details/index.tsx
+++ b/x-pack/plugins/security_solution/public/network/pages/details/index.tsx
@@ -38,7 +38,6 @@ import { inputsSelectors } from '../../../common/store';
import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions';
import { setNetworkDetailsTablesActivePageToZero } from '../../store/actions';
import { SpyRoute } from '../../../common/utils/route/spy_routes';
-import { OverviewEmpty } from '../../../overview/components/overview_empty';
import { NetworkHttpQueryTable } from './network_http_query_table';
import { NetworkTopCountriesQueryTable } from './network_top_countries_query_table';
import { NetworkTopNFlowQueryTable } from './network_top_n_flow_query_table';
@@ -50,6 +49,7 @@ import { networkModel } from '../../store';
import { SecurityPageName } from '../../../app/types';
import { useSourcererDataView } from '../../../common/containers/sourcerer';
import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query';
+import { LandingPageComponent } from '../../../common/components/landing_page';
export { getBreadcrumbs } from './utils';
const NetworkDetailsManage = manageQuery(IpOverview);
@@ -301,9 +301,7 @@ const NetworkDetailsComponent: React.FC = () => {
>
) : (
-
-
-
+
)}
diff --git a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx b/x-pack/plugins/security_solution/public/network/pages/network.test.tsx
index 23cd7f707dfe8..bf300569d6e23 100644
--- a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx
+++ b/x-pack/plugins/security_solution/public/network/pages/network.test.tsx
@@ -25,8 +25,7 @@ import { inputsActions } from '../../common/store/inputs';
import { Network } from './network';
import { NetworkRoutes } from './navigation';
import { mockCasesContract } from '../../../../cases/public/mocks';
-import { APP_UI_ID, SecurityPageName } from '../../../common/constants';
-import { getAppLandingUrl } from '../../common/components/link_to/redirect_to_overview';
+import { LandingPageComponent } from '../../common/components/landing_page';
jest.mock('../../common/containers/sourcerer');
@@ -119,13 +118,13 @@ describe('Network page - rendering', () => {
beforeEach(() => {
jest.clearAllMocks();
});
- test('it renders the Setup Instructions text when no index is available', () => {
+ test('it renders getting started page when no index is available', () => {
mockUseSourcererDataView.mockReturnValue({
selectedPatterns: [],
indicesExist: false,
});
- mount(
+ const wrapper = mount(
@@ -133,13 +132,10 @@ describe('Network page - rendering', () => {
);
- expect(mockNavigateToApp).toHaveBeenCalledWith(APP_UI_ID, {
- deepLinkId: SecurityPageName.landing,
- path: getAppLandingUrl(),
- });
+ expect(wrapper.find(LandingPageComponent).exists()).toBe(true);
});
- test('it DOES NOT render the Setup Instructions text when an index is available', async () => {
+ test('it DOES NOT render getting started page when an index is available', async () => {
mockUseSourcererDataView.mockReturnValue({
selectedPatterns: [],
indicesExist: true,
diff --git a/x-pack/plugins/security_solution/public/network/pages/network.tsx b/x-pack/plugins/security_solution/public/network/pages/network.tsx
index 422d2877a8504..634a96b0e74df 100644
--- a/x-pack/plugins/security_solution/public/network/pages/network.tsx
+++ b/x-pack/plugins/security_solution/public/network/pages/network.tsx
@@ -36,7 +36,6 @@ import { SpyRoute } from '../../common/utils/route/spy_routes';
import { Display } from '../../hosts/pages/display';
import { networkModel } from '../store';
import { navTabsNetwork, NetworkRoutes, NetworkRoutesLoading } from './navigation';
-import { OverviewEmpty } from '../../overview/components/overview_empty';
import * as i18n from './translations';
import { NetworkComponentProps } from './types';
import { NetworkRouteType } from './navigation/types';
@@ -52,6 +51,7 @@ import { useSourcererDataView } from '../../common/containers/sourcerer';
import { useDeepEqualSelector, useShallowEqualSelector } from '../../common/hooks/use_selector';
import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query';
import { filterNetworkExternalAlertData } from '../../common/components/visualization_actions/utils';
+import { LandingPageComponent } from '../../common/components/landing_page';
/**
* Need a 100% height here to account for the graph/analyze tool, which sets no explicit height parameters, but fills the available space.
*/
@@ -234,9 +234,7 @@ const NetworkComponent = React.memo(
) : (
-
-
-
+
)}
diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.test.tsx
deleted file mode 100644
index db157e9fc7135..0000000000000
--- a/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.test.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import React from 'react';
-import { shallow } from 'enzyme';
-import { OverviewEmpty } from '.';
-import { APP_UI_ID, SecurityPageName } from '../../../../common/constants';
-import { getAppLandingUrl } from '../../../common/components/link_to/redirect_to_overview';
-
-const mockNavigateToApp = jest.fn();
-jest.mock('../../../common/lib/kibana', () => {
- const original = jest.requireActual('../../../common/lib/kibana');
-
- return {
- ...original,
- useKibana: () => ({
- services: {
- ...original.useKibana().services,
- application: {
- ...original.useKibana().services.application,
- navigateToApp: mockNavigateToApp,
- },
- },
- }),
- };
-});
-
-describe('Redirect to landing page', () => {
- it('render with correct actions ', () => {
- shallow();
- expect(mockNavigateToApp).toHaveBeenCalledWith(APP_UI_ID, {
- deepLinkId: SecurityPageName.landing,
- path: getAppLandingUrl(),
- });
- });
-});
diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx
deleted file mode 100644
index 91395aa21486f..0000000000000
--- a/x-pack/plugins/security_solution/public/overview/components/overview_empty/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import React from 'react';
-import { useKibana } from '../../../common/lib/kibana';
-import { APP_UI_ID, SecurityPageName } from '../../../../common/constants';
-import { getAppLandingUrl } from '../../../common/components/link_to/redirect_to_overview';
-
-const OverviewEmptyComponent: React.FC = () => {
- const { navigateToApp } = useKibana().services.application;
-
- navigateToApp(APP_UI_ID, {
- deepLinkId: SecurityPageName.landing,
- path: getAppLandingUrl(),
- });
- return null;
-};
-
-OverviewEmptyComponent.displayName = 'OverviewEmptyComponent';
-
-export const OverviewEmpty = React.memo(OverviewEmptyComponent);
diff --git a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx
index e29ea1e923a63..f3dc4d400c9c2 100644
--- a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx
+++ b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx
@@ -11,7 +11,6 @@ import { SiemSearchBar } from '../../common/components/search_bar';
import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper';
// import { useGlobalTime } from '../../common/containers/use_global_time';
-import { OverviewEmpty } from '../components/overview_empty';
import { SpyRoute } from '../../common/utils/route/spy_routes';
import { SecurityPageName } from '../../app/types';
import { useSourcererDataView } from '../../common/containers/sourcerer';
@@ -20,6 +19,7 @@ import { HeaderPage } from '../../common/components/header_page';
import { useShallowEqualSelector } from '../../common/hooks/use_selector';
import { DETECTION_RESPONSE_TITLE, UPDATED, UPDATING } from './translations';
import { inputsSelectors } from '../../common/store/selectors';
+import { LandingPageComponent } from '../../common/components/landing_page';
const DetectionResponseComponent = () => {
const getGlobalQuery = useMemo(() => inputsSelectors.globalQuery(), []);
@@ -90,7 +90,7 @@ const DetectionResponseComponent = () => {
>
) : (
-
+
)}
diff --git a/x-pack/plugins/security_solution/public/overview/pages/landing.tsx b/x-pack/plugins/security_solution/public/overview/pages/landing.tsx
index 0554f1f51c28a..0b9760d2a8db4 100644
--- a/x-pack/plugins/security_solution/public/overview/pages/landing.tsx
+++ b/x-pack/plugins/security_solution/public/overview/pages/landing.tsx
@@ -8,15 +8,12 @@
import React, { memo } from 'react';
import { SpyRoute } from '../../common/utils/route/spy_routes';
import { SecurityPageName } from '../../../common/constants';
-import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper';
-import { LandingCards } from '../components/landing_cards';
+import { LandingPageComponent } from '../../common/components/landing_page';
export const LandingPage = memo(() => {
return (
<>
-
-
-
+
>
);
diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx
index e5be86a1c9f91..cd941e26e20a6 100644
--- a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx
+++ b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx
@@ -27,9 +27,8 @@ import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experime
import { initialUserPrivilegesState } from '../../common/components/user_privileges/user_privileges_context';
import { EndpointPrivileges } from '../../../common/endpoint/types';
import { useHostRiskScore } from '../../risk_score/containers';
-import { APP_UI_ID, SecurityPageName } from '../../../common/constants';
-import { getAppLandingUrl } from '../../common/components/link_to/redirect_to_overview';
import { mockCasesContract } from '../../../../cases/public/mocks';
+import { LandingPageComponent } from '../../common/components/landing_page';
const mockNavigateToApp = jest.fn();
jest.mock('../../common/lib/kibana', () => {
@@ -303,8 +302,8 @@ describe('Overview', () => {
mockUseMessagesStorage.mockImplementation(() => endpointNoticeMessage(false));
});
- it('renders the Setup Instructions text', () => {
- mount(
+ it('renders getting started page', () => {
+ const wrapper = mount(
@@ -312,10 +311,7 @@ describe('Overview', () => {
);
- expect(mockNavigateToApp).toHaveBeenCalledWith(APP_UI_ID, {
- deepLinkId: SecurityPageName.landing,
- path: getAppLandingUrl(),
- });
+ expect(wrapper.find(LandingPageComponent).exists()).toBe(true);
});
});
});
diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx
index ca95f41e0ea12..3f3d37cd3abae 100644
--- a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx
+++ b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx
@@ -17,7 +17,6 @@ import { useFetchIndex } from '../../common/containers/source';
import { EventsByDataset } from '../components/events_by_dataset';
import { EventCounts } from '../components/event_counts';
-import { OverviewEmpty } from '../components/overview_empty';
import { StatefulSidebar } from '../components/sidebar';
import { SignalsByCategory } from '../components/signals_by_category';
import { inputsSelectors } from '../../common/store';
@@ -34,6 +33,7 @@ import { useUserPrivileges } from '../../common/components/user_privileges';
import { RiskyHostLinks } from '../components/overview_risky_host_links';
import { useAlertsPrivileges } from '../../detections/containers/detection_engine/alerts/use_alerts_privileges';
import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features';
+import { LandingPageComponent } from '../../common/components/landing_page';
const OverviewComponent = () => {
const getGlobalFiltersQuerySelector = useMemo(
@@ -173,7 +173,7 @@ const OverviewComponent = () => {
>
) : (
-
+
)}
diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx
index 1330795841653..242767eac2432 100644
--- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx
@@ -22,12 +22,12 @@ import { useKibana } from '../../../../common/lib/kibana';
import { convertToBuildEsQuery } from '../../../../common/lib/keury';
import { inputsSelectors } from '../../../../common/store';
import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions';
-import { OverviewEmpty } from '../../../../overview/components/overview_empty';
import { getEsQueryConfig } from '../../../../../../../../src/plugins/data/common';
import { useSourcererDataView } from '../../../../common/containers/sourcerer';
import { useNetworkDetails } from '../../../../network/containers/details';
import { networkModel } from '../../../../network/store';
import { useAnomaliesTableData } from '../../../../common/components/ml/anomaly/use_anomalies_table_data';
+import { LandingCards } from '../../../../common/components/landing_cards';
interface ExpandableNetworkProps {
expandedNetwork: { ip: string; flowTarget: FlowTarget };
@@ -141,6 +141,6 @@ export const ExpandableNetworkDetails = ({
narrowDateRange={narrowDateRange}
/>
) : (
-
+
);
};
diff --git a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx
index 6151316cc303d..bf402eb56c291 100644
--- a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx
+++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx
@@ -15,7 +15,6 @@ import { HeaderPage } from '../../common/components/header_page';
import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper';
import { useKibana } from '../../common/lib/kibana';
import { SpyRoute } from '../../common/utils/route/spy_routes';
-import { OverviewEmpty } from '../../overview/components/overview_empty';
import { StatefulOpenTimeline } from '../components/open_timeline';
import { NEW_TEMPLATE_TIMELINE } from '../components/timeline/properties/translations';
import { NewTemplateTimeline } from '../components/timeline/properties/new_template_timeline';
@@ -23,6 +22,7 @@ import { NewTimeline } from '../components/timeline/properties/helpers';
import * as i18n from './translations';
import { SecurityPageName } from '../../app/types';
import { useSourcererDataView } from '../../common/containers/sourcerer';
+import { LandingPageComponent } from '../../common/components/landing_page';
const TimelinesContainer = styled.div`
width: 100%;
@@ -92,9 +92,7 @@ export const TimelinesPageComponent: React.FC = () => {
>
) : (
-
-
-
+
)}
diff --git a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx b/x-pack/plugins/security_solution/public/users/pages/details/index.tsx
index 36ace6a6b4543..3dfe67de92c81 100644
--- a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx
+++ b/x-pack/plugins/security_solution/public/users/pages/details/index.tsx
@@ -26,7 +26,6 @@ import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions
import { SpyRoute } from '../../../common/utils/route/spy_routes';
import { getEsQueryConfig } from '../../../../../../../src/plugins/data/common';
-import { OverviewEmpty } from '../../../overview/components/overview_empty';
import { UsersDetailsTabs } from './details_tabs';
import { navTabsUsersDetails } from './nav_tabs';
import { UsersDetailsProps } from './types';
@@ -52,6 +51,7 @@ import { getCriteriaFromUsersType } from '../../../common/components/ml/criteria
import { UsersType } from '../../store/model';
import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions';
import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities';
+import { LandingPageComponent } from '../../../common/components/landing_page';
const QUERY_ID = 'UsersDetailsQueryId';
const UsersDetailsComponent: React.FC = ({
@@ -194,11 +194,7 @@ const UsersDetailsComponent: React.FC = ({
>
) : (
-
-