Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed May 2, 2023
1 parent a9744bc commit 510947f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/*
* 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 { render, fireEvent, screen } from '@testing-library/react';
import { MiniCallout, MiniCalloutProps } from './mini_callout';
import type { MiniCalloutProps } from './mini_callout';
import { MiniCallout } from './mini_callout';

describe('MiniCallout', () => {
const defaultProps: MiniCalloutProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import {
EuiTextColor,
useEuiTheme,
} from '@elastic/eui';
import React, { ReactNode, useState } from 'react';
import * as i18n from './translations';
import type { ReactNode } from 'react';
import React, { useState } from 'react';
import type { IconType } from '@elastic/eui/src/components/icon';
import type { Color } from '@elastic/eui/src/components/call_out/call_out';
import { css } from '@emotion/react';
import * as i18n from './translations';

export interface MiniCalloutProps {
color?: Color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/

// import { EuiFilterButton, EuiFilterGroup, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { EuiFilterGroup, EuiFlexGroup, EuiFlexItem, EuiSelectableOption } from '@elastic/eui';
import type { EuiSelectableOption } from '@elastic/eui';
import { EuiFilterGroup, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { isEqual } from 'lodash/fp';
import React, { useCallback } from 'react';
import styled from 'styled-components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
EuiPopoverTitle,
EuiSelectable,
} from '@elastic/eui';
import { css } from '@emotion/react/dist/emotion-react.cjs';
import * as i18n from './translations';
import { caseInsensitiveSort } from '../rules_table/helpers';
import { css } from '@emotion/react/dist/emotion-react.cjs';

const TAGS_POPOVER_WIDTH = 300;

Expand Down Expand Up @@ -61,7 +61,7 @@ const TagsFilterComponent: React.FC<TagsFilterProps> = ({
}, [selectedTags]);

// prepend selectedTags to tags
const [options, setOptions] = useState<Array<EuiSelectableOption>>([
const [options, setOptions] = useState<EuiSelectableOption[]>([
...sortedSelectedTags,
...sortedTags,
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* 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.
*/
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
EuiPopoverTitle,
EuiSelectable,
} from '@elastic/eui';
import * as i18n from './translations';
import { css } from '@emotion/react';
import * as i18n from './translations';

const POPOVER_WIDTH = 275;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,23 @@
* 2.0.
*/

import React, { useCallback } from 'react';
import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiToolTip } from '@elastic/eui';
import React from 'react';
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';

import { APP_UI_ID } from '../../../../../common/constants';
import { SecurityPageName } from '../../../../app/types';
import { HeaderPage } from '../../../../common/components/header_page';
import { ImportDataModal } from '../../../../common/components/import_data_modal';
import { SecuritySolutionLinkButton } from '../../../../common/components/links';
import { getDetectionEngineUrl } from '../../../../common/components/link_to/redirect_to_detection_engine';
import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper';
import { useBoolState } from '../../../../common/hooks/use_bool_state';
import { useKibana } from '../../../../common/lib/kibana';
import { SpyRoute } from '../../../../common/utils/route/spy_routes';

import { MissingPrivilegesCallOut } from '../../../../detections/components/callouts/missing_privileges_callout';
import { NeedAdminForUpdateRulesCallOut } from '../../../../detections/components/callouts/need_admin_for_update_callout';
import { LoadPrePackagedRules } from '../../../../detections/components/rules/pre_packaged_rules/load_prepackaged_rules';
import { LoadPrePackagedRulesButton } from '../../../../detections/components/rules/pre_packaged_rules/load_prepackaged_rules_button';
import { useUserData } from '../../../../detections/components/user_info';
import { useListsConfig } from '../../../../detections/containers/detection_engine/lists/use_lists_config';
import { redirectToDetections } from '../../../../detections/pages/detection_engine/rules/helpers';

import { AllRules } from '../../components/rules_table';
import { RulesTableContextProvider } from '../../components/rules_table/rules_table/rules_table_context';

import * as i18n from './translations';
import { usePrebuiltRulesStatus } from '../../../rule_management/logic/prebuilt_rules/use_prebuilt_rules_status';
import { MiniCallout } from '../../components/mini_callout/mini_callout';

const AddRulesPageComponent: React.FC = () => {
const { navigateToApp } = useKibana().services.application;
Expand Down Expand Up @@ -82,17 +71,17 @@ const AddRulesPageComponent: React.FC = () => {

return (
<>
{/*<NeedAdminForUpdateRulesCallOut />*/}
{/*<MissingPrivilegesCallOut />*/}
{/* <NeedAdminForUpdateRulesCallOut />*/}
{/* <MissingPrivilegesCallOut />*/}

<RulesTableContextProvider>
<SecuritySolutionPageWrapper>
<HeaderPage title={i18n.PAGE_TITLE}>
<EuiFlexGroup alignItems="center" gutterSize="s" responsive={false} wrap={true}>
<EuiFlexItem grow={false}>
{/*<LoadPrePackagedRules>*/}
{/* <LoadPrePackagedRules>*/}
{/* {(renderProps) => <LoadPrePackagedRulesButton {...renderProps} />}*/}
{/*</LoadPrePackagedRules>*/}
{/* </LoadPrePackagedRules>*/}
</EuiFlexItem>
</EuiFlexGroup>
</HeaderPage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import type { Meta, StoryObj } from '@storybook/react';

import { RulesPage } from './index';
import { RulesPage } from '.';
import mdx from './README.mdx';

const meta: Meta<typeof RulesPage> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const RulesPageComponent: React.FC = () => {
title={NEW_PREBUILT_RULES_CALLOUT_TITLE}
/>
)}
{/*<ChatGPTPlugin />*/}
{/* <ChatGPTPlugin />*/}
<MaintenanceWindowCallout />
<AllRules data-test-subj="all-rules" />
</SecuritySolutionPageWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@

import { EuiBadge, EuiButton, EuiButtonEmpty } from '@elastic/eui';
import React from 'react';
import { css } from '@emotion/react';
import { usePrePackagedRulesInstallationStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_installation_status';
import { usePrePackagedRulesStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_rules_status';
import { usePrePackagedTimelinesInstallationStatus } from '../../../../detection_engine/rule_management/logic/use_pre_packaged_timelines_installation_status';
import { INSTALL_PREBUILT_RULES_ANCHOR } from '../../../../detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour';
import type {
PrePackagedRuleInstallationStatus,
PrePackagedTimelineInstallationStatus,
} from '../../../pages/detection_engine/rules/helpers';
import * as i18n from './translations';
import {
SecuritySolutionLinkButton,
useGetSecuritySolutionLinkProps,
} from '../../../../common/components/links';
import { hasUserCRUDPermission } from '../../../../common/utils/privileges';
import { useGetSecuritySolutionLinkProps } from '../../../../common/components/links';
import { SecurityPageName } from '../../../../../common/constants';
import { css } from '@emotion/react';
import { usePrebuiltRulesStatus } from '../../../../detection_engine/rule_management/logic/prebuilt_rules/use_prebuilt_rules_status';

const getLoadRulesOrTimelinesButtonTitle = (
Expand Down

0 comments on commit 510947f

Please sign in to comment.