Skip to content

Commit

Permalink
Add newlines between import groups
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Mar 2, 2021
1 parent f9be98d commit 2831f02
Show file tree
Hide file tree
Showing 298 changed files with 445 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ module.exports = {
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent'],
'newlines-between': 'always-and-inside-groups',
},
],
},
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { AgentPolicy } from '../types';

import { defaultPackages } from './epm';
export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies';
export const AGENT_POLICY_INDEX = '.fleet-policies';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { safeDump } from 'js-yaml';

import { FullAgentPolicy } from '../types';

const POLICY_KEYS_ORDER = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { Agent } from '../types/models/agent';

import { isAgentUpgradeable } from './is_agent_upgradeable';

const getAgent = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import semverCoerce from 'semver/functions/coerce';
import semverLt from 'semver/functions/lt';

import { Agent } from '../types';

export function isAgentUpgradeable(agent: Agent, kibanaVersion: string) {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/services/license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { Observable, Subscription } from 'rxjs';

import { ILicense } from '../../../licensing/common/types';

// Generic license service class that works with the license observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { PackagePolicy, PackagePolicyInput } from '../types';

import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs';

describe('Fleet - storedPackagePoliciesToAgentInputs', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { PackageInfo } from '../types';

import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy';

describe('Fleet - packageToPackagePolicy', () => {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/types/models/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { AGENT_TYPE_EPHEMERAL, AGENT_TYPE_PERMANENT, AGENT_TYPE_TEMPORARY } from '../../constants';

import { FullAgentPolicy } from './agent_policy';

export type AgentType =
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/types/models/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { agentPolicyStatuses } from '../../constants';
import { DataType, ValueOf } from '../../types';

import { PackagePolicy, PackagePolicyPackage } from './package_policy';
import { Output } from './output';

Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// Follow pattern from https://github.com/elastic/kibana/pull/52447
// TODO: Update when https://github.com/elastic/kibana/issues/53021 is closed
import { SavedObject, SavedObjectAttributes, SavedObjectReference } from 'src/core/public';

import {
ASSETS_SAVED_OBJECT_TYPE,
agentAssetTypes,
Expand All @@ -17,6 +18,7 @@ import {
requiredPackages,
} from '../../constants';
import { ValueOf } from '../../types';

import { PackageSpecManifest, PackageSpecScreenshot } from './package_spec';

export type InstallationStatus = typeof installationStatuses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import { AgentPolicy, NewAgentPolicy, FullAgentPolicy } from '../models';

import { ListWithKuery } from './common';

export interface GetAgentPoliciesRequest {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/public/applications/fleet/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import styled from 'styled-components';
import useObservable from 'react-use/lib/useObservable';

import { FleetConfigType, FleetStartServices } from '../../plugin';
import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public';
import { EuiThemeProvider } from '../../../../../../src/plugins/kibana_react/common';

import {
ConfigContext,
FleetStatusProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React, { useState } from 'react';
import styled from 'styled-components';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiText, EuiLink } from '@elastic/eui';

import { AlphaFlyout } from './alpha_flyout';

const Message = styled(EuiText).attrs((props) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React from 'react';
import styled from 'styled-components';
import { EuiText, EuiSpacer, EuiLink, EuiTitle, EuiCodeBlock } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';

import { EnrollmentAPIKey } from '../../../types';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { memo, ReactNode, Suspense } from 'react';
import { EuiErrorBoundary } from '@elastic/eui';

import { Loading } from './loading';

export const ExtensionWrapper = memo<{ children: ReactNode }>(({ children }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import React, { memo, useState, useEffect } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiButtonEmpty } from '@elastic/eui';
import type { TutorialDirectoryHeaderLinkComponent } from 'src/plugins/home/public';

import { RedirectAppLinks } from '../../../../../../../../src/plugins/kibana_react/public';
import { useLink, useCapabilities, useStartServices } from '../../hooks';

import { tutorialDirectoryNoticeState$ } from './tutorial_directory_notice';

const TutorialDirectoryHeaderLink: TutorialDirectoryHeaderLinkComponent = memo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
import type { TutorialDirectoryNoticeComponent } from 'src/plugins/home/public';

import { RedirectAppLinks } from '../../../../../../../../src/plugins/kibana_react/public';
import {
sendPutSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React, { memo } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiText, EuiLink, EuiSpacer } from '@elastic/eui';
import { TutorialModuleNoticeComponent } from 'src/plugins/home/public';

import { useGetPackages, useLink, useCapabilities } from '../../hooks';
import { pkgKeyFromPackageInfo } from '../../services/pkg_key_from_package_info';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { memo } from 'react';
import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui';

import { useLink } from '../hooks';
import { AGENT_SAVED_OBJECT_TYPE } from '../constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { EuiIcon, EuiIconProps } from '@elastic/eui';

import { usePackageIconType, UsePackageIconType } from '../hooks';

export const PackageIcon: React.FunctionComponent<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React, { useState, useEffect, useMemo } from 'react';

import {
QueryStringInput,
IFieldType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiText } from '@elastic/eui';
import { safeLoad } from 'js-yaml';

import {
useComboInput,
useStartServices,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import { i18n } from '@kbn/i18n';
import { ChromeBreadcrumb } from 'src/core/public';

import { BASE_PATH, Page, DynamicPagePathValues, pagePathGetters } from '../constants';

import { useStartServices } from './use_core';

const BASE_BREADCRUMB: ChromeBreadcrumb = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React, { useContext } from 'react';

import { FleetConfigType } from '../../../plugin';

export const ConfigContext = React.createContext<FleetConfigType | null>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*/

import React, { useState, useContext, useEffect } from 'react';

import { GetFleetStatusResponse } from '../types';

import { useConfig } from './use_config';
import { sendGetFleetStatus } from './use_request';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { memo, useContext, useMemo } from 'react';
import { AppMountParameters } from 'kibana/public';
import { useLocation } from 'react-router-dom';

import { AnyIntraAppRouteState } from '../types';

interface IntraAppState<S extends AnyIntraAppRouteState = AnyIntraAppRouteState> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
DynamicPagePathValues,
pagePathGetters,
} from '../constants';

import { useStartServices } from './';

const getPath = (page: StaticPage | DynamicPage, values: DynamicPagePathValues = {}): string => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

import { useEffect, useState } from 'react';
import { ICON_TYPES } from '@elastic/eui';

import { PackageInfo, PackageListItem } from '../types';
import { useLinks } from '../sections/epm/hooks';

import { sendGetPackageInfoByKey } from './index';

type Package = PackageInfo | PackageListItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
DeleteAgentPolicyRequest,
DeleteAgentPolicyResponse,
} from '../../types';

import {
useRequest,
sendRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
PostNewAgentActionRequest,
PostNewAgentActionResponse,
} from '../../types';

import { useRequest, UseRequestConfig, sendRequest } from './use_request';

type RequestOptions = Pick<Partial<UseRequestConfig>, 'pollIntervalMs'>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { appRoutesService } from '../../services';
import { CheckPermissionsResponse } from '../../types';

import { sendRequest } from './use_request';

export const sendGetPermissionsCheck = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { dataStreamRouteService } from '../../services';
import { GetDataStreamsResponse } from '../../types';

import { useRequest } from './use_request';

export const useGetDataStreams = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
GetEnrollmentAPIKeysResponse,
GetEnrollmentAPIKeysRequest,
} from '../../types';

import {
useRequest,
UseRequestConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
DeletePackageResponse,
} from '../../types';
import { GetStatsResponse } from '../../../../../common';

import { useRequest, sendRequest } from './use_request';

export const useGetCategories = (query: GetCategoriesRequest['query'] = {}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { outputRoutesService } from '../../services';
import { PutOutputRequest, GetOutputsResponse } from '../../types';

import { sendRequest, useRequest } from './use_request';

export function useGetOutputs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
GetPackagePoliciesResponse,
GetOnePackagePolicyResponse,
} from '../../../../../common/types/rest_spec';

import { sendRequest, useRequest } from './use_request';

export const sendCreatePackagePolicy = (body: CreatePackagePolicyRequest['body']) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { settingsRoutesService } from '../../services';
import { PutSettingsResponse, PutSettingsRequest, GetSettingsResponse } from '../../types';

import { sendRequest, useRequest } from './use_request';

export function useGetSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { setupRouteService, fleetSetupRouteService } from '../../services';
import { GetFleetStatusResponse } from '../../types';

import { sendRequest } from './use_request';

export const sendSetup = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { useState, useEffect } from 'react';
import { HttpSetup } from 'src/core/public';

import {
SendRequestConfig,
SendRequestResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React, { useContext } from 'react';

import { UIExtensionPoint, UIExtensionsStorage } from '../types';

export const UIExtensionsContext = React.createContext<UIExtensionsStorage>({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { useCallback, useEffect, useMemo } from 'react';
import { useHistory, useLocation } from 'react-router-dom';

import { useUrlParams } from './use_url_params';
import { PAGE_SIZE_OPTIONS, Pagination, usePagination } from './use_pagination';

Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/public/applications/fleet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Redirect, Route, RouteProps } from 'react-router-dom';
import { CoreStart, AppMountParameters } from 'src/core/public';

import { FleetConfigType, FleetStartServices } from '../../plugin';

import { licenseService } from './hooks';
import { UIExtensionsStorage } from './types';
import { AppRoutes, FleetAppContext, WithPermissionsAndSetup } from './app';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React from 'react';
import styled from 'styled-components';
import { EuiTabs, EuiTab, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';

import { Section } from '../sections';
import { AlphaMessaging, SettingFlyout } from '../components';
import { useLink, useConfig } from '../hooks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import React, { Fragment } from 'react';
import { EuiPageBody, EuiSpacer } from '@elastic/eui';

import { Header, HeaderProps } from '../components';

import { Page, ContentWrapper } from './without_header';

export interface WithHeaderLayoutProps extends HeaderProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import { createMemoryHistory, History, createHashHistory } from 'history';
import React, { memo } from 'react';
import { render as reactRender, RenderOptions, RenderResult, act } from '@testing-library/react';

import { ScopedHistory } from '../../../../../../../src/core/public';
import { FleetAppContext } from '../app';
import { FleetConfigType } from '../../../plugin';
import { UIExtensionsStorage } from '../types';

import { createConfigurationMock } from './plugin_configuration';
import { createStartMock } from './plugin_interfaces';
import { createStartServices } from './fleet_start_services';
Expand Down
Loading

0 comments on commit 2831f02

Please sign in to comment.