Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing linter hints automatically #21105

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import * as React from 'react';

import { SystemIndexRanges } from '@graylog/server-api';

import { ButtonGroup, DropdownButton, MenuItem } from 'components/bootstrap';

const _onRecalculateAllIndexRange = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
3 changes: 2 additions & 1 deletion graylog2-web-interface/src/hooks/usePipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>}}) => StreamOutputs.add(streamId, outputs);
Expand Down
3 changes: 2 additions & 1 deletion graylog2-web-interface/src/pages/CreateExtractorsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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));
Expand Down
1 change: 1 addition & 0 deletions graylog2-web-interface/src/pages/ShowMetricsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion graylog2-web-interface/src/views/hooks/useMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Loading