mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
Merge pull request #750 from ajnart/fix-ping-status
🐛 Fix StatusCode not being used properly
This commit is contained in:
@@ -10,6 +10,9 @@ interface NetworkTabProps {
|
||||
|
||||
export const NetworkTab = ({ form }: NetworkTabProps) => {
|
||||
const { t } = useTranslation('layout/modals/add-app');
|
||||
const acceptableStatusCodes = (form.values.network.statusCodes ?? ['200']).map((x) =>
|
||||
x.toString()
|
||||
);
|
||||
return (
|
||||
<Tabs.Panel value="network" pt="lg">
|
||||
<Switch
|
||||
@@ -27,7 +30,7 @@ export const NetworkTab = ({ form }: NetworkTabProps) => {
|
||||
data={StatusCodes}
|
||||
clearable
|
||||
searchable
|
||||
defaultValue={form.values.network.okStatus.map((x) => `${x}`)}
|
||||
defaultValue={acceptableStatusCodes}
|
||||
variant="default"
|
||||
{...form.getInputProps('network.statusCodes')}
|
||||
/>
|
||||
|
||||
@@ -95,7 +95,7 @@ export const AvailableElementTypes = ({
|
||||
},
|
||||
network: {
|
||||
enabledStatusChecker: true,
|
||||
okStatus: [200],
|
||||
statusCodes: ['200'],
|
||||
},
|
||||
behaviour: {
|
||||
isOpeningNewTab: true,
|
||||
|
||||
Reference in New Issue
Block a user