mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-15 17:56:21 +01:00
🔧 add configuration to docker module
This commit is contained in:
@@ -11,9 +11,9 @@ import {
|
||||
} from '@tabler/icons';
|
||||
import axios from 'axios';
|
||||
import Dockerode from 'dockerode';
|
||||
import { useState } from 'react';
|
||||
import { tryMatchService } from '../../tools/addToHomarr';
|
||||
import { AddAppShelfItemForm } from '../../components/AppShelf/AddAppShelfItem';
|
||||
import { useState } from 'react';
|
||||
|
||||
function sendDockerCommand(
|
||||
action: string,
|
||||
@@ -30,7 +30,7 @@ function sendDockerCommand(
|
||||
disallowClose: true,
|
||||
});
|
||||
axios
|
||||
.get(`/api/docker/container/${containerId}?action=${action}`)
|
||||
.get(`localhost:2375/containers/${containerId}/${action}`)
|
||||
.then((res) => {
|
||||
updateNotification({
|
||||
id: containerId,
|
||||
@@ -88,6 +88,7 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
variant="light"
|
||||
color="orange"
|
||||
radius="md"
|
||||
disabled={selected.length === 0}
|
||||
>
|
||||
Restart
|
||||
</Button>
|
||||
@@ -103,6 +104,7 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
variant="light"
|
||||
color="red"
|
||||
radius="md"
|
||||
disabled={selected.length === 0}
|
||||
>
|
||||
Stop
|
||||
</Button>
|
||||
@@ -118,10 +120,11 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
variant="light"
|
||||
color="green"
|
||||
radius="md"
|
||||
disabled={selected.length === 0}
|
||||
>
|
||||
Start
|
||||
</Button>
|
||||
<Button leftIcon={<IconRefresh />} onClick={() => reload()} variant="light" radius="md">
|
||||
<Button leftIcon={<IconRefresh />} onClick={() => reload()} variant="light" color="violet" radius="md">
|
||||
Refresh data
|
||||
</Button>
|
||||
<Button
|
||||
@@ -141,6 +144,7 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
setOpened(true);
|
||||
}
|
||||
}}
|
||||
disabled={selected.length === 0}
|
||||
>
|
||||
Add to Homarr
|
||||
</Button>
|
||||
@@ -156,6 +160,7 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
)
|
||||
)
|
||||
}
|
||||
disabled={selected.length === 0}
|
||||
>
|
||||
Remove
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user