Skip to content

Commit 3c11e46

Browse files
committed
chore: run prettier
1 parent 3692dfc commit 3c11e46

File tree

8 files changed

+192
-185
lines changed

8 files changed

+192
-185
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
'@typescript-eslint/no-explicit-any': 'off',
2424
'@typescript-eslint/no-namespace': 'off',
2525
'@typescript-eslint/explicit-module-boundary-types': 'off',
26+
'@typescript-eslint/no-unused-vars': 'off',
2627
'@typescript-eslint/ban-types': 'off',
2728
'@typescript-eslint/no-use-before-define': [
2829
'error',

src/blueprint.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
@import '~@blueprintjs/select/src/blueprint-select';
1010
@import '~@blueprintjs/popover2/lib/css/blueprint-popover2.css';
1111

12-
13-
@font-face{
14-
font-family:'blueprint-icons-16';
15-
src:url('./icons/blueprint/blueprint-icons-16.ttf?0c7462c47bcd60a8d9e9dc959711c752') format('truetype'), url('./icons/blueprint/blueprint-icons-16.eot?0c7462c47bcd60a8d9e9dc959711c752#iefix') format('embedded-opentype'), url('./icons/blueprint/blueprint-icons-16.woff2?0c7462c47bcd60a8d9e9dc959711c752') format('woff2'), url('./icons/blueprint/blueprint-icons-16.woff?0c7462c47bcd60a8d9e9dc959711c752') format('woff');
12+
@font-face {
13+
font-family: 'blueprint-icons-16';
14+
src:
15+
url('./icons/blueprint/blueprint-icons-16.ttf?0c7462c47bcd60a8d9e9dc959711c752')
16+
format('truetype'),
17+
url('./icons/blueprint/blueprint-icons-16.eot?0c7462c47bcd60a8d9e9dc959711c752#iefix')
18+
format('embedded-opentype'),
19+
url('./icons/blueprint/blueprint-icons-16.woff2?0c7462c47bcd60a8d9e9dc959711c752')
20+
format('woff2'),
21+
url('./icons/blueprint/blueprint-icons-16.woff?0c7462c47bcd60a8d9e9dc959711c752')
22+
format('woff');
1623
}
1724

1825
.bp4-control {

src/components/ArrowsRenderer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface ArrowRendererProps {
1010
arrow: Arrow;
1111
}
1212

13-
export type ArrowRenderer = (_: ArrowRendererProps) => JSX.Element | null;
13+
export type ArrowRenderer = (_: ArrowRendererProps) => React.ReactNode | null;
1414

1515
export interface Props {
1616
strategy: ArrowStrategy;

src/components/EndpointCardHeader/logos.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ export const grafana = 'icons/logos/grafana-logo.svg';
2424
export const loki = 'icons/logos/loki-logo.svg';
2525
export const tempo = 'icons/logos/tempo-logo.svg';
2626
export const mimir = 'icons/logos/mimir-logo.svg';
27-

src/components/FlowsTable/SidebarComponents.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,24 @@ export interface IPItemProps {
159159
onClick?: () => void;
160160
}
161161

162-
export const IPEntry = memo<IPItemProps>(function FlowsTableSidebarIPEntry(
163-
props,
164-
) {
165-
const onClick = useCallback(() => {
166-
props.onClick?.();
167-
}, [props.onClick]);
168-
169-
const className = classnames(css.ip, {
170-
[css.clickable]: !!props.onClick,
171-
[css.selected]: props.isSelected,
172-
});
173-
174-
return (
175-
<span className={className} onClick={onClick}>
176-
{props.ip}
177-
</span>
178-
);
179-
});
162+
export const IPEntry = memo<IPItemProps>(
163+
function FlowsTableSidebarIPEntry(props) {
164+
const onClick = useCallback(() => {
165+
props.onClick?.();
166+
}, [props.onClick]);
167+
168+
const className = classnames(css.ip, {
169+
[css.clickable]: !!props.onClick,
170+
[css.selected]: props.isSelected,
171+
});
172+
173+
return (
174+
<span className={className} onClick={onClick}>
175+
{props.ip}
176+
</span>
177+
);
178+
},
179+
);
180180

181181
export interface DnsItemProps {
182182
dns: string;
@@ -234,21 +234,21 @@ export interface PodItemProps {
234234
onClick?: (_: PodSelector) => void;
235235
}
236236

237-
export const PodEntry = memo<PodItemProps>(function FlowsTableSidebarPodEntry(
238-
props,
239-
) {
240-
const onClick = useCallback(() => {
241-
props.onClick?.(props.podSelector);
242-
}, [props.podSelector, props.onClick]);
243-
244-
const className = classnames(css.podd, {
245-
[css.clickable]: !!props.onClick,
246-
[css.selected]: props.isSelected,
247-
});
248-
249-
return (
250-
<span className={className} onClick={onClick}>
251-
{props.podSelector.pod}
252-
</span>
253-
);
254-
});
237+
export const PodEntry = memo<PodItemProps>(
238+
function FlowsTableSidebarPodEntry(props) {
239+
const onClick = useCallback(() => {
240+
props.onClick?.(props.podSelector);
241+
}, [props.podSelector, props.onClick]);
242+
243+
const className = classnames(css.podd, {
244+
[css.clickable]: !!props.onClick,
245+
[css.selected]: props.isSelected,
246+
});
247+
248+
return (
249+
<span className={className} onClick={onClick}>
250+
{props.podSelector.pod}
251+
</span>
252+
);
253+
},
254+
);

src/components/TopBar/TagDirection.tsx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ export interface TagDirectionProps {
1010
direction: FilterDirection;
1111
}
1212

13-
export const TagDirection = memo<TagDirectionProps>(function TagDirection(
14-
props,
15-
) {
16-
const dir = props.direction;
17-
const className = classnames(css.direction, {
18-
[css.from]: dir === FilterDirection.From,
19-
[css.to]: dir === FilterDirection.To,
20-
[css.both]: dir === FilterDirection.Both,
21-
});
22-
23-
const fromIsShown = [FilterDirection.From, FilterDirection.Both].includes(
24-
dir,
25-
);
26-
const toIsShown = [FilterDirection.To, FilterDirection.Both].includes(dir);
27-
28-
const iconName =
29-
dir === FilterDirection.Both ? 'arrows-horizontal' : 'arrow-right';
30-
31-
return (
32-
<span className={className}>
33-
{fromIsShown && (
34-
<span className={classnames(css.label, css.from)}>from</span>
35-
)}
36-
37-
<span className={css.icon}>
38-
<Icon icon={iconName} iconSize={9} />
13+
export const TagDirection = memo<TagDirectionProps>(
14+
function TagDirection(props) {
15+
const dir = props.direction;
16+
const className = classnames(css.direction, {
17+
[css.from]: dir === FilterDirection.From,
18+
[css.to]: dir === FilterDirection.To,
19+
[css.both]: dir === FilterDirection.Both,
20+
});
21+
22+
const fromIsShown = [FilterDirection.From, FilterDirection.Both].includes(
23+
dir,
24+
);
25+
const toIsShown = [FilterDirection.To, FilterDirection.Both].includes(dir);
26+
27+
const iconName =
28+
dir === FilterDirection.Both ? 'arrows-horizontal' : 'arrow-right';
29+
30+
return (
31+
<span className={className}>
32+
{fromIsShown && (
33+
<span className={classnames(css.label, css.from)}>from</span>
34+
)}
35+
36+
<span className={css.icon}>
37+
<Icon icon={iconName} iconSize={9} />
38+
</span>
39+
40+
{toIsShown && <span className={classnames(css.label, css.to)}>to</span>}
3941
</span>
40-
41-
{toIsShown && <span className={classnames(css.label, css.to)}>to</span>}
42-
</span>
43-
);
44-
});
42+
);
43+
},
44+
);

src/components/TopBar/VerdictFilterDropdown.tsx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -40,41 +40,41 @@ const filters: FilterOption[] = [
4040
},
4141
];
4242

43-
export const VerdictFilterDropdown = memo<Props>(function VerdictFilterDropdown(
44-
props,
45-
) {
46-
const popover = usePopover();
43+
export const VerdictFilterDropdown = memo<Props>(
44+
function VerdictFilterDropdown(props) {
45+
const popover = usePopover();
4746

48-
const getLabel = useCallback(() => {
49-
const found = find(filters, f => f.verdict === props.verdict);
50-
return found ? found.title : '';
51-
}, [props.verdict]);
47+
const getLabel = useCallback(() => {
48+
const found = find(filters, f => f.verdict === props.verdict);
49+
return found ? found.title : '';
50+
}, [props.verdict]);
5251

53-
const content = (
54-
<Menu>
55-
{filters.map(filter => (
56-
<MenuItem
57-
key={String(filter.verdict)}
58-
active={props.verdict == filter.verdict}
59-
text={filter.title}
60-
onClick={() => props.onSelect?.(filter.verdict)}
61-
/>
62-
))}
63-
</Menu>
64-
);
52+
const content = (
53+
<Menu>
54+
{filters.map(filter => (
55+
<MenuItem
56+
key={String(filter.verdict)}
57+
active={props.verdict == filter.verdict}
58+
text={filter.title}
59+
onClick={() => props.onSelect?.(filter.verdict)}
60+
/>
61+
))}
62+
</Menu>
63+
);
6564

66-
return (
67-
<Popover {...popover.props} content={content}>
68-
<FilterIcon
69-
icon={<VerdictIcon />}
70-
text={getLabel()}
71-
onClick={popover.toggle}
72-
className={classnames({
73-
[css.verdictFilterDropped]: props.verdict === Verdict.Dropped,
74-
[css.verdictFilterForwarded]: props.verdict === Verdict.Forwarded,
75-
[css.verdictFilterAudit]: props.verdict === Verdict.Audit,
76-
})}
77-
/>
78-
</Popover>
79-
);
80-
});
65+
return (
66+
<Popover {...popover.props} content={content}>
67+
<FilterIcon
68+
icon={<VerdictIcon />}
69+
text={getLabel()}
70+
onClick={popover.toggle}
71+
className={classnames({
72+
[css.verdictFilterDropped]: props.verdict === Verdict.Dropped,
73+
[css.verdictFilterForwarded]: props.verdict === Verdict.Forwarded,
74+
[css.verdictFilterAudit]: props.verdict === Verdict.Audit,
75+
})}
76+
/>
77+
</Popover>
78+
);
79+
},
80+
);

0 commit comments

Comments
 (0)