From 77f1e17fc6c892f06de1d0190b8c6aeba0e6b4a1 Mon Sep 17 00:00:00 2001
From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Date: Tue, 19 May 2020 11:24:53 -0400
Subject: [PATCH] [SIEMDPOINT] Move endpoint to siem (#66907)
* adds the stuff
* keeps moving stuff
* finishes moving the stuff
* moves tests
* fix type
* try moving it all at once. BROKEN
* move endpoint to siem
* fix package coming from endpoint
* missing scripts + change url
* fix eslint
* temporary disable functional testing for endpoint
* fix api integration types
* allow api integration test + comment functional test
* fix internationalization
* fix internationalization II
* fix jest test
* fix x-pack test
* fix i18n
* fix api integration
* fix circular dependency
* add new dependency to cypress test
Co-authored-by: Davis Plumlee
- {
- dispatch: Dispatch>;
- getState(): Immutable;
-}
-
-/**
- * Like redux's `Middleware` but without the ability to mutate actions or state.
- * Differences:
- * * `getState` returns an `Immutable` version of state
- * * `dispatch` accepts `Immutable` versions of actions
- * * `action`s received will be `Immutable`
- */
-export type ImmutableMiddleware = (
- api: ImmutableMiddlewareAPI
-) => (next: Dispatch>) => (action: Immutable) => unknown;
-
-/**
- * Takes application-standard middleware dependencies
- * and returns a redux middleware.
- * Middleware will be of the `ImmutableMiddleware` variety. Not able to directly
- * change actions or state.
- */
-export type ImmutableMiddlewareFactory = (
- coreStart: CoreStart,
- depsStart: EndpointPluginStartDependencies
-) => ImmutableMiddleware;
-
-/**
- * Simple type for a redux selector.
- */
-type Selector = (state: S) => R;
-
-/**
- * Takes a selector and an `ImmutableMiddleware`. The
- * middleware's version of `getState` will receive
- * the result of the selector instead of the global state.
- *
- * This allows middleware to have knowledge of only a subsection of state.
- *
- * `selector` returns an `Immutable` version of the substate.
- * `middleware` must be an `ImmutableMiddleware`.
- *
- * Returns a regular middleware, meant to be used with `applyMiddleware`.
- */
-export type SubstateMiddlewareFactory = (
- reducers: ImmutableReducersMapObject
-) => ImmutableReducer;
-
-/**
- * Like `redux`'s `ReducersMapObject` (which is used by `combineReducers`) but enforces that
- * the `state` and `action` received are `Immutable` versions.
- */
-type ImmutableReducersMapObject = {
- [K in keyof S]: ImmutableReducer;
-};
diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/details/overview/index.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/details/overview/index.tsx
deleted file mode 100644
index 0ec5a855c8615..0000000000000
--- a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/details/overview/index.tsx
+++ /dev/null
@@ -1,123 +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;
- * you may not use this file except in compliance with the Elastic License.
- */
-import React, { memo, useMemo } from 'react';
-import styled from 'styled-components';
-import { i18n } from '@kbn/i18n';
-import { FormattedMessage } from '@kbn/i18n/react';
-import {
- EuiSpacer,
- EuiTitle,
- EuiText,
- EuiHealth,
- EuiTabbedContent,
- EuiTabbedContentTab,
-} from '@elastic/eui';
-import { useAlertListSelector } from '../../hooks/use_alerts_selector';
-import * as selectors from '../../../../store/alerts/selectors';
-import { MetadataPanel } from './metadata_panel';
-import { FormattedDate } from '../../formatted_date';
-import { AlertDetailResolver } from '../../resolver';
-import { ResolverEvent } from '../../../../../../../common/types';
-import { TakeActionDropdown } from './take_action_dropdown';
-
-export const AlertDetailsOverview = styled(
- memo(() => {
- const alertDetailsData = useAlertListSelector(selectors.selectedAlertDetailsData);
- if (alertDetailsData === undefined) {
- return null;
- }
-
- const tabs: EuiTabbedContentTab[] = useMemo(() => {
- return [
- {
- id: 'overviewMetadata',
- 'data-test-subj': 'overviewMetadata',
- name: i18n.translate(
- 'xpack.endpoint.application.endpoint.alertDetails.overview.tabs.overview',
- {
- defaultMessage: 'Overview',
- }
- ),
- content: (
- <>
-
-
-
-
- )}
- />
-
+