From 13c34c1420f9f73780a49012f32c53f300d5bd34 Mon Sep 17 00:00:00 2001 From: "Dr. Lint-a-lot" Date: Tue, 3 Dec 2024 16:12:26 +0000 Subject: [PATCH] Running lint --fix --- .../components/content-stream/hook/useContentStreamSettings.ts | 1 + .../src/components/datanode/hooks/useMigrationState.ts | 3 ++- .../src/components/datanode/hooks/useTriggerMigrationState.ts | 1 + .../src/components/extractors/ExportExtractors.tsx | 3 ++- .../src/components/indices/AllIndicesMaintenanceDropdown.tsx | 1 + .../src/components/messageloaders/RawMessageLoader.tsx | 3 ++- .../StreamsOverview/BulkActions/AssignIndexSetModal.tsx | 3 ++- .../streams/StreamsOverview/BulkActions/BulkActions.test.tsx | 3 ++- .../src/components/streams/hooks/useStreamOutputRuleBuilder.ts | 3 ++- graylog2-web-interface/src/hooks/usePipelines.ts | 3 ++- .../src/hooks/usePipelinesConnectedStream.test.ts | 1 + .../src/hooks/usePipelinesConnectedStream.ts | 1 + graylog2-web-interface/src/hooks/useStreamOutputMutations.ts | 1 + graylog2-web-interface/src/pages/CreateExtractorsPage.tsx | 3 ++- graylog2-web-interface/src/pages/ShowMetricsPage.tsx | 1 + .../src/views/components/searchbar/QueryHistoryButton.tsx | 1 + .../searchbar/completions/FieldValueCompletion.test.ts | 1 + .../components/searchbar/completions/FieldValueCompletion.ts | 1 + .../src/views/components/searchbar/useSearchBarSubmit.test.tsx | 3 ++- .../src/views/components/searchbar/useSearchBarSubmit.ts | 1 + graylog2-web-interface/src/views/hooks/useMessage.ts | 3 ++- .../ChangeFieldType/hooks/useFieldTypeUsages.test.ts | 3 ++- .../fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.ts | 3 ++- .../ChangeFieldType/hooks/useFieldTypesForMappings.test.ts | 3 ++- .../ChangeFieldType/hooks/useFieldTypesForMappings.ts | 3 ++- 25 files changed, 39 insertions(+), 14 deletions(-) diff --git a/graylog2-web-interface/src/components/content-stream/hook/useContentStreamSettings.ts b/graylog2-web-interface/src/components/content-stream/hook/useContentStreamSettings.ts index 02d20663900f..dd8ef8881ec4 100644 --- a/graylog2-web-interface/src/components/content-stream/hook/useContentStreamSettings.ts +++ b/graylog2-web-interface/src/components/content-stream/hook/useContentStreamSettings.ts @@ -17,6 +17,7 @@ import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { ContentStream } from '@graylog/server-api'; + import UserNotification from 'preflight/util/UserNotification'; import useCurrentUser from 'hooks/useCurrentUser'; import { CONTENT_STREAM_CONTENT_KEY } from 'components/content-stream/hook/useContentStream'; diff --git a/graylog2-web-interface/src/components/datanode/hooks/useMigrationState.ts b/graylog2-web-interface/src/components/datanode/hooks/useMigrationState.ts index e7018de896fb..35d2f10c62ec 100644 --- a/graylog2-web-interface/src/components/datanode/hooks/useMigrationState.ts +++ b/graylog2-web-interface/src/components/datanode/hooks/useMigrationState.ts @@ -17,8 +17,9 @@ */ import { useQuery } from '@tanstack/react-query'; -import UserNotification from 'util/UserNotification'; import { Migration } from '@graylog/server-api'; + +import UserNotification from 'util/UserNotification'; import type { MigrationState } from 'components/datanode/Types'; import { onError } from 'util/conditional/onError'; diff --git a/graylog2-web-interface/src/components/datanode/hooks/useTriggerMigrationState.ts b/graylog2-web-interface/src/components/datanode/hooks/useTriggerMigrationState.ts index 5fb1167bde18..03bd44c2bc31 100644 --- a/graylog2-web-interface/src/components/datanode/hooks/useTriggerMigrationState.ts +++ b/graylog2-web-interface/src/components/datanode/hooks/useTriggerMigrationState.ts @@ -17,6 +17,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Migration } from '@graylog/server-api'; + import { MIGRATION_STATE_QUERY_KEY } from 'components/datanode/hooks/useMigrationState'; import UserNotification from 'util/UserNotification'; import type { MigrationState, MigrationStepRequest } from 'components/datanode/Types'; diff --git a/graylog2-web-interface/src/components/extractors/ExportExtractors.tsx b/graylog2-web-interface/src/components/extractors/ExportExtractors.tsx index 229cdd8ace3e..18761222416a 100644 --- a/graylog2-web-interface/src/components/extractors/ExportExtractors.tsx +++ b/graylog2-web-interface/src/components/extractors/ExportExtractors.tsx @@ -17,10 +17,11 @@ import React from 'react'; import { useQuery } from '@tanstack/react-query'; +import * as API from '@graylog/server-api'; + import { ClipboardButton, Spinner } from 'components/common'; import { Row, Col, Input } from 'components/bootstrap'; import Version from 'util/Version'; -import * as API from '@graylog/server-api'; const useExtractors = (inputId: string) => useQuery(['extractors', inputId], () => API.Extractors.list(inputId)); diff --git a/graylog2-web-interface/src/components/indices/AllIndicesMaintenanceDropdown.tsx b/graylog2-web-interface/src/components/indices/AllIndicesMaintenanceDropdown.tsx index 29c8d4c989bc..a0ff1975281b 100644 --- a/graylog2-web-interface/src/components/indices/AllIndicesMaintenanceDropdown.tsx +++ b/graylog2-web-interface/src/components/indices/AllIndicesMaintenanceDropdown.tsx @@ -17,6 +17,7 @@ import * as React from 'react'; import { SystemIndexRanges } from '@graylog/server-api'; + import { ButtonGroup, DropdownButton, MenuItem } from 'components/bootstrap'; const _onRecalculateAllIndexRange = () => { diff --git a/graylog2-web-interface/src/components/messageloaders/RawMessageLoader.tsx b/graylog2-web-interface/src/components/messageloaders/RawMessageLoader.tsx index 674b7098bcd4..94406ae3ba40 100644 --- a/graylog2-web-interface/src/components/messageloaders/RawMessageLoader.tsx +++ b/graylog2-web-interface/src/components/messageloaders/RawMessageLoader.tsx @@ -19,6 +19,8 @@ import React, { useEffect, useState } from 'react'; import * as Immutable from 'immutable'; import type { Subtract } from 'utility-types'; +import { Messages } from '@graylog/server-api'; + import { getValueFromInput } from 'util/FormsUtils'; import { Select, FormSubmit } from 'components/common'; import { Col, Row, Input } from 'components/bootstrap'; @@ -31,7 +33,6 @@ import AppConfig from 'util/AppConfig'; import { CodecTypesStore, CodecTypesActions } from 'stores/codecs/CodecTypesStore'; import { InputsActions, InputsStore } from 'stores/inputs/InputsStore'; import useHistory from 'routing/useHistory'; -import { Messages } from '@graylog/server-api'; import MessageFormatter from 'logic/message/MessageFormatter'; import UserNotification from 'util/UserNotification'; diff --git a/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/AssignIndexSetModal.tsx b/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/AssignIndexSetModal.tsx index 497f429ce872..f48a33c182a6 100644 --- a/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/AssignIndexSetModal.tsx +++ b/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/AssignIndexSetModal.tsx @@ -18,11 +18,12 @@ import * as React from 'react'; import { Formik, Form } from 'formik'; +import { Streams } from '@graylog/server-api'; + import type { IndexSet } from 'stores/indices/IndexSetsStore'; import type FetchError from 'logic/errors/FetchError'; import IndexSetSelect from 'components/streams/IndexSetSelect'; import UserNotification from 'util/UserNotification'; -import { Streams } from '@graylog/server-api'; import { Modal } from 'components/bootstrap'; import ModalSubmit from 'components/common/ModalSubmit'; import useSelectedEntities from 'components/common/EntityDataTable/hooks/useSelectedEntities'; diff --git a/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/BulkActions.test.tsx b/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/BulkActions.test.tsx index 8766de925e05..434ecfdf96bc 100644 --- a/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/BulkActions.test.tsx +++ b/graylog2-web-interface/src/components/streams/StreamsOverview/BulkActions/BulkActions.test.tsx @@ -19,8 +19,9 @@ import { act, render, screen, within, waitFor } from 'wrappedTestingLibrary'; import userEvent from '@testing-library/user-event'; import selectEvent from 'react-select-event'; -import fetch from 'logic/rest/FetchProvider'; import { Streams } from '@graylog/server-api'; + +import fetch from 'logic/rest/FetchProvider'; import UserNotification from 'util/UserNotification'; import BulkActions from 'components/streams/StreamsOverview/BulkActions'; import { indexSets } from 'fixtures/indexSets'; diff --git a/graylog2-web-interface/src/components/streams/hooks/useStreamOutputRuleBuilder.ts b/graylog2-web-interface/src/components/streams/hooks/useStreamOutputRuleBuilder.ts index 241e4f45e9e1..faa9509e4448 100644 --- a/graylog2-web-interface/src/components/streams/hooks/useStreamOutputRuleBuilder.ts +++ b/graylog2-web-interface/src/components/streams/hooks/useStreamOutputRuleBuilder.ts @@ -16,8 +16,9 @@ */ import { useQuery } from '@tanstack/react-query'; -import type { BlockDict, RuleBuilderRule } from 'components/rules/rule-builder/types'; import { StreamDestinationsFiltersBuilder } from '@graylog/server-api'; + +import type { BlockDict, RuleBuilderRule } from 'components/rules/rule-builder/types'; import type { StreamOutputFilterRule } from 'components/streams/StreamDetails/output-filter/Types'; import { defaultOnError } from 'util/conditional/onError'; diff --git a/graylog2-web-interface/src/hooks/usePipelines.ts b/graylog2-web-interface/src/hooks/usePipelines.ts index b197b8588ced..c599e3750f73 100644 --- a/graylog2-web-interface/src/hooks/usePipelines.ts +++ b/graylog2-web-interface/src/hooks/usePipelines.ts @@ -16,8 +16,9 @@ */ import { useQuery } from '@tanstack/react-query'; -import { type PipelineType } from 'stores/pipelines/PipelinesStore'; import { PipelinesPipelines } from '@graylog/server-api'; + +import { type PipelineType } from 'stores/pipelines/PipelinesStore'; import type FetchError from 'logic/errors/FetchError'; import { defaultOnError } from 'util/conditional/onError'; diff --git a/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.test.ts b/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.test.ts index cfcdb7883a1d..5bd1129e0b5a 100644 --- a/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.test.ts +++ b/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.test.ts @@ -18,6 +18,7 @@ import { renderHook } from 'wrappedTestingLibrary/hooks'; import { waitFor } from 'wrappedTestingLibrary'; import { Streams } from '@graylog/server-api'; + import asMock from 'helpers/mocking/AsMock'; import usePipelinesConnectedStream from './usePipelinesConnectedStream'; diff --git a/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.ts b/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.ts index f8e281768ae2..67c5c690f460 100644 --- a/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.ts +++ b/graylog2-web-interface/src/hooks/usePipelinesConnectedStream.ts @@ -18,6 +18,7 @@ import { useQuery } from '@tanstack/react-query'; import { create, windowScheduler, indexedResolver } from '@yornaath/batshit'; import { Streams } from '@graylog/server-api'; + import type FetchError from 'logic/errors/FetchError'; import type { PipelineType } from 'stores/pipelines/PipelinesStore'; diff --git a/graylog2-web-interface/src/hooks/useStreamOutputMutations.ts b/graylog2-web-interface/src/hooks/useStreamOutputMutations.ts index 10399c02588a..374de5e99efd 100644 --- a/graylog2-web-interface/src/hooks/useStreamOutputMutations.ts +++ b/graylog2-web-interface/src/hooks/useStreamOutputMutations.ts @@ -18,6 +18,7 @@ import { useMutation } from '@tanstack/react-query'; import { StreamOutputs } from '@graylog/server-api'; + import UserNotification from 'util/UserNotification'; const addStreamOutput = async ({ streamId, outputs }: { streamId: string, outputs: { outputs: Array}}) => StreamOutputs.add(streamId, outputs); diff --git a/graylog2-web-interface/src/pages/CreateExtractorsPage.tsx b/graylog2-web-interface/src/pages/CreateExtractorsPage.tsx index ffe7dd1a722a..c92e4f6919b0 100644 --- a/graylog2-web-interface/src/pages/CreateExtractorsPage.tsx +++ b/graylog2-web-interface/src/pages/CreateExtractorsPage.tsx @@ -18,6 +18,8 @@ import * as React from 'react'; import { useMemo } from 'react'; import { useQuery as useReactQuery } from '@tanstack/react-query'; +import { SystemInputs } from '@graylog/server-api'; + import { DocumentTitle, PageHeader, Spinner } from 'components/common'; import EditExtractor from 'components/extractors/EditExtractor'; import DocsHelper from 'util/DocsHelper'; @@ -27,7 +29,6 @@ import { ExtractorsStore } from 'stores/extractors/ExtractorsStore'; import useMessage from 'views/hooks/useMessage'; import useParams from 'routing/useParams'; import useHistory from 'routing/useHistory'; -import { SystemInputs } from '@graylog/server-api'; import useQuery from 'routing/useQuery'; const useInput = (inputId: string) => useReactQuery(['inputs', inputId], () => SystemInputs.get(inputId)); diff --git a/graylog2-web-interface/src/pages/ShowMetricsPage.tsx b/graylog2-web-interface/src/pages/ShowMetricsPage.tsx index b8731b982889..256fb0f9715c 100644 --- a/graylog2-web-interface/src/pages/ShowMetricsPage.tsx +++ b/graylog2-web-interface/src/pages/ShowMetricsPage.tsx @@ -18,6 +18,7 @@ import * as React from 'react'; import { useQuery } from '@tanstack/react-query'; import { ClusterNodeMetrics } from '@graylog/server-api'; + import { DocumentTitle, PageHeader, Spinner } from 'components/common'; import { MetricsComponent } from 'components/metrics'; import type { Metric } from 'stores/metrics/MetricsStore'; diff --git a/graylog2-web-interface/src/views/components/searchbar/QueryHistoryButton.tsx b/graylog2-web-interface/src/views/components/searchbar/QueryHistoryButton.tsx index 03cb284699b7..1ec4b3aec085 100644 --- a/graylog2-web-interface/src/views/components/searchbar/QueryHistoryButton.tsx +++ b/graylog2-web-interface/src/views/components/searchbar/QueryHistoryButton.tsx @@ -18,6 +18,7 @@ import * as React from 'react'; import styled from 'styled-components'; import { SearchSuggestions } from '@graylog/server-api'; + import IconButton from 'components/common/IconButton'; import type { Editor } from 'views/components/searchbar/queryinput/ace-types'; import { startAutocomplete } from 'views/components/searchbar/queryinput/commands'; diff --git a/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.test.ts b/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.test.ts index 0e103c8e55fe..d5672ec8556d 100644 --- a/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.test.ts +++ b/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.test.ts @@ -15,6 +15,7 @@ * . */ import { SearchSuggestions } from '@graylog/server-api'; + import asMock from 'helpers/mocking/AsMock'; import FieldTypeMapping from 'views/logic/fieldtypes/FieldTypeMapping'; import FieldType, { Properties } from 'views/logic/fieldtypes/FieldType'; diff --git a/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.ts b/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.ts index 0c25a3ed3ff5..a257d0e0af63 100644 --- a/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.ts +++ b/graylog2-web-interface/src/views/components/searchbar/completions/FieldValueCompletion.ts @@ -17,6 +17,7 @@ import isEqual from 'lodash/isEqual'; import { SearchSuggestions } from '@graylog/server-api'; + import type { TimeRange, NoTimeRangeOverride } from 'views/logic/queries/Query'; import type FieldTypeMapping from 'views/logic/fieldtypes/FieldTypeMapping'; import { normalizeFromSearchBarForBackend } from 'views/logic/queries/NormalizeTimeRange'; diff --git a/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.test.tsx b/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.test.tsx index 183822f3619d..fd1ab5fedc37 100644 --- a/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.test.tsx +++ b/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.test.tsx @@ -18,8 +18,9 @@ import * as React from 'react'; import { act, render, screen, waitFor } from 'wrappedTestingLibrary'; import userEvent from '@testing-library/user-event'; -import type { SearchBarFormValues } from 'views/Constants'; import { SearchQueryStrings } from '@graylog/server-api'; + +import type { SearchBarFormValues } from 'views/Constants'; import asMock from 'helpers/mocking/AsMock'; import suppressConsole from 'helpers/suppressConsole'; diff --git a/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.ts b/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.ts index eb799e945a09..dabe55f2f901 100644 --- a/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.ts +++ b/graylog2-web-interface/src/views/components/searchbar/useSearchBarSubmit.ts @@ -17,6 +17,7 @@ import { useCallback, useState } from 'react'; import { SearchQueryStrings } from '@graylog/server-api'; + import type { SearchBarFormValues } from 'views/Constants'; import useUserDateTime from 'hooks/useUserDateTime'; import { isNoTimeRangeOverride } from 'views/typeGuards/timeRange'; diff --git a/graylog2-web-interface/src/views/hooks/useMessage.ts b/graylog2-web-interface/src/views/hooks/useMessage.ts index 18ca0511069e..a18b20fb8900 100644 --- a/graylog2-web-interface/src/views/hooks/useMessage.ts +++ b/graylog2-web-interface/src/views/hooks/useMessage.ts @@ -16,8 +16,9 @@ */ import { useQuery } from '@tanstack/react-query'; -import type { Message } from 'views/components/messagelist/Types'; import { Messages } from '@graylog/server-api'; + +import type { Message } from 'views/components/messagelist/Types'; import MessageFormatter from 'logic/message/MessageFormatter'; import { defaultOnError } from 'util/conditional/onError'; diff --git a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.test.ts b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.test.ts index 42b58e739d51..a3656614cf58 100644 --- a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.test.ts +++ b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.test.ts @@ -17,11 +17,12 @@ import { renderHook } from 'wrappedTestingLibrary/hooks'; +import { SystemIndexSetsTypes } from '@graylog/server-api'; + import asMock from 'helpers/mocking/AsMock'; import UserNotification from 'util/UserNotification'; import suppressConsole from 'helpers/suppressConsole'; import useFieldTypeUsages from 'views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages'; -import { SystemIndexSetsTypes } from '@graylog/server-api'; const mockFieldTypeUsages = { attributes: [], diff --git a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.ts b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.ts index 10949f703e47..e4c657911720 100644 --- a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.ts +++ b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypeUsages.ts @@ -16,9 +16,10 @@ */ import { useQuery } from '@tanstack/react-query'; +import { SystemIndexSetsTypes } from '@graylog/server-api'; + import type { Attribute } from 'stores/PaginationTypes'; import type { FieldTypeUsage } from 'views/logic/fieldactions/ChangeFieldType/types'; -import { SystemIndexSetsTypes } from '@graylog/server-api'; import { defaultOnError } from 'util/conditional/onError'; const INITIAL_DATA = { diff --git a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.test.ts b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.test.ts index 1f07e08c5973..c5bfab65eb46 100644 --- a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.test.ts +++ b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.test.ts @@ -17,11 +17,12 @@ import { renderHook } from 'wrappedTestingLibrary/hooks'; +import { SystemFieldTypes } from '@graylog/server-api'; + import asMock from 'helpers/mocking/AsMock'; import UserNotification from 'util/UserNotification'; import suppressConsole from 'helpers/suppressConsole'; import useFieldTypesForMappings from 'views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings'; -import { SystemFieldTypes } from '@graylog/server-api'; const mockFieldType = { string: 'String', diff --git a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.ts b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.ts index 30f42c9e2497..0d8ced920d82 100644 --- a/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.ts +++ b/graylog2-web-interface/src/views/logic/fieldactions/ChangeFieldType/hooks/useFieldTypesForMappings.ts @@ -16,8 +16,9 @@ */ import { useQuery } from '@tanstack/react-query'; -import type { FieldTypes } from 'views/logic/fieldactions/ChangeFieldType/types'; import { SystemFieldTypes } from '@graylog/server-api'; + +import type { FieldTypes } from 'views/logic/fieldactions/ChangeFieldType/types'; import { defaultOnError } from 'util/conditional/onError'; const INITIAL_DATA = {