Skip to content

Commit

Permalink
Merge branch 'feature-ingest' into datasources-and-template-pr-followup
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin authored Dec 5, 2019
2 parents 09523d2 + dc088b1 commit 736610a
Show file tree
Hide file tree
Showing 56 changed files with 112 additions and 108 deletions.
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { resolve } from 'path';
import JoiNamespace from 'joi';
import { Legacy } from 'kibana';
import { resolve } from 'path';
import { LegacyPluginInitializer, LegacyPluginOptions } from 'src/legacy/types';
import { PLUGIN } from './common/constants';
import manifest from './kibana.json';
import { getConfigSchema } from './server/config';
import { Plugin, createSetupShim } from './server/plugin';
import { createSetupShim, Plugin } from './server/plugin';
import { mappings, savedObjectSchemas } from './server/saved_objects';

const ROOT = `plugins/${PLUGIN.ID}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Fragment } from 'react';
import {
EuiAccordion,
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
EuiIcon,
EuiNotificationBadge,
EuiSpacer,
EuiText,
EuiTitle,
EuiSpacer,
} from '@elastic/eui';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { entries } from '../../common/type_utils';
import { AssetsGroupedByServiceByType } from '../../common/types';
import { entries } from '../../common/type_utils';
import { AssetIcons, AssetTitleMap, ServiceIcons, ServiceTitleMap } from '../constants';
import { useCore } from '../hooks/use_core';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Fragment } from 'react';
import {
EuiFacetButton,
EuiFacetGroup,
Expand All @@ -15,20 +14,21 @@ import {
EuiTextColor,
EuiTitle,
} from '@elastic/eui';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import {
AssetsGroupedByServiceByType,
AssetTypeToParts,
KibanaAssetType,
} from '../../common/types';
import { entries } from '../../common/type_utils';
import {
DisplayedAssets,
AssetIcons,
AssetTitleMap,
DisplayedAssets,
ServiceIcons,
ServiceTitleMap,
} from '../constants';
import {
AssetsGroupedByServiceByType,
AssetTypeToParts,
KibanaAssetType,
} from '../../common/types';
import { useCore } from '../hooks/use_core';

export function AssetsFacetGroup({ assets }: { assets: AssetsGroupedByServiceByType }) {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/components/icon_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiIcon, EuiPanel, IconType } from '@elastic/eui';
import React from 'react';
import styled from 'styled-components';
import { EuiIcon, EuiPanel, IconType } from '@elastic/eui';
import { useCore } from '../hooks/use_core';

export function IconPanel({ iconType }: { iconType: IconType }) {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/public/components/package_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* 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 from 'react';
import { EuiCard, EuiIcon, ICON_TYPES } from '@elastic/eui';
import React from 'react';
import styled from 'styled-components';
import { PackageInfo, PackageListItem } from '../../common/types';
import { useLinks } from '../hooks';
import { PackageListItem, PackageInfo } from '../../common/types';

export interface BadgeProps {
showInstalledBadge?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* 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, { Fragment, ReactNode } from 'react';
import { EuiFlexGrid, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui';
import React, { Fragment, ReactNode } from 'react';
import { PackageList } from '../../common/types';
import { PackageCard, BadgeProps } from './package_card';
import { BadgeProps, PackageCard } from './package_card';

type ListProps = {
controls?: ReactNode;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/public/components/requirements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiTextColor, EuiTitle } from '@elastic/eui';
import React, { Fragment } from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiTextColor, EuiTitle, EuiIcon, EuiText } from '@elastic/eui';
import styled from 'styled-components';
import { entries } from '../../common/type_utils';
import { RequirementsByServiceName } from '../../common/types';
import { entries } from '../../common/type_utils';
import { ServiceTitleMap } from '../constants';
import { useCore } from '../hooks/use_core';
import { Version } from './version';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { IconType } from '@elastic/eui';
import { ElasticsearchAssetType, KibanaAssetType, AssetType, ServiceName } from '../common/types';
import { AssetType, ElasticsearchAssetType, KibanaAssetType, ServiceName } from '../common/types';

// only allow Kibana assets for the kibana key, ES asssets for elasticsearch, etc
type ServiceNameToAssetTypes = Record<Extract<ServiceName, 'kibana'>, KibanaAssetType[]> &
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { HttpHandler } from 'src/core/public';
import {
getCategoriesPath,
getFilePath,
getInfoPath,
getInstallDatasourcePath,
getInstallPath,
getListPath,
getRemovePath,
ListParams,
getFilePath,
} from '../common/routes';
import {
AssetReference,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/public/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export { useCore } from './use_core';
export { useLinks } from './use_links';
export {
PackageInstallProvider,
useDeletePackage,
useGetPackageInstallStatus,
useInstallPackage,
useSetPackageInstallStatus,
useGetPackageInstallStatus,
useDeletePackage,
} from './use_package_install';
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/hooks/use_links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/

import { generatePath } from 'react-router-dom';
import { useCore } from '.';
import { PLUGIN } from '../../common/constants';
import { getFilePath, getInfoPath } from '../../common/routes';
import { patterns } from '../routes';
import { useCore } from '.';
import { DetailViewPanelName } from '..';

// TODO: get this from server/packages/handlers.ts (move elsewhere?)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { useCallback, useState, Fragment } from 'react';
import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import createContainer from 'constate';
import { EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui';
import React, { Fragment, useCallback, useState } from 'react';
import { NotificationsStart } from 'src/core/public';
import { toMountPoint } from '../../../../../../src/plugins/kibana_react/public';
import { PackageInfo } from '../../common/types';
import { installPackage as fetchInstallPackage, installDatasource, removePackage } from '../data';
import { installDatasource, installPackage as fetchInstallPackage, removePackage } from '../data';
import { InstallStatus } from '../types';

interface PackagesInstall {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import euiLight from '@elastic/eui/dist/eui_theme_light.json';
import euiDark from '@elastic/eui/dist/eui_theme_dark.json';
import euiLight from '@elastic/eui/dist/eui_theme_light.json';
import chrome from 'ui/chrome';
import { npSetup, npStart } from 'ui/new_platform';
import { Plugin, PluginInitializerContext } from './plugin';
Expand Down
6 changes: 3 additions & 3 deletions x-pack/legacy/plugins/epm/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiErrorBoundary } from '@elastic/eui';
import euiLight from '@elastic/eui/dist/eui_theme_light.json';
import React from 'react';
import ReactDOM from 'react-dom';
import { HashRouter, Switch } from 'react-router-dom';
import { ThemeProvider } from 'styled-components';
import { EuiErrorBoundary } from '@elastic/eui';
import euiLight from '@elastic/eui/dist/eui_theme_light.json';
import { ChromeStart, CoreSetup, HttpStart, I18nStart, NotificationsStart } from 'src/core/public';
import { ThemeProvider } from 'styled-components';
import { CoreProvider } from './contexts/core';
import { setClient } from './data';
import { PackageInstallProvider } from './hooks/';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import React from 'react';
import { Route } from 'react-router-dom';
import { PLUGIN } from '../common/constants';
import { Detail, DetailProps } from './screens/detail';
import { Home } from './screens/home';
import { PLUGIN } from '../common/constants';

// patterns are used by React Router and are relative to `APP_ROOT`
export const patterns = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiCallOut, EuiConfirmModal, EuiOverlayMask } from '@elastic/eui';
import React from 'react';
import { EuiConfirmModal, EuiOverlayMask, EuiCallOut } from '@elastic/eui';

interface ConfirmPackageDeleteProps {
onCancel: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiCallOut, EuiConfirmModal, EuiOverlayMask, EuiSpacer } from '@elastic/eui';
import React from 'react';
import { EuiConfirmModal, EuiOverlayMask, EuiCallOut, EuiSpacer } from '@elastic/eui';

interface ConfirmPackageInstallProps {
onCancel: () => void;
Expand Down
8 changes: 4 additions & 4 deletions x-pack/legacy/plugins/epm/public/screens/detail/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiSpacer, EuiTitle } from '@elastic/eui';
import React from 'react';
import styled from 'styled-components';
import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiSpacer, EuiTitle } from '@elastic/eui';
import { SideNavLinks } from './side_nav_links';
import { DEFAULT_PANEL, DetailProps } from '.';
import { PackageInfo } from '../../../common/types';
import { AssetAccordion } from '../../components/asset_accordion';
import { AssetsFacetGroup } from '../../components/assets_facet_group';
import { AssetAccordion } from '../../components/asset_accordion';
import { Requirements } from '../../components/requirements';
import { CenterColumn, LeftColumn, RightColumn } from './layout';
import { OverviewPanel } from './overview_panel';
import { DEFAULT_PANEL, DetailProps } from '.';
import { SideNavLinks } from './side_nav_links';

type ContentProps = PackageInfo & Pick<DetailProps, 'panel'> & { hasIconPanel: boolean };
export function Content(props: ContentProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* 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, { useState, useRef, useLayoutEffect, Fragment, useCallback } from 'react';
import { EuiButtonEmpty, EuiSpacer, EuiButton, EuiHorizontalRule } from '@elastic/eui';
import { EuiButton, EuiButtonEmpty, EuiHorizontalRule, EuiSpacer } from '@elastic/eui';
import React, { Fragment, useCallback, useLayoutEffect, useRef, useState } from 'react';
import styled from 'styled-components';

const BottomFade = styled.div`
Expand Down
6 changes: 3 additions & 3 deletions x-pack/legacy/plugins/epm/public/screens/detail/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiFlexGroup, EuiFlexItem, EuiPage, EuiTitle, IconType } from '@elastic/eui';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { EuiFlexGroup, EuiFlexItem, EuiPage, EuiTitle, IconType } from '@elastic/eui';
import { PLUGIN } from '../../../common/constants';
import { PackageInfo } from '../../../common/types';
import { Version } from '../../components/version';
import { IconPanel } from '../../components/icon_panel';
import { Version } from '../../components/version';
import { useBreadcrumbs, useLinks } from '../../hooks';
import { CenterColumn, LeftColumn, RightColumn } from './layout';
import { InstallationButton } from './installation_button';
import { CenterColumn, LeftColumn, RightColumn } from './layout';
import { NavButtonBack } from './nav_button_back';

const FullWidthNavRow = styled(EuiPage)`
Expand Down
8 changes: 4 additions & 4 deletions x-pack/legacy/plugins/epm/public/screens/detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* 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, { Fragment, useState, useEffect } from 'react';
import { EuiPage, EuiPageBody, EuiPageWidthProps, ICON_TYPES } from '@elastic/eui';
import React, { Fragment, useEffect, useState } from 'react';
import styled from 'styled-components';
import { PackageInfo } from '../../../common/types';
import { DetailViewPanelName } from '../../';
import { PackageInfo } from '../../../common/types';
import { getPackageInfoByKey } from '../../data';
import { useCore } from '../../hooks/use_core';
import { useSetPackageInstallStatus } from '../../hooks';
import { useCore } from '../../hooks/use_core';
import { InstallStatus } from '../../types';
import { Header } from './header';
import { Content } from './content';
import { Header } from './header';

export const DEFAULT_PANEL: DetailViewPanelName = 'overview';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* 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, { Fragment, useCallback, useState, useMemo } from 'react';
import { EuiButton } from '@elastic/eui';
import React, { Fragment, useCallback, useMemo, useState } from 'react';
import { PackageInfo } from '../../../common/types';
import { useDeletePackage, useGetPackageInstallStatus, useInstallPackage } from '../../hooks';
import { InstallStatus } from '../../types';
import { ConfirmPackageInstall } from './confirm_package_install';
import { ConfirmPackageDelete } from './confirm_package_delete';
import { useDeletePackage, useInstallPackage, useGetPackageInstallStatus } from '../../hooks';
import { ConfirmPackageInstall } from './confirm_package_install';

interface InstallationButtonProps {
package: PackageInfo;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/screens/detail/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { FunctionComponent, ReactNode } from 'react';
import { EuiFlexItem } from '@elastic/eui';
import React, { FunctionComponent, ReactNode } from 'react';

interface ColumnProps {
children?: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*/

import {
EuiText,
EuiCodeBlock,
EuiLink,
EuiTableHeaderCell,
EuiTableRow,
EuiTableRowCell,
EuiLink,
EuiText,
} from '@elastic/eui';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiButtonEmptyProps, EuiButtonEmpty } from '@elastic/eui';
import styled from 'styled-components';
import { EuiButtonEmpty, EuiButtonEmptyProps } from '@elastic/eui';
import React from 'react';
import { useLinks, useCore } from '../../hooks';
import styled from 'styled-components';
import { useCore, useLinks } from '../../hooks';

export function NavButtonBack() {
const { toListView } = useLinks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* 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, { Fragment } from 'react';
import { EuiSpacer } from '@elastic/eui';
import React, { Fragment } from 'react';
import { PackageInfo } from '../../../common/types';
import { Screenshots } from './screenshots';
import { Readme } from './readme';
import { Screenshots } from './screenshots';

export function OverviewPanel(props: PackageInfo) {
const { screenshots, readme, name, version } = props;
Expand Down
Loading

0 comments on commit 736610a

Please sign in to comment.