mirror of
https://github.com/Graylog2/graylog2-server.git
synced 2026-03-13 09:32:21 +08:00
Running lint --fix & prettier
This commit is contained in:
@@ -47,13 +47,7 @@ describe('PaginatedSelect', () => {
|
||||
// "str.replace is not a function".
|
||||
const onLoadOptions = jest.fn(() => Promise.resolve(mockOptions));
|
||||
|
||||
render(
|
||||
<PaginatedSelect
|
||||
placeholder="Pick one"
|
||||
onLoadOptions={onLoadOptions}
|
||||
onChange={() => {}}
|
||||
/>,
|
||||
);
|
||||
render(<PaginatedSelect placeholder="Pick one" onLoadOptions={onLoadOptions} onChange={() => {}} />);
|
||||
|
||||
// Wait for initial load
|
||||
await act(() => jest.runAllTimersAsync());
|
||||
|
||||
@@ -39,7 +39,7 @@ const MessageProcessorStatusFormGroup = () => {
|
||||
return (
|
||||
<tr key={processor.name}>
|
||||
<td>{processor.name}</td>
|
||||
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
|
||||
{}
|
||||
<td>
|
||||
<input
|
||||
type="checkbox"
|
||||
|
||||
@@ -78,7 +78,7 @@ const ContentPackVersionItem = ({
|
||||
|
||||
return (
|
||||
<tr key={pack.id + pack.rev}>
|
||||
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
|
||||
{}
|
||||
<td>
|
||||
<input type="radio" value={pack.rev} onChange={onChange} checked={selectedVersion === pack.rev} />
|
||||
</td>
|
||||
|
||||
@@ -78,9 +78,7 @@ class SidecarList extends React.Component<
|
||||
/>
|
||||
</th>
|
||||
))}
|
||||
<th className={style.actions}>
|
||||
|
||||
</th>
|
||||
<th className={style.actions}> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{sidecars}</tbody>
|
||||
|
||||
@@ -37,5 +37,7 @@ describe('SelectedGrantee', () => {
|
||||
${alice} | ${owner} | ${'unchanged'}
|
||||
${alice} | ${manager} | ${'changed'}
|
||||
${bob} | ${manager} | ${'new'}
|
||||
`('should return current state of $expectedReturn grantee', ({ grantee, capability, expectedReturn }) => expectCurrentState({ grantee, capability, expectedReturn }));
|
||||
`('should return current state of $expectedReturn grantee', ({ grantee, capability, expectedReturn }) =>
|
||||
expectCurrentState({ grantee, capability, expectedReturn }),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -63,5 +63,7 @@ describe('isDeepEqual', () => {
|
||||
${objectWithMap()} | ${objectWithMap()} | ${true} | ${'objects containing immutable maps'}
|
||||
${arrayOfMaps()} | ${arrayOfMaps()} | ${true} | ${'arrays containing immutable maps'}
|
||||
${mixedMapsAndObjects()} | ${mixedMapsAndObjects()} | ${true} | ${'nested immutable maps and objects'}
|
||||
`('compares $description and returns $result', ({ initial, next, result }) => expectIsDeepEqual({ initial, next, result }));
|
||||
`('compares $description and returns $result', ({ initial, next, result }) =>
|
||||
expectIsDeepEqual({ initial, next, result }),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -91,7 +91,13 @@ const createViewWidget = ({ groupBy, fnSeries, expr }: { groupBy: Array<string>;
|
||||
return getAggregationWidget({ rowPivots, fnSeries: [fnSeriesForFunc], sort });
|
||||
};
|
||||
|
||||
const getSummaryAggregation = ({ aggregations, groupBy }: { aggregations: Array<EventDefinitionAggregation>; groupBy: Array<string> }) => {
|
||||
const getSummaryAggregation = ({
|
||||
aggregations,
|
||||
groupBy,
|
||||
}: {
|
||||
aggregations: Array<EventDefinitionAggregation>;
|
||||
groupBy: Array<string>;
|
||||
}) => {
|
||||
const { summaryFnSeries, summaryTitle } = aggregations.reduce<{ summaryFnSeries: string[]; summaryTitle: string }>(
|
||||
(res, { value, expr, fnSeries }) => {
|
||||
const concatTitle = `${fnSeries} ${expr} ${value}`;
|
||||
@@ -119,7 +125,12 @@ const getSummaryAggregation = ({ aggregations, groupBy }: { aggregations: Array<
|
||||
};
|
||||
};
|
||||
|
||||
export const WidgetsGenerator = async ({ streams, streamCategories, aggregations, groupBy }: {
|
||||
export const WidgetsGenerator = async ({
|
||||
streams,
|
||||
streamCategories,
|
||||
aggregations,
|
||||
groupBy,
|
||||
}: {
|
||||
streams: string | string[] | undefined;
|
||||
streamCategories: string | string[] | undefined;
|
||||
aggregations: Array<EventDefinitionAggregation>;
|
||||
|
||||
Reference in New Issue
Block a user