Skip to content

Commit 2438e9d

Browse files
author
Dr. Lint-a-lot
committed
Running lint --fix & prettier
1 parent d7c6715 commit 2438e9d

15 files changed

Lines changed: 56 additions & 47 deletions

File tree

graylog2-web-interface/src/components/bootstrap/ListGroup.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ const ListGroup = ({
4242
'data-testid': dataTestId = undefined,
4343
style = undefined,
4444
}: Props) => (
45-
<StyledList as={componentClass} aria-label={ariaLabel} className={`${className ?? ''} ${bsClass ?? ''}`} style={style} data-testid={dataTestId}>
45+
<StyledList
46+
as={componentClass}
47+
aria-label={ariaLabel}
48+
className={`${className ?? ''} ${bsClass ?? ''}`}
49+
style={style}
50+
data-testid={dataTestId}>
4651
{children}
4752
</StyledList>
4853
);

graylog2-web-interface/src/components/bootstrap/ListGroupItem.tsx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,31 @@ type ItemBodyProps = StyledProps & {
135135
onKeyDown?: React.KeyboardEventHandler;
136136
};
137137

138-
const ItemBody = ({ href = undefined, disabled = undefined, onClick = undefined, onKeyDown = undefined, children, ...styledProps }: ItemBodyProps) => {
138+
const ItemBody = ({
139+
href = undefined,
140+
disabled = undefined,
141+
onClick = undefined,
142+
onKeyDown = undefined,
143+
children,
144+
...styledProps
145+
}: ItemBodyProps) => {
139146
if (href) {
140-
return <InnerContainer as="a" href={href} {...styledProps}>{children}</InnerContainer>;
147+
return (
148+
<InnerContainer as="a" href={href} {...styledProps}>
149+
{children}
150+
</InnerContainer>
151+
);
141152
}
142153

143154
if (onClick) {
144155
return (
145-
<InnerContainer as="button" type="button" disabled={disabled} onClick={onClick} onKeyDown={onKeyDown} {...styledProps}>
156+
<InnerContainer
157+
as="button"
158+
type="button"
159+
disabled={disabled}
160+
onClick={onClick}
161+
onKeyDown={onKeyDown}
162+
{...styledProps}>
146163
{children}
147164
</InnerContainer>
148165
);

graylog2-web-interface/src/components/collectors/hooks/useInstancePendingChanges.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ import type { PendingChangesResponse } from '../types';
2727
export const pendingChangesKey = (instanceUid: string) => ['collectors', 'instances', instanceUid, 'pending_changes'];
2828

2929
const fetchPendingChanges = (instanceUid: string): Promise<PendingChangesResponse> =>
30-
Collectors.instancePendingChanges(instanceUid, { requestShouldExtendSession: false }) as Promise<PendingChangesResponse>;
30+
Collectors.instancePendingChanges(instanceUid, {
31+
requestShouldExtendSession: false,
32+
}) as Promise<PendingChangesResponse>;
3133

3234
const useInstancePendingChanges = (
3335
instanceUid: string,

graylog2-web-interface/src/components/collectors/instances/InstanceDetailDrawer.test.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ describe('InstanceDetailDrawer', () => {
166166
const staleInstance = { ...mockInstance, has_pending_changes: false };
167167

168168
render(
169-
<InstanceDetailDrawer instance={staleInstance} sources={mockSources} fleetName="production" onClose={jest.fn()} />,
169+
<InstanceDetailDrawer
170+
instance={staleInstance}
171+
sources={mockSources}
172+
fleetName="production"
173+
onClose={jest.fn()}
174+
/>,
170175
);
171176

172177
await screen.findByText('Synchronization');

graylog2-web-interface/src/components/common/EntityDataTable/hooks/useActionsColumnDefinition.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ import styled, { css } from 'styled-components';
2323
import useResizeObserver from '@react-hook/resize-observer';
2424

2525
import { ButtonToolbar } from 'components/bootstrap';
26-
import { TABLE_ROW_HOVER_TRANSITION, TABLE_ROW_PINNED_HOVER_BG_VAR, flattenTableBackground } from 'components/bootstrap/Table';
26+
import {
27+
TABLE_ROW_HOVER_TRANSITION,
28+
TABLE_ROW_PINNED_HOVER_BG_VAR,
29+
flattenTableBackground,
30+
} from 'components/bootstrap/Table';
2731
import type { EntityBase } from 'components/common/EntityDataTable/types';
2832
import { ACTIONS_COL_ID, CELL_PADDING } from 'components/common/EntityDataTable/Constants';
2933
import { actionsHeaderWidthVar } from 'components/common/EntityDataTable/CSSVariables';
@@ -50,7 +54,10 @@ const Actions = styled.div<{ $isEvenRow: boolean }>(
5054
display: flex;
5155
justify-content: flex-end;
5256
padding: ${CELL_PADDING}px;
53-
background-color: ${flattenTableBackground(theme, $isEvenRow ? theme.colors.table.row.background : theme.colors.table.row.backgroundStriped)};
57+
background-color: ${flattenTableBackground(
58+
theme,
59+
$isEvenRow ? theme.colors.table.row.background : theme.colors.table.row.backgroundStriped,
60+
)};
5461
height: 100%;
5562
align-items: flex-start;
5663
transition: ${TABLE_ROW_HOVER_TRANSITION};

graylog2-web-interface/src/components/event-definitions/event-definition-types/FilterAggregationSummary.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ const getConditionType = (config: EventDefinition['config']) => {
7676
: 'aggregation';
7777
};
7878

79-
const QueryParameters = ({
80-
queryParameters,
81-
}: {
82-
queryParameters: Array<ParameterJson & { embryonic?: boolean }>;
83-
}) => {
79+
const QueryParameters = ({ queryParameters }: { queryParameters: Array<ParameterJson & { embryonic?: boolean }> }) => {
8480
if (queryParameters.some((p) => p.embryonic)) {
8581
const undeclaredParameters = queryParameters
8682
.filter((p) => p.embryonic)

graylog2-web-interface/src/components/event-definitions/event-definition-types/FilterForm.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ const QueryParameters = ({ eventDefinition, onChange, validation, userCanViewLoo
130130
);
131131

132132
if (!userCanViewLookupTables) {
133-
return (
134-
<Alert bsStyle="info">This account lacks permission to declare Query Parameters from Lookup Tables.</Alert>
135-
);
133+
return <Alert bsStyle="info">This account lacks permission to declare Query Parameters from Lookup Tables.</Alert>;
136134
}
137135

138136
const parameterButtons = queryParameters.map((queryParam) => {

graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionActions.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ import { MoreActions } from 'components/common/EntityDataTable';
4141
import usePluggableEntitySharedActions from 'hooks/usePluggableEntitySharedActions';
4242

4343
import type { EventDefinition } from '../event-definitions-types';
44-
import {
45-
isAggregationEventDefinition,
46-
isSystemEventDefinition,
47-
} from '../event-definitions-types';
44+
import { isAggregationEventDefinition, isSystemEventDefinition } from '../event-definitions-types';
4845

4946
type Props = {
5047
eventDefinition: EventDefinition;

graylog2-web-interface/src/components/inputs/InputDiagnosis/InputDiagnosisOverviewTab.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ const InputDiagnosisOverviewTab = ({
305305
{Object.keys(inputNodeStates.states).map((state: InputState) => (
306306
<StateListItem key={state} state={state} inputNodeStates={inputNodeStates} />
307307
))}
308-
{Object.keys(inputNodeStates.states).length === 0 && <StyledListGroupItem>Input is not running.</StyledListGroupItem>}
308+
{Object.keys(inputNodeStates.states).length === 0 && (
309+
<StyledListGroupItem>Input is not running.</StyledListGroupItem>
310+
)}
309311
</StyledListGroup>
310312
</Section>
311313
</StyledSectionGrid>

graylog2-web-interface/src/components/streams/StreamsOverview/Constants.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,7 @@ const getStreamTableElements = (
7070
METRIC_COLUMN_IDS.maxProcessingTime,
7171
];
7272

73-
const defaultColumnOrder = [
74-
...defaultCols,
75-
...routingCols,
76-
...performanceCols,
77-
...ungroupedExtNames,
78-
'created_at',
79-
];
73+
const defaultColumnOrder = [...defaultCols, ...routingCols, ...performanceCols, ...ungroupedExtNames, 'created_at'];
8074

8175
const defaultVariantLayout = {
8276
...SHARED_LAYOUT,

0 commit comments

Comments
 (0)