mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
🚨 Lint and prettier fix
This commit is contained in:
@@ -20,11 +20,7 @@ export default function AppShelfMenu(props: any) {
|
|||||||
onClose={() => setOpened(false)}
|
onClose={() => setOpened(false)}
|
||||||
title="Modify a service"
|
title="Modify a service"
|
||||||
>
|
>
|
||||||
<AddAppShelfItemForm
|
<AddAppShelfItemForm setOpened={setOpened} {...service} message="Save service" />
|
||||||
setOpened={setOpened}
|
|
||||||
{...service}
|
|
||||||
message="Save service"
|
|
||||||
/>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
<Menu
|
<Menu
|
||||||
position="right"
|
position="right"
|
||||||
|
|||||||
@@ -71,9 +71,11 @@ export default function CalendarComponent(props: any) {
|
|||||||
const currentSonarrMedias: any[] = [];
|
const currentSonarrMedias: any[] = [];
|
||||||
Promise.all(
|
Promise.all(
|
||||||
sonarrServices.map((service) =>
|
sonarrServices.map((service) =>
|
||||||
getMedias(service, 'sonarr').then((res) => {
|
getMedias(service, 'sonarr')
|
||||||
|
.then((res) => {
|
||||||
currentSonarrMedias.push(...res.data);
|
currentSonarrMedias.push(...res.data);
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
currentSonarrMedias.push([]);
|
currentSonarrMedias.push([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -83,9 +85,11 @@ export default function CalendarComponent(props: any) {
|
|||||||
const currentRadarrMedias: any[] = [];
|
const currentRadarrMedias: any[] = [];
|
||||||
Promise.all(
|
Promise.all(
|
||||||
radarrServices.map((service) =>
|
radarrServices.map((service) =>
|
||||||
getMedias(service, 'radarr').then((res) => {
|
getMedias(service, 'radarr')
|
||||||
|
.then((res) => {
|
||||||
currentRadarrMedias.push(...res.data);
|
currentRadarrMedias.push(...res.data);
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
currentRadarrMedias.push([]);
|
currentRadarrMedias.push([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -95,9 +99,11 @@ export default function CalendarComponent(props: any) {
|
|||||||
const currentLidarrMedias: any[] = [];
|
const currentLidarrMedias: any[] = [];
|
||||||
Promise.all(
|
Promise.all(
|
||||||
lidarrServices.map((service) =>
|
lidarrServices.map((service) =>
|
||||||
getMedias(service, 'lidarr').then((res) => {
|
getMedias(service, 'lidarr')
|
||||||
|
.then((res) => {
|
||||||
currentLidarrMedias.push(...res.data);
|
currentLidarrMedias.push(...res.data);
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
currentLidarrMedias.push([]);
|
currentLidarrMedias.push([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -107,9 +113,11 @@ export default function CalendarComponent(props: any) {
|
|||||||
const currentReadarrMedias: any[] = [];
|
const currentReadarrMedias: any[] = [];
|
||||||
Promise.all(
|
Promise.all(
|
||||||
readarrServices.map((service) =>
|
readarrServices.map((service) =>
|
||||||
getMedias(service, 'readarr').then((res) => {
|
getMedias(service, 'readarr')
|
||||||
|
.then((res) => {
|
||||||
currentReadarrMedias.push(...res.data);
|
currentReadarrMedias.push(...res.data);
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
currentReadarrMedias.push([]);
|
currentReadarrMedias.push([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ export default function PingComponent(props: any) {
|
|||||||
acceptableStatus = status;
|
acceptableStatus = status;
|
||||||
}
|
}
|
||||||
// Checks if reported status is in acceptable status array
|
// Checks if reported status is in acceptable status array
|
||||||
if (acceptableStatus.indexOf((response.status).toString()) >= 0) {
|
if (acceptableStatus.indexOf(response.status.toString()) >= 0) {
|
||||||
setOnline('online');
|
setOnline('online');
|
||||||
setResponse(response.status);
|
setResponse(response.status);
|
||||||
} else {
|
} else {
|
||||||
setOnline('down');
|
setOnline('down');
|
||||||
setResponse(response.status)
|
setResponse(response.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,13 @@ export default function PingComponent(props: any) {
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
radius="lg"
|
radius="lg"
|
||||||
style={{ position: 'absolute', bottom: 20, right: 20 }}
|
style={{ position: 'absolute', bottom: 20, right: 20 }}
|
||||||
label={isOnline === 'loading' ? 'Loading...' : isOnline === 'online' ? `Online - ${response}` : `Offline - ${response}`}
|
label={
|
||||||
|
isOnline === 'loading'
|
||||||
|
? 'Loading...'
|
||||||
|
: isOnline === 'online'
|
||||||
|
? `Online - ${response}`
|
||||||
|
: `Offline - ${response}`
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<motion.div
|
<motion.div
|
||||||
animate={{
|
animate={{
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Get the origin URL
|
// Get the origin URL
|
||||||
var { href: origin } = new URL(service.url);
|
let { href: origin } = new URL(service.url);
|
||||||
if (origin.endsWith("/")) {
|
if (origin.endsWith('/')) {
|
||||||
origin = origin.slice(0, -1)
|
origin = origin.slice(0, -1);
|
||||||
}
|
}
|
||||||
const pined = `${origin}${url?.url}?apiKey=${service.apiKey}&end=${nextMonth}&start=${lastMonth}`;
|
const pined = `${origin}${url?.url}?apiKey=${service.apiKey}&end=${nextMonth}&start=${lastMonth}`;
|
||||||
const data = await axios.get(
|
const data = await axios.get(
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export const StatusCodes = [
|
|||||||
|
|
||||||
export const Targets = [
|
export const Targets = [
|
||||||
{ value: '_blank', label: 'New Tab' },
|
{ value: '_blank', label: 'New Tab' },
|
||||||
{value: '_top', label: 'Same Window'}
|
{ value: '_top', label: 'Same Window' },
|
||||||
]
|
];
|
||||||
|
|
||||||
export const ServiceTypeList = [
|
export const ServiceTypeList = [
|
||||||
'Other',
|
'Other',
|
||||||
|
|||||||
Reference in New Issue
Block a user