🔀 Merge pull request #289 from ajnart/docker-integration

Add Docker integration 🚀
This commit is contained in:
Thomas Camlong
2022-07-20 15:22:40 +02:00
committed by GitHub
15 changed files with 935 additions and 93 deletions

View File

@@ -9,8 +9,6 @@ module.exports = withBundleAnalyzer({
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
outputStandalone: true,
},
output: 'standalone',
basePath: env.BASE_URL,
});

View File

@@ -43,11 +43,12 @@
"@nivo/line": "^0.79.1",
"@tabler/icons": "^1.68.0",
"axios": "^0.27.2",
"cookies-next": "^2.0.4",
"cookies-next": "^2.1.1",
"dayjs": "^1.11.3",
"dockerode": "^3.3.2",
"framer-motion": "^6.3.1",
"js-file-download": "^0.4.12",
"next": "12.1.6",
"next": "^12.2.0",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
@@ -56,9 +57,10 @@
},
"devDependencies": {
"@babel/core": "^7.17.8",
"@next/bundle-analyzer": "^12.1.4",
"@next/eslint-plugin-next": "^12.1.4",
"@next/bundle-analyzer": "^12.2.0",
"@next/eslint-plugin-next": "^12.2.0",
"@storybook/react": "^6.5.4",
"@types/dockerode": "^3.3.9",
"@types/node": "^17.0.23",
"@types/react": "17.0.43",
"@types/uuid": "^8.3.4",

View File

@@ -95,6 +95,8 @@ function MatchPort(name: string, form: any) {
}
}
const DEFAULT_ICON = '/favicon.svg';
export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & any) {
const { setOpened } = props;
const { config, setConfig } = useConfig();
@@ -114,7 +116,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
type: props.type ?? 'Other',
category: props.category ?? undefined,
name: props.name ?? '',
icon: props.icon ?? '/favicon.svg',
icon: props.icon ?? DEFAULT_ICON,
url: props.url ?? '',
apiKey: props.apiKey ?? (undefined as unknown as string),
username: props.username ?? (undefined as unknown as string),
@@ -149,7 +151,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
const [debounced, cancel] = useDebouncedValue(form.values.name, 250);
useEffect(() => {
if (form.values.name !== debounced || props.name || props.type) return;
if (form.values.name !== debounced || form.values.icon !== DEFAULT_ICON) return;
MatchIcon(form.values.name, form);
MatchService(form.values.name, form);
MatchPort(form.values.name, form);
@@ -222,7 +224,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
<TextInput
required
label="Icon URL"
placeholder="/favicon.svg"
placeholder={DEFAULT_ICON}
{...form.getInputProps('icon')}
/>
<TextInput

View File

@@ -0,0 +1,182 @@
import { Button, Group, Modal, Title } from '@mantine/core';
import { useBooleanToggle } from '@mantine/hooks';
import { showNotification, updateNotification } from '@mantine/notifications';
import {
IconCheck,
IconPlayerPlay,
IconPlayerStop,
IconPlus,
IconRefresh,
IconRotateClockwise,
IconTrash,
IconX,
} from '@tabler/icons';
import axios from 'axios';
import Dockerode from 'dockerode';
import { tryMatchService } from '../../tools/addToHomarr';
import { useConfig } from '../../tools/state';
import { AddAppShelfItemForm } from '../AppShelf/AddAppShelfItem';
function sendDockerCommand(action: string, containerId: string, containerName: string) {
showNotification({
id: containerId,
loading: true,
title: `${action}ing container ${containerName.substring(1)}`,
message: undefined,
autoClose: false,
disallowClose: true,
});
axios.get(`/api/docker/container/${containerId}?action=${action}`).then((res) => {
setTimeout(() => {
if (res.data.success === true) {
updateNotification({
id: containerId,
title: `Container ${containerName} ${action}ed`,
message: `Your container was successfully ${action}ed`,
icon: <IconCheck />,
autoClose: 2000,
});
}
if (res.data.success === false) {
updateNotification({
id: containerId,
color: 'red',
title: 'There was an error with your container.',
message: undefined,
icon: <IconX />,
autoClose: 2000,
});
}
}, 500);
});
}
export interface ContainerActionBarProps {
selected: Dockerode.ContainerInfo[];
reload: () => void;
}
export default function ContainerActionBar({ selected, reload }: ContainerActionBarProps) {
const { config, setConfig } = useConfig();
const [opened, setOpened] = useBooleanToggle(false);
return (
<Group>
<Modal
size="xl"
radius="md"
opened={opened}
onClose={() => setOpened(false)}
title="Add service"
>
<AddAppShelfItemForm
setOpened={setOpened}
{...tryMatchService(selected.at(0))}
message="Add service to homarr"
/>
</Modal>
<Button
leftIcon={<IconRotateClockwise />}
onClick={() =>
Promise.all(
selected.map((container) =>
sendDockerCommand('restart', container.Id, container.Names[0].substring(1))
)
).then(() => reload())
}
variant="light"
color="orange"
radius="md"
>
Restart
</Button>
<Button
leftIcon={<IconPlayerStop />}
onClick={() =>
Promise.all(
selected.map((container) => {
if (
container.State === 'stopped' ||
container.State === 'created' ||
container.State === 'exited'
) {
return showNotification({
id: container.Id,
title: `Failed to stop ${container.Names[0].substring(1)}`,
message: "You can't stop a stopped container",
autoClose: 1000,
});
}
return sendDockerCommand('stop', container.Id, container.Names[0].substring(1));
})
).then(() => reload())
}
variant="light"
color="red"
radius="md"
>
Stop
</Button>
<Button
leftIcon={<IconPlayerPlay />}
onClick={() =>
Promise.all(
selected.map((container) =>
sendDockerCommand('start', container.Id, container.Names[0].substring(1))
)
).then(() => reload())
}
variant="light"
color="green"
radius="md"
>
Start
</Button>
<Button leftIcon={<IconRefresh />} onClick={() => reload()} variant="light" radius="md">
Refresh data
</Button>
<Button
leftIcon={<IconPlus />}
color="indigo"
variant="light"
radius="md"
onClick={() => {
if (selected.length !== 1) {
showNotification({
autoClose: 5000,
title: <Title order={4}>Please only add one service at a time!</Title>,
color: 'red',
message: undefined,
});
} else {
setOpened(true);
}
}}
>
Add to Homarr
</Button>
<Button
leftIcon={<IconTrash />}
color="red"
variant="light"
radius="md"
onClick={() =>
Promise.all(
selected.map((container) => {
if (container.State === 'running') {
return showNotification({
id: container.Id,
title: `Failed to delete ${container.Names[0].substring(1)}`,
message: "You can't delete a running container",
autoClose: 1000,
});
}
return sendDockerCommand('remove', container.Id, container.Names[0].substring(1));
})
).then(() => reload())
}
>
Remove
</Button>
</Group>
);
}

View File

@@ -0,0 +1,49 @@
import { Badge, BadgeVariant, MantineSize } from '@mantine/core';
import Dockerode from 'dockerode';
export interface ContainerStateProps {
state: Dockerode.ContainerInfo['State'];
}
export default function ContainerState(props: ContainerStateProps) {
const { state } = props;
const options: {
size: MantineSize;
radius: MantineSize;
variant: BadgeVariant;
} = {
size: 'md',
radius: 'md',
variant: 'outline',
};
switch (state) {
case 'running': {
return (
<Badge color="green" {...options}>
Running
</Badge>
);
}
case 'created': {
return (
<Badge color="cyan" {...options}>
Created
</Badge>
);
}
case 'exited': {
return (
<Badge color="red" {...options}>
Stopped
</Badge>
);
}
default: {
return (
<Badge color="purple" {...options}>
Unknown
</Badge>
);
}
}
}

View File

@@ -0,0 +1,53 @@
import { ActionIcon, Drawer, Group, LoadingOverlay } from '@mantine/core';
import { IconBrandDocker } from '@tabler/icons';
import axios from 'axios';
import { useEffect, useState } from 'react';
import Docker from 'dockerode';
import ContainerActionBar from './ContainerActionBar';
import DockerTable from './DockerTable';
export default function DockerDrawer(props: any) {
const [opened, setOpened] = useState(false);
const [containers, setContainers] = useState<Docker.ContainerInfo[]>([]);
const [selection, setSelection] = useState<Docker.ContainerInfo[]>([]);
const [visible, setVisible] = useState(false);
function reload() {
setVisible(true);
setTimeout(() => {
axios.get('/api/docker/containers').then((res) => {
setContainers(res.data);
setSelection([]);
setVisible(false);
});
}, 300);
}
useEffect(() => {
reload();
}, []);
// Check if the user has at least one container
if (containers.length < 1) return null;
return (
<>
<Drawer opened={opened} onClose={() => setOpened(false)} padding="xl" size="full">
<ContainerActionBar selected={selection} reload={reload} />
<div style={{ position: 'relative' }}>
<LoadingOverlay transitionDuration={500} visible={visible} />
<DockerTable containers={containers} selection={selection} setSelection={setSelection} />
</div>
</Drawer>
<Group position="center">
<ActionIcon
variant="default"
radius="md"
size="xl"
color="blue"
onClick={() => setOpened(true)}
>
<IconBrandDocker />
</ActionIcon>
</Group>
</>
);
}

View File

@@ -0,0 +1,91 @@
import { Menu, Text, useMantineTheme } from '@mantine/core';
import { showNotification, updateNotification } from '@mantine/notifications';
import {
IconCheck,
IconCodePlus,
IconPlayerPlay,
IconPlayerStop,
IconRotateClockwise,
IconX,
} from '@tabler/icons';
import axios from 'axios';
import Dockerode from 'dockerode';
function sendNotification(action: string, containerId: string, containerName: string) {
showNotification({
id: 'load-data',
loading: true,
title: `${action}ing container ${containerName}`,
message: 'Your password is being checked...',
autoClose: false,
disallowClose: true,
});
axios.get(`/api/docker/container/${containerId}?action=${action}`).then((res) => {
setTimeout(() => {
if (res.data.success === true) {
updateNotification({
id: 'load-data',
title: 'Container restarted',
message: 'Your container was successfully restarted',
icon: <IconCheck />,
autoClose: 2000,
});
}
if (res.data.success === false) {
updateNotification({
id: 'load-data',
color: 'red',
title: 'There was an error restarting your container.',
message: 'Your container has encountered issues while restarting.',
icon: <IconX />,
autoClose: 2000,
});
}
}, 500);
});
}
function restart(container: Dockerode.ContainerInfo) {
sendNotification('restart', container.Id, container.Names[0]);
}
function stop(container: Dockerode.ContainerInfo) {
console.log('stoping container', container.Id);
}
function start(container: Dockerode.ContainerInfo) {
console.log('starting container', container.Id);
}
export default function DockerMenu(props: any) {
const { container }: { container: Dockerode.ContainerInfo } = props;
const theme = useMantineTheme();
if (container === undefined) {
return null;
}
return (
<Menu shadow="lg" radius="md">
<Menu.Label>Actions</Menu.Label>
<Menu.Item icon={<IconRotateClockwise color="orange" />} onClick={() => restart(container)}>
<Text>Restart</Text>
</Menu.Item>
{container.State === 'running' ? (
<Menu.Item icon={<IconPlayerStop color="red" />}>
<Text>Stop</Text>
</Menu.Item>
) : (
<Menu.Item icon={<IconPlayerPlay color="green" />}>
<Text>Start</Text>
</Menu.Item>
)}
{/* <Menu.Item icon={<IconDownload color="blue" />}>
<Text>Pull latest image </Text>
</Menu.Item>
<Menu.Item icon={<IconFileText color="grey" />}>
<Text>Logs</Text>
</Menu.Item> */}
<Menu.Label>Homarr</Menu.Label>
<Menu.Item icon={<IconCodePlus color={theme.primaryColor} />}>
<Text>Add to Homarr</Text>
</Menu.Item>
</Menu>
);
}

View File

@@ -0,0 +1,90 @@
import { Table, Checkbox, Group, Badge, createStyles } from '@mantine/core';
import Dockerode from 'dockerode';
import ContainerState from './ContainerState';
const useStyles = createStyles((theme) => ({
rowSelected: {
backgroundColor:
theme.colorScheme === 'dark'
? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2)
: theme.colors[theme.primaryColor][0],
},
}));
export default function DockerTable({
containers,
selection,
setSelection,
}: {
setSelection: any;
containers: Dockerode.ContainerInfo[];
selection: Dockerode.ContainerInfo[];
}) {
const { classes, cx } = useStyles();
const toggleRow = (container: Dockerode.ContainerInfo) =>
setSelection((current: Dockerode.ContainerInfo[]) =>
current.includes(container) ? current.filter((c) => c !== container) : [...current, container]
);
const toggleAll = () =>
setSelection((current: any) =>
current.length === containers.length ? [] : containers.map((c) => c)
);
const rows = containers.map((element) => {
const selected = selection.includes(element);
return (
<tr key={element.Id} className={cx({ [classes.rowSelected]: selected })}>
<td>
<Checkbox
checked={selection.includes(element)}
onChange={() => toggleRow(element)}
transitionDuration={0}
/>
</td>
<td>{element.Names[0].replace('/', '')}</td>
<td>{element.Image}</td>
<td>
<Group>
{element.Ports.sort((a, b) => a.PrivatePort - b.PrivatePort)
.slice(-3)
.map((port) => (
<Badge key={port.PrivatePort} variant="outline">
{port.PrivatePort}:{port.PublicPort}
</Badge>
))}
{element.Ports.length > 3 && (
<Badge variant="filled">{element.Ports.length - 3} more</Badge>
)}
</Group>
</td>
<td>
<ContainerState state={element.State} />
</td>
</tr>
);
});
return (
<Table captionSide="bottom" highlightOnHover sx={{ minWidth: 800 }} verticalSpacing="sm">
<caption>your docker containers</caption>
<thead>
<tr>
<th style={{ width: 40 }}>
<Checkbox
onChange={toggleAll}
checked={selection.length === containers.length}
indeterminate={selection.length > 0 && selection.length !== containers.length}
transitionDuration={0}
/>
</th>
<th>Name</th>
<th>Image</th>
<th>Ports</th>
<th>State</th>
</tr>
</thead>
<tbody>{rows}</tbody>
</Table>
);
}

View File

@@ -12,9 +12,15 @@ import {
} from '@mantine/core';
import { useBooleanToggle } from '@mantine/hooks';
import { AddItemShelfButton } from '../AppShelf/AddAppShelfItem';
import { CalendarModule, DateModule, TotalDownloadsModule, WeatherModule } from '../modules';
import { DashdotModule } from '../modules/dash.';
import {
CalendarModule,
DateModule,
TotalDownloadsModule,
WeatherModule,
DashdotModule,
} from '../modules';
import { ModuleWrapper } from '../modules/moduleWrapper';
import DockerDrawer from '../Docker/DockerDrawer';
import SearchBar from '../modules/search/SearchModule';
import { SettingsMenuButton } from '../Settings/SettingsMenu';
import { Logo } from './Logo';
@@ -47,6 +53,7 @@ export function Header(props: any) {
</Box>
<Group noWrap>
<SearchBar />
<DockerDrawer />
<SettingsMenuButton />
<AddItemShelfButton />
<ActionIcon className={classes.burger} variant="default" radius="md" size="xl">

View File

@@ -1,7 +1,7 @@
import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
export function middleware(req: NextRequest, ev: NextFetchEvent) {
const ok = req.cookies.password === process.env.PASSWORD;
const ok = req.cookies.get('password') === process.env.PASSWORD;
const url = req.nextUrl.clone();
if (
!ok &&

View File

@@ -0,0 +1,66 @@
import { NextApiRequest, NextApiResponse } from 'next';
import Docker from 'dockerode';
const docker = new Docker();
async function Get(req: NextApiRequest, res: NextApiResponse) {
// Get the slug of the request
const { id } = req.query as { id: string };
const { action } = req.query;
// Get the action on the request (start, stop, restart)
if (action !== 'start' && action !== 'stop' && action !== 'restart' && action !== 'remove') {
return res.status(400).json({
statusCode: 400,
message: 'Invalid action',
});
}
if (!id) {
return res.status(400).json({
message: 'Missing ID',
});
}
// Get the container with the ID
const container = docker.getContainer(id);
// Get the container info
container.inspect((err, data) => {
if (err) {
res.status(500).json({
message: err,
});
}
});
try {
switch (action) {
case 'remove':
await container.remove();
break;
case 'start':
container.start();
break;
case 'stop':
container.stop();
break;
case 'restart':
container.restart();
break;
}
} catch (err) {
res.status(500).json({
message: err,
});
}
return res.status(200).json({
success: true,
});
}
export default async (req: NextApiRequest, res: NextApiResponse) => {
// Filter out if the reuqest is a Put or a GET
if (req.method === 'GET') {
return Get(req, res);
}
return res.status(405).json({
statusCode: 405,
message: 'Method not allowed',
});
};

View File

@@ -0,0 +1,21 @@
import { NextApiRequest, NextApiResponse } from 'next';
import Docker from 'dockerode';
const docker = new Docker();
async function Get(req: NextApiRequest, res: NextApiResponse) {
const containers = await docker.listContainers({ all: true });
return res.status(200).json(containers);
}
export default async (req: NextApiRequest, res: NextApiResponse) => {
// Filter out if the reuqest is a POST or a GET
if (req.method === 'GET') {
return Get(req, res);
}
return res.status(405).json({
statusCode: 405,
message: 'Method not allowed',
});
};

55
src/tools/addToHomarr.ts Normal file
View File

@@ -0,0 +1,55 @@
import Dockerode from 'dockerode';
import { Config, MatchingImages, ServiceType } from './types';
async function MatchIcon(name: string) {
const res = await fetch(
`https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
.replace(/\s+/g, '-')
.toLowerCase()}.png`
);
return res.ok ? res.url : '/favicon.svg';
}
function tryMatchType(imageName: string): ServiceType {
// Try to find imageName inside MatchingImages
const match = MatchingImages.find(({ image }) => imageName.includes(image));
if (match) {
return match.type;
}
return 'Other';
}
export function tryMatchService(container: Dockerode.ContainerInfo | undefined) {
if (container === undefined) return {};
const name = container.Names[0].substring(1);
return {
name,
id: container.Id,
type: tryMatchType(container.Image),
url: `${container.Ports.at(0)?.IP}:${container.Ports.at(0)?.PublicPort}`,
icon: `https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
.replace(/\s+/g, '-')
.toLowerCase()}.png`,
};
}
export default async function addToHomarr(
container: Dockerode.ContainerInfo,
config: Config,
setConfig: (newconfig: Config) => void
) {
setConfig({
...config,
services: [
...config.services,
{
name: container.Names[0].substring(1),
id: container.Id,
type: tryMatchType(container.Image),
url: `localhost:${container.Ports.at(0)?.PublicPort}`,
icon: await MatchIcon(container.Names[0].substring(1)),
},
],
});
}

View File

@@ -84,6 +84,12 @@ export type ServiceType =
| 'qBittorrent'
| 'Transmission';
export const MatchingImages: { image: string; type: ServiceType }[] = [
{ image: 'lscr.io/linuxserver/radarr', type: 'Radarr' },
{ image: 'lscr.io/linuxserver/sonarr', type: 'Sonarr' },
{ image: 'lscr.io/linuxserver/qbittorrent', type: 'qBittorrent' },
];
export interface serviceItem {
id: string;
name: string;

380
yarn.lock
View File

@@ -2409,111 +2409,118 @@ __metadata:
languageName: node
linkType: hard
"@next/bundle-analyzer@npm:^12.1.4":
version: 12.1.6
resolution: "@next/bundle-analyzer@npm:12.1.6"
"@next/bundle-analyzer@npm:^12.2.0":
version: 12.2.0
resolution: "@next/bundle-analyzer@npm:12.2.0"
dependencies:
webpack-bundle-analyzer: 4.3.0
checksum: cf37be49d45d706aea95df489656341bec64783e567067d15036b25330d7a69204987b2c402277f201b9bf943de588323b120fd8096bb3d6846a054bbb2cdc7e
checksum: e08770ed2f7bfa4fb38c29d58d1e3ad198fa7e9a8c061ea5e15950dd10576bed0b5b8c19266e18503af1d211a0d8d450b5fed4926f6863135b38e585d6fd1980
languageName: node
linkType: hard
"@next/env@npm:12.1.6":
version: 12.1.6
resolution: "@next/env@npm:12.1.6"
checksum: e6a4f189f0d653d13dc7ad510f6c9d2cf690bfd9e07c554bd501b840f8dabc3da5adcab874b0bc01aab86c3647cff4fb84692e3c3b28125af26f0b05cd4c7fcf
"@next/env@npm:12.2.0":
version: 12.2.0
resolution: "@next/env@npm:12.2.0"
checksum: 5fb317bdb5eb2d5df12ff55e335368792dba21874c5ece3cabf8cd312cec911a1d54ecf368e69dc08640b0244669b8a98c86cd035c7874b17640602e67c1b9d9
languageName: node
linkType: hard
"@next/eslint-plugin-next@npm:^12.1.4":
version: 12.1.6
resolution: "@next/eslint-plugin-next@npm:12.1.6"
"@next/eslint-plugin-next@npm:^12.2.0":
version: 12.2.0
resolution: "@next/eslint-plugin-next@npm:12.2.0"
dependencies:
glob: 7.1.7
checksum: 33dcaf71f299d3c8a0744cad512369f92d7a355f3c0d57f2496e888e4242080c49226ec2c59ba2efac04b3a1df51c36019b853b4177df082ca4621a1713a2229
checksum: 2e33b9af79af680fd873d74e91bed397930a91802c1d7a293db757227ebc431d3d856de69477dc178dec8b531635ea69d79b188293024f1371afe6c348dbe647
languageName: node
linkType: hard
"@next/swc-android-arm-eabi@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-android-arm-eabi@npm:12.1.6"
"@next/swc-android-arm-eabi@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-android-arm-eabi@npm:12.2.0"
conditions: os=android & cpu=arm
languageName: node
linkType: hard
"@next/swc-android-arm64@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-android-arm64@npm:12.1.6"
"@next/swc-android-arm64@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-android-arm64@npm:12.2.0"
conditions: os=android & cpu=arm64
languageName: node
linkType: hard
"@next/swc-darwin-arm64@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-darwin-arm64@npm:12.1.6"
"@next/swc-darwin-arm64@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-darwin-arm64@npm:12.2.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@next/swc-darwin-x64@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-darwin-x64@npm:12.1.6"
"@next/swc-darwin-x64@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-darwin-x64@npm:12.2.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@next/swc-linux-arm-gnueabihf@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-linux-arm-gnueabihf@npm:12.1.6"
"@next/swc-freebsd-x64@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-freebsd-x64@npm:12.2.0"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"@next/swc-linux-arm-gnueabihf@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-linux-arm-gnueabihf@npm:12.2.0"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@next/swc-linux-arm64-gnu@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-linux-arm64-gnu@npm:12.1.6"
"@next/swc-linux-arm64-gnu@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-linux-arm64-gnu@npm:12.2.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@next/swc-linux-arm64-musl@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-linux-arm64-musl@npm:12.1.6"
"@next/swc-linux-arm64-musl@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-linux-arm64-musl@npm:12.2.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@next/swc-linux-x64-gnu@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-linux-x64-gnu@npm:12.1.6"
"@next/swc-linux-x64-gnu@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-linux-x64-gnu@npm:12.2.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@next/swc-linux-x64-musl@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-linux-x64-musl@npm:12.1.6"
"@next/swc-linux-x64-musl@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-linux-x64-musl@npm:12.2.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@next/swc-win32-arm64-msvc@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-win32-arm64-msvc@npm:12.1.6"
"@next/swc-win32-arm64-msvc@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-win32-arm64-msvc@npm:12.2.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@next/swc-win32-ia32-msvc@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-win32-ia32-msvc@npm:12.1.6"
"@next/swc-win32-ia32-msvc@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-win32-ia32-msvc@npm:12.2.0"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@next/swc-win32-x64-msvc@npm:12.1.6":
version: 12.1.6
resolution: "@next/swc-win32-x64-msvc@npm:12.1.6"
"@next/swc-win32-x64-msvc@npm:12.2.0":
version: 12.2.0
resolution: "@next/swc-win32-x64-msvc@npm:12.2.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@@ -3783,6 +3790,15 @@ __metadata:
languageName: node
linkType: hard
"@swc/helpers@npm:0.4.2":
version: 0.4.2
resolution: "@swc/helpers@npm:0.4.2"
dependencies:
tslib: ^2.4.0
checksum: 0b8c86ad03b17b8fe57dc4498e25dc294ea6bc42558a6b92d8fcd789351dac80199409bef38a2e3ac06aae0fedddfc0ab9c34409acbf74e55d1bbbd74f68b6b7
languageName: node
linkType: hard
"@szmarczak/http-timer@npm:^5.0.1":
version: 5.0.1
resolution: "@szmarczak/http-timer@npm:5.0.1"
@@ -3874,6 +3890,26 @@ __metadata:
languageName: node
linkType: hard
"@types/docker-modem@npm:*":
version: 3.0.2
resolution: "@types/docker-modem@npm:3.0.2"
dependencies:
"@types/node": "*"
"@types/ssh2": "*"
checksum: 1f23db30e6e9bdd4c6d6e43572fb7ac7251d106a1906a9f3faabac393897712a5a9cd5a471baedc0ac8055dab3f48eda331f41a1e2c7c6bbe3c7f433e039151c
languageName: node
linkType: hard
"@types/dockerode@npm:^3.3.9":
version: 3.3.9
resolution: "@types/dockerode@npm:3.3.9"
dependencies:
"@types/docker-modem": "*"
"@types/node": "*"
checksum: 3d03c68addb37c50e9557fff17171d26423aa18e544cb24e4caa81ebcec39ccc1cafed7adbfb8f4220d8ed23028d231717826bb77a786d425885c4f4cc37536d
languageName: node
linkType: hard
"@types/eslint-scope@npm:^3.7.3":
version: 3.7.3
resolution: "@types/eslint-scope@npm:3.7.3"
@@ -4151,6 +4187,25 @@ __metadata:
languageName: node
linkType: hard
"@types/ssh2-streams@npm:*":
version: 0.1.9
resolution: "@types/ssh2-streams@npm:0.1.9"
dependencies:
"@types/node": "*"
checksum: 190f3c235bf19787cd255f366d3ac9233875750095f3c73d15e72a1e67a826aed7e7c389603c5e89cb6420b87ff6dffc566f9174e546ddb7ff8c8dc2e8b00def
languageName: node
linkType: hard
"@types/ssh2@npm:*":
version: 0.5.52
resolution: "@types/ssh2@npm:0.5.52"
dependencies:
"@types/node": "*"
"@types/ssh2-streams": "*"
checksum: bc1c76ac727ad73ddd59ba849cf0ea3ed2e930439e7a363aff24f04f29b74f9b1976369b869dc9a018223c9fb8ad041c09a0f07aea8cf46a8c920049188cddae
languageName: node
linkType: hard
"@types/stack-utils@npm:^2.0.0":
version: 2.0.1
resolution: "@types/stack-utils@npm:2.0.1"
@@ -5196,6 +5251,15 @@ __metadata:
languageName: node
linkType: hard
"asn1@npm:^0.2.4":
version: 0.2.6
resolution: "asn1@npm:0.2.6"
dependencies:
safer-buffer: ~2.1.0
checksum: 39f2ae343b03c15ad4f238ba561e626602a3de8d94ae536c46a4a93e69578826305366dc09fbb9b56aec39b4982a463682f259c38e59f6fa380cd72cd61e493d
languageName: node
linkType: hard
"assert@npm:^1.1.1":
version: 1.5.0
resolution: "assert@npm:1.5.0"
@@ -5519,7 +5583,7 @@ __metadata:
languageName: node
linkType: hard
"base64-js@npm:^1.0.2":
"base64-js@npm:^1.0.2, base64-js@npm:^1.3.1":
version: 1.5.1
resolution: "base64-js@npm:1.5.1"
checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005
@@ -5541,6 +5605,15 @@ __metadata:
languageName: node
linkType: hard
"bcrypt-pbkdf@npm:^1.0.2":
version: 1.0.2
resolution: "bcrypt-pbkdf@npm:1.0.2"
dependencies:
tweetnacl: ^0.14.3
checksum: 4edfc9fe7d07019609ccf797a2af28351736e9d012c8402a07120c4453a3b789a15f2ee1530dc49eee8f7eb9379331a8dd4b3766042b9e502f74a68e7f662291
languageName: node
linkType: hard
"better-opn@npm:^2.1.1":
version: 2.1.1
resolution: "better-opn@npm:2.1.1"
@@ -5587,6 +5660,17 @@ __metadata:
languageName: node
linkType: hard
"bl@npm:^4.0.3":
version: 4.1.0
resolution: "bl@npm:4.1.0"
dependencies:
buffer: ^5.5.0
inherits: ^2.0.4
readable-stream: ^3.4.0
checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662
languageName: node
linkType: hard
"bluebird@npm:^3.5.5":
version: 3.7.2
resolution: "bluebird@npm:3.7.2"
@@ -5842,6 +5926,23 @@ __metadata:
languageName: node
linkType: hard
"buffer@npm:^5.5.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.1.13
checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84
languageName: node
linkType: hard
"buildcheck@npm:0.0.3":
version: 0.0.3
resolution: "buildcheck@npm:0.0.3"
checksum: baf30605c56e80c2ca0502e40e18f2ebc7075bb4a861c941c0b36cd468b27957ed11a62248003ce99b9e5f91a7dfa859b30aad4fa50f0090c77a6f596ba20e6d
languageName: node
linkType: hard
"builtin-status-codes@npm:^3.0.0":
version: 3.0.0
resolution: "builtin-status-codes@npm:3.0.0"
@@ -6578,14 +6679,14 @@ __metadata:
languageName: node
linkType: hard
"cookies-next@npm:^2.0.4":
version: 2.0.4
resolution: "cookies-next@npm:2.0.4"
"cookies-next@npm:^2.1.1":
version: 2.1.1
resolution: "cookies-next@npm:2.1.1"
dependencies:
"@types/cookie": ^0.4.1
"@types/node": ^16.10.2
cookie: ^0.4.0
checksum: fc25b4215f2d7092d72f8591c9bc8b30f3ea866fca76e536e31825899c3f05eefb97cdb4152c565429cab38d20f2f937d08aea76a43d3cdd3ca36e24a347fe00
checksum: c5fc2c72cf2d46d6fa804e5690b5038bab3d5c7e741a8472079bfbd6920010802962f7512d999ea430ebcbfc7c89c38e16f423479e4df7cb0bb782cc1a7f9004
languageName: node
linkType: hard
@@ -6679,6 +6780,17 @@ __metadata:
languageName: node
linkType: hard
"cpu-features@npm:~0.0.4":
version: 0.0.4
resolution: "cpu-features@npm:0.0.4"
dependencies:
buildcheck: 0.0.3
nan: ^2.15.0
node-gyp: latest
checksum: a20d58e41e63182b34753dfe23bd1d967944ec13d84b70849b5d334fb4a558b7e71e7f955ed86c8e75dd65b5c5b882f1c494174d342cb6d8a062d77f79d39596
languageName: node
linkType: hard
"cpy@npm:^8.1.2":
version: 8.1.2
resolution: "cpy@npm:8.1.2"
@@ -7243,6 +7355,28 @@ __metadata:
languageName: node
linkType: hard
"docker-modem@npm:^3.0.0":
version: 3.0.5
resolution: "docker-modem@npm:3.0.5"
dependencies:
debug: ^4.1.1
readable-stream: ^3.5.0
split-ca: ^1.0.1
ssh2: ^1.4.0
checksum: 79027f8e719a77031790af628f9aa1d72607ec3769149de3a4b683930f2e4d113ae0e3a7345b32ff3b2289f886879f4fcf216afb17908178ba00f9661c4e0dd6
languageName: node
linkType: hard
"dockerode@npm:^3.3.2":
version: 3.3.2
resolution: "dockerode@npm:3.3.2"
dependencies:
docker-modem: ^3.0.0
tar-fs: ~2.0.1
checksum: 69b60547ed2e6156e6ec1df16fccea9150c935ee0b0517723b4d05a5d840a01d4cd945341390d24b7fa301383be64145d563d9319be56d487a5bcbf9f872ee59
languageName: node
linkType: hard
"doctrine@npm:^2.1.0":
version: 2.1.0
resolution: "doctrine@npm:2.1.0"
@@ -7466,7 +7600,7 @@ __metadata:
languageName: node
linkType: hard
"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0":
"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1":
version: 1.4.4
resolution: "end-of-stream@npm:1.4.4"
dependencies:
@@ -8716,6 +8850,13 @@ __metadata:
languageName: node
linkType: hard
"fs-constants@npm:^1.0.0":
version: 1.0.0
resolution: "fs-constants@npm:1.0.0"
checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d
languageName: node
linkType: hard
"fs-extra@npm:^10.1.0":
version: 10.1.0
resolution: "fs-extra@npm:10.1.0"
@@ -9440,20 +9581,22 @@ __metadata:
"@mantine/next": ^4.2.8
"@mantine/notifications": ^4.2.8
"@mantine/prism": ^4.2.8
"@next/bundle-analyzer": ^12.1.4
"@next/eslint-plugin-next": ^12.1.4
"@next/bundle-analyzer": ^12.2.0
"@next/eslint-plugin-next": ^12.2.0
"@nivo/core": ^0.79.0
"@nivo/line": ^0.79.1
"@storybook/react": ^6.5.4
"@tabler/icons": ^1.68.0
"@types/dockerode": ^3.3.9
"@types/node": ^17.0.23
"@types/react": 17.0.43
"@types/uuid": ^8.3.4
"@typescript-eslint/eslint-plugin": ^5.16.0
"@typescript-eslint/parser": ^5.16.0
axios: ^0.27.2
cookies-next: ^2.0.4
cookies-next: ^2.1.1
dayjs: ^1.11.3
dockerode: ^3.3.2
eslint: ^8.11.0
eslint-config-airbnb: ^19.0.4
eslint-config-airbnb-typescript: ^16.1.0
@@ -9469,7 +9612,7 @@ __metadata:
framer-motion: ^6.3.1
jest: ^28.1.0
js-file-download: ^0.4.12
next: 12.1.6
next: ^12.2.0
prettier: ^2.6.2
prism-react-renderer: ^1.3.1
react: ^17.0.1
@@ -9704,7 +9847,7 @@ __metadata:
languageName: node
linkType: hard
"ieee754@npm:^1.1.4":
"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4":
version: 1.2.1
resolution: "ieee754@npm:1.2.1"
checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e
@@ -11841,6 +11984,13 @@ __metadata:
languageName: node
linkType: hard
"mkdirp-classic@npm:^0.5.2":
version: 0.5.3
resolution: "mkdirp-classic@npm:0.5.3"
checksum: 3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac
languageName: node
linkType: hard
"mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.3":
version: 0.5.6
resolution: "mkdirp@npm:0.5.6"
@@ -11920,7 +12070,7 @@ __metadata:
languageName: node
linkType: hard
"nan@npm:^2.12.1":
"nan@npm:^2.12.1, nan@npm:^2.15.0, nan@npm:^2.16.0":
version: 2.16.0
resolution: "nan@npm:2.16.0"
dependencies:
@@ -11985,26 +12135,29 @@ __metadata:
languageName: node
linkType: hard
"next@npm:12.1.6":
version: 12.1.6
resolution: "next@npm:12.1.6"
"next@npm:^12.2.0":
version: 12.2.0
resolution: "next@npm:12.2.0"
dependencies:
"@next/env": 12.1.6
"@next/swc-android-arm-eabi": 12.1.6
"@next/swc-android-arm64": 12.1.6
"@next/swc-darwin-arm64": 12.1.6
"@next/swc-darwin-x64": 12.1.6
"@next/swc-linux-arm-gnueabihf": 12.1.6
"@next/swc-linux-arm64-gnu": 12.1.6
"@next/swc-linux-arm64-musl": 12.1.6
"@next/swc-linux-x64-gnu": 12.1.6
"@next/swc-linux-x64-musl": 12.1.6
"@next/swc-win32-arm64-msvc": 12.1.6
"@next/swc-win32-ia32-msvc": 12.1.6
"@next/swc-win32-x64-msvc": 12.1.6
"@next/env": 12.2.0
"@next/swc-android-arm-eabi": 12.2.0
"@next/swc-android-arm64": 12.2.0
"@next/swc-darwin-arm64": 12.2.0
"@next/swc-darwin-x64": 12.2.0
"@next/swc-freebsd-x64": 12.2.0
"@next/swc-linux-arm-gnueabihf": 12.2.0
"@next/swc-linux-arm64-gnu": 12.2.0
"@next/swc-linux-arm64-musl": 12.2.0
"@next/swc-linux-x64-gnu": 12.2.0
"@next/swc-linux-x64-musl": 12.2.0
"@next/swc-win32-arm64-msvc": 12.2.0
"@next/swc-win32-ia32-msvc": 12.2.0
"@next/swc-win32-x64-msvc": 12.2.0
"@swc/helpers": 0.4.2
caniuse-lite: ^1.0.30001332
postcss: 8.4.5
styled-jsx: 5.0.2
use-sync-external-store: 1.1.0
peerDependencies:
fibers: ">= 3.1.0"
node-sass: ^6.0.0 || ^7.0.0
@@ -12020,6 +12173,8 @@ __metadata:
optional: true
"@next/swc-darwin-x64":
optional: true
"@next/swc-freebsd-x64":
optional: true
"@next/swc-linux-arm-gnueabihf":
optional: true
"@next/swc-linux-arm64-gnu":
@@ -12045,7 +12200,7 @@ __metadata:
optional: true
bin:
next: dist/bin/next
checksum: 670d544fd47670c29681d10824e6da625e9d4a048e564c8d9cb80d37f33c9ff9b5ca0a53e6d84d8d618b1fe7c9bb4e6b45040cb7e57a5c46b232a8f914425dc1
checksum: 38456c33935122ac1581367e4982034be23269039a8470a66443d710334336f8f3fb587f25d172d138d84cf18c01d3a76627fb610c2e2e57bd1692277c23fa2b
languageName: node
linkType: hard
@@ -13695,7 +13850,7 @@ __metadata:
languageName: node
linkType: hard
"readable-stream@npm:^3.6.0":
"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0":
version: 3.6.0
resolution: "readable-stream@npm:3.6.0"
dependencies:
@@ -14178,7 +14333,7 @@ __metadata:
languageName: node
linkType: hard
"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.1.0":
"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0":
version: 2.1.2
resolution: "safer-buffer@npm:2.1.2"
checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0
@@ -14659,6 +14814,13 @@ __metadata:
languageName: node
linkType: hard
"split-ca@npm:^1.0.1":
version: 1.0.1
resolution: "split-ca@npm:1.0.1"
checksum: 1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f
languageName: node
linkType: hard
"split-string@npm:^3.0.1, split-string@npm:^3.0.2":
version: 3.1.0
resolution: "split-string@npm:3.1.0"
@@ -14675,6 +14837,23 @@ __metadata:
languageName: node
linkType: hard
"ssh2@npm:^1.4.0":
version: 1.11.0
resolution: "ssh2@npm:1.11.0"
dependencies:
asn1: ^0.2.4
bcrypt-pbkdf: ^1.0.2
cpu-features: ~0.0.4
nan: ^2.16.0
dependenciesMeta:
cpu-features:
optional: true
nan:
optional: true
checksum: e40cb9f171741a807c170dc555078aa8c49dc93dd36fc9c8be026fce1cfd31f0d37078d9b60a0f2cfb11d0e007ed5407376b72f8a0ef9f2cb89574632bbfb824
languageName: node
linkType: hard
"ssri@npm:^6.0.1":
version: 6.0.2
resolution: "ssri@npm:6.0.2"
@@ -15125,6 +15304,31 @@ __metadata:
languageName: node
linkType: hard
"tar-fs@npm:~2.0.1":
version: 2.0.1
resolution: "tar-fs@npm:2.0.1"
dependencies:
chownr: ^1.1.1
mkdirp-classic: ^0.5.2
pump: ^3.0.0
tar-stream: ^2.0.0
checksum: 26cd297ed2421bc8038ce1a4ca442296b53739f409847d495d46086e5713d8db27f2c03ba2f461d0f5ddbc790045628188a8544f8ae32cbb6238b279b68d0247
languageName: node
linkType: hard
"tar-stream@npm:^2.0.0":
version: 2.2.0
resolution: "tar-stream@npm:2.2.0"
dependencies:
bl: ^4.0.3
end-of-stream: ^1.4.1
fs-constants: ^1.0.0
inherits: ^2.0.3
readable-stream: ^3.1.1
checksum: 699831a8b97666ef50021c767f84924cfee21c142c2eb0e79c63254e140e6408d6d55a065a2992548e72b06de39237ef2b802b99e3ece93ca3904a37622a66f3
languageName: node
linkType: hard
"tar@npm:^6.0.2, tar@npm:^6.1.11, tar@npm:^6.1.2":
version: 6.1.11
resolution: "tar@npm:6.1.11"
@@ -15479,7 +15683,7 @@ __metadata:
languageName: node
linkType: hard
"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0":
"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0":
version: 2.4.0
resolution: "tslib@npm:2.4.0"
checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113
@@ -15504,6 +15708,13 @@ __metadata:
languageName: node
linkType: hard
"tweetnacl@npm:^0.14.3":
version: 0.14.5
resolution: "tweetnacl@npm:0.14.5"
checksum: 6061daba1724f59473d99a7bb82e13f211cdf6e31315510ae9656fefd4779851cb927adad90f3b488c8ed77c106adc0421ea8055f6f976ff21b27c5c4e918487
languageName: node
linkType: hard
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
version: 0.4.0
resolution: "type-check@npm:0.4.0"
@@ -15908,6 +16119,15 @@ __metadata:
languageName: node
linkType: hard
"use-sync-external-store@npm:1.1.0":
version: 1.1.0
resolution: "use-sync-external-store@npm:1.1.0"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
checksum: 8993a0b642f91d7fcdbb02b7b3ac984bd3af4769686f38291fe7fcfe73dfb73d6c64d20dfb7e5e7fbf5a6da8f5392d6f8e5b00c243a04975595946e82c02b883
languageName: node
linkType: hard
"use@npm:^3.1.0":
version: 3.1.1
resolution: "use@npm:3.1.1"