mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix:
- Added isLoading prop - Changed notification to container name - Eslint fix
This commit is contained in:
@@ -46,7 +46,8 @@ export const ShowMonitoringCompose = ({
|
|||||||
|
|
||||||
const [containerId, setContainerId] = useState<string | undefined>();
|
const [containerId, setContainerId] = useState<string | undefined>();
|
||||||
|
|
||||||
const { mutateAsync: restart } = api.docker.restartContainer.useMutation();
|
const { mutateAsync: restart, isLoading } =
|
||||||
|
api.docker.restartContainer.useMutation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data && data?.length > 0) {
|
if (data && data?.length > 0) {
|
||||||
@@ -94,8 +95,10 @@ export const ShowMonitoringCompose = ({
|
|||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<Button
|
<Button
|
||||||
|
isLoading={isLoading}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
toast.success(`Restarting container ${containerId}`);
|
if (!containerId) return;
|
||||||
|
toast.success(`Restarting container ${containerAppName}`);
|
||||||
await restart({ containerId }).then(() => {
|
await restart({ containerId }).then(() => {
|
||||||
toast.success("Container restarted");
|
toast.success("Container restarted");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user