Skip to content

Commit

Permalink
Restore import sort order from #52234 (#52548)
Browse files Browse the repository at this point in the history
Many of the changes from #52234 were lost. Presumably due to PR(s) merging which were based on branches which had the previous unsorted order.
  • Loading branch information
John Schulz authored Dec 9, 2019
1 parent f6239e7 commit 71ab5a0
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 31 deletions.
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 { EuiButtonEmpty } from '@elastic/eui';
import styled from 'styled-components';
import React from 'react';
import styled from 'styled-components';
import { useCore } from '../hooks';

export function NavButtonBack({ href, text }: { href: string; text: string }) {
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
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,15 +4,15 @@
* 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 { useLinks } from '.';
import { toMountPoint } from '../../../../../../src/plugins/kibana_react/public';
import { PackageInfo } from '../../common/types';
import { installPackage as fetchInstallPackage, removePackage } from '../data';
import { InstallStatus } from '../types';
import { useLinks } from '.';

interface PackagesInstall {
[key: string]: PackageInstallItem;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/public/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

import React from 'react';
import { Route } from 'react-router-dom';
import { Detail, DetailProps } from './screens/detail';
import { PLUGIN } from '../common/constants';
import { AddDataSource, AddDataSourceProps } from './screens/add_data_source';
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,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, { useState, Fragment, useCallback } from 'react';
import styled from 'styled-components';
import { EuiPanel, EuiSteps, EuiButton, EuiHorizontalRule } from '@elastic/eui';
import { EuiButton, EuiHorizontalRule, EuiPanel, EuiSteps } from '@elastic/eui';
import React, { Fragment, useCallback, useState } from 'react';
import { Redirect } from 'react-router-dom';
import { StepOneTemplate } from './step_one';
import styled from 'styled-components';
import { installDatasource } from '../../data';
import { useCore, useLinks } from '../../hooks';
import { StepOneTemplate } from './step_one';

const StyledSteps = styled.div`
.euiStep__titleWrapper {
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, { useState, useEffect } from 'react';
import { ICON_TYPES, EuiPageHeader, EuiTitle, EuiFlexGroup, EuiIcon, EuiPanel } from '@elastic/eui';
import { EuiFlexGroup, EuiIcon, EuiPageHeader, EuiPanel, EuiTitle, ICON_TYPES } from '@elastic/eui';
import React, { useEffect, useState } from 'react';
import styled from 'styled-components';
import { NavButtonBack } from '../../components/nav_button_back';
import { useLinks } from '../../hooks';
import { PackageInfo } from '../../../common/types';
import { NavButtonBack } from '../../components/nav_button_back';
import { getPackageInfoByKey } from '../../data';
import { useLinks } from '../../hooks';
import { AddDataSourceSteps } from './add_data_source_steps';

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

import React, { Fragment } from 'react';
import {
EuiForm,
EuiDescribedFormGroup,
EuiFormRow,
EuiFieldText,
EuiForm,
EuiFormRow,
EuiHorizontalRule,
EuiSwitch,
EuiSpacer,
EuiSwitch,
} from '@elastic/eui';
import React, { Fragment } from 'react';

export const StepOneTemplate = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/public/screens/detail/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import styled from 'styled-components';
import { PLUGIN } from '../../../common/constants';
import { PackageInfo } from '../../../common/types';
import { IconPanel } from '../../components/icon_panel';
import { NavButtonBack } from '../../components/nav_button_back';
import { Version } from '../../components/version';
import { useBreadcrumbs, useLinks } from '../../hooks';
import { InstallationButton } from './installation_button';
import { CenterColumn, LeftColumn, RightColumn } from './layout';
import { NavButtonBack } from '../../components/nav_button_back';

const FullWidthNavRow = styled(EuiPage)`
/* no left padding so link is against column left edge */
Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/server/datasources/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { SavedObjectsClientContract } from 'src/core/server/';
import { Asset, Datasource, InputType } from '../../../ingest/server/libs/types';
import { SAVED_OBJECT_TYPE_DATASOURCES } from '../../common/constants';
import { AssetReference, InstallationStatus, RegistryPackage } from '../../common/types';
import { CallESAsCurrentUser } from '../lib/cluster_access';
import { installILMPolicy, policyExists } from '../lib/elasticsearch/ilm/install';
import { installPipelines } from '../lib/elasticsearch/ingest_pipeline/ingest_pipelines';
import { installTemplates } from '../lib/elasticsearch/template/install';
import { AssetReference, InstallationStatus, RegistryPackage } from '../../common/types';
import { getPackageInfo } from '../packages';
import * as Registry from '../registry';
import { installILMPolicy, policyExists } from '../lib/elasticsearch/ilm/install';

const pkgToPkgKey = ({ name, version }: RegistryPackage) => `${name}-${version}`;
export class PackageNotInstalledError extends Error {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/server/datasources/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

import Boom from 'boom';
import { createDatasource, PackageNotInstalledError } from './index';
import { getClusterAccessor } from '../lib/cluster_access';
import { PluginContext } from '../plugin';
import { getClient } from '../saved_objects';
import { Request, ResponseToolkit } from '../types';
import { createDatasource, PackageNotInstalledError } from './index';

// TODO: duplicated from packages/handlers.ts. unduplicate.
interface Extra extends ResponseToolkit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { readFileSync } from 'fs';
import path from 'path';
import { safeLoad } from 'js-yaml';
import path from 'path';
import { Field, processFields } from '../../fields/field';
import { generateMappings, getTemplate } from './template';

Expand Down
4 changes: 2 additions & 2 deletions x-pack/legacy/plugins/epm/server/lib/fields/field.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/

import { readFileSync } from 'fs';
import path from 'path';
import glob from 'glob';
import { safeLoad } from 'js-yaml';
import path from 'path';
import { Field, processFields } from './field';
import glob from 'glob';

// Add our own serialiser to just do JSON.stringify
expect.addSnapshotSerializer({
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/server/packages/assets.ts
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 { RegistryPackage } from '../../common/types';
import * as Registry from '../registry';
import { cacheHas } from '../registry/cache';
import { RegistryPackage } from '../../common/types';

// paths from RegistryPackage are routes to the assets on EPR
// paths for ArchiveEntry are routes to the assets in the archive
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/server/packages/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import { SavedObject, SavedObjectsClientContract } from 'src/core/server/';
import { SAVED_OBJECT_TYPE_PACKAGES } from '../../common/constants';
import { AssetReference, InstallationAttributes, KibanaAssetType } from '../../common/types';
import { installIndexPattern } from '../lib/kibana/index_pattern/install';
import * as Registry from '../registry';
import { getObject } from './get_objects';
import { getInstallationObject } from './index';
import { installIndexPattern } from '../lib/kibana/index_pattern/install';

export async function installPackage(options: {
savedObjectsClient: SavedObjectsClientContract;
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/epm/server/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
CategoryId,
CategorySummaryList,
KibanaAssetType,
RegistrySearchResults,
RegistryPackage,
RegistrySearchResults,
} from '../../common/types';
import { epmConfigStore } from '../config';
import { cacheGet, cacheSet } from './cache';
Expand Down

0 comments on commit 71ab5a0

Please sign in to comment.