Skip to content

Commit f682175

Browse files
author
Dr. Lint-a-lot
committed
Running lint --fix & prettier
1 parent cbcc671 commit f682175

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

graylog2-web-interface/src/components/common/URLAllowListFormModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ type Props = {
4040

4141
const URLAllowListFormModal = ({ newUrlEntry = '', urlType = undefined, onUpdate = () => {} }: Props) => {
4242
const prevNewUrlEntry = useRef<string>();
43-
const [config, setConfig] = useState<AllowListConfig>({ entries: [], disabled: false, enforce_for_notifications: false });
43+
const [config, setConfig] = useState<AllowListConfig>({
44+
entries: [],
45+
disabled: false,
46+
enforce_for_notifications: false,
47+
});
4448
const [isValid, setIsValid] = useState<boolean>(false);
4549
const [newUrlEntryId, setNewUrlEntryId] = useState<string | undefined>();
4650
const [showConfigModal, setShowConfigModal] = useState<boolean>(false);

graylog2-web-interface/src/components/configurations/UrlAllowListConfig.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ const UrlAllowListConfig = () => {
145145
submitButtonDisabled={!isValid}
146146
submitButtonText="Update configuration">
147147
<h3>Allowlist URLs</h3>
148-
<UrlAllowListForm urls={entries} disabled={disabled} enforceForNotifications={enforceForNotifications} onUpdate={update} />
148+
<UrlAllowListForm
149+
urls={entries}
150+
disabled={disabled}
151+
enforceForNotifications={enforceForNotifications}
152+
onUpdate={update}
153+
/>
149154
</BootstrapModalForm>
150155
)}
151156
</div>

graylog2-web-interface/src/components/configurations/UrlAllowListForm.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ type Props = {
8080
newEntryId?: string;
8181
};
8282

83-
const UrlAllowListForm = ({ urls = [], onUpdate = () => {}, disabled = false, enforceForNotifications = false, newEntryId = undefined }: Props) => {
83+
const UrlAllowListForm = ({
84+
urls = [],
85+
onUpdate = () => {},
86+
disabled = false,
87+
enforceForNotifications = false,
88+
newEntryId = undefined,
89+
}: Props) => {
8490
const productName = useProductName();
8591
const literal = 'literal';
8692
const regex = 'regex';
@@ -90,7 +96,11 @@ const UrlAllowListForm = ({ urls = [], onUpdate = () => {}, disabled = false, en
9096
];
9197
// eslint-disable-next-line prefer-const
9298
let inputs = {};
93-
const [config, setConfig] = useState<AllowListConfig>({ entries: urls, disabled, enforce_for_notifications: enforceForNotifications });
99+
const [config, setConfig] = useState<AllowListConfig>({
100+
entries: urls,
101+
disabled,
102+
enforce_for_notifications: enforceForNotifications,
103+
});
94104
const [validationState, setValidationState] = useState({ errors: [] });
95105
const isInitialRender = useRef<boolean>(false);
96106

0 commit comments

Comments
 (0)