mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-09 23:15:46 +01:00
Revert "🐛 rename okStatus to statusCodes"
This reverts commit 41da97feaf.
This commit is contained in:
@@ -27,7 +27,7 @@ export const NetworkTab = ({ form }: NetworkTabProps) => {
|
||||
data={StatusCodes}
|
||||
clearable
|
||||
searchable
|
||||
defaultValue={form.values.network.statusCodes}
|
||||
defaultValue={form.values.network.okStatus}
|
||||
variant="default"
|
||||
{...form.getInputProps('network.statusCodes')}
|
||||
/>
|
||||
|
||||
@@ -95,7 +95,7 @@ export const AvailableElementTypes = ({
|
||||
},
|
||||
network: {
|
||||
enabledStatusChecker: true,
|
||||
statusCodes: [200],
|
||||
okStatus: [200],
|
||||
},
|
||||
behaviour: {
|
||||
isOpeningNewTab: true,
|
||||
|
||||
@@ -19,7 +19,7 @@ export const AppPing = ({ app }: AppPingProps) => {
|
||||
queryKey: [`ping/${app.id}`],
|
||||
queryFn: async () => {
|
||||
const response = await fetch(`/api/modules/ping?url=${encodeURI(app.url)}`);
|
||||
const isOk = app.network.statusCodes.includes(response.status);
|
||||
const isOk = app.network.okStatus.includes(response.status);
|
||||
return {
|
||||
status: response.status,
|
||||
state: isOk ? 'online' : 'down',
|
||||
|
||||
@@ -178,7 +178,7 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
},
|
||||
network: {
|
||||
enabledStatusChecker: true,
|
||||
statusCodes: [200],
|
||||
okStatus: [200],
|
||||
},
|
||||
behaviour: {
|
||||
isOpeningNewTab: true,
|
||||
|
||||
@@ -159,7 +159,7 @@ const migrateService = (oldService: serviceItem, areaType: AreaType): ConfigAppT
|
||||
},
|
||||
network: {
|
||||
enabledStatusChecker: oldService.ping ?? true,
|
||||
statusCodes: oldService.status?.map((str) => parseInt(str, 10)) ?? [200],
|
||||
okStatus: oldService.status?.map((str) => parseInt(str, 10)) ?? [200],
|
||||
},
|
||||
appearance: {
|
||||
iconUrl: migrateIcon(oldService.icon),
|
||||
|
||||
@@ -22,7 +22,7 @@ interface AppBehaviourType {
|
||||
|
||||
interface AppNetworkType {
|
||||
enabledStatusChecker: boolean;
|
||||
statusCodes: number[];
|
||||
okStatus: number[];
|
||||
}
|
||||
|
||||
interface AppAppearanceType {
|
||||
|
||||
Reference in New Issue
Block a user