diff --git a/src/Containers.jsx b/src/Containers.jsx index 695b5bbc9..079bb321a 100644 --- a/src/Containers.jsx +++ b/src/Containers.jsx @@ -47,6 +47,8 @@ const ContainerActions = ({ container, healthcheck, onAddNotification, version, const isRunning = container.State == "running"; const isPaused = container.State === "paused"; + utils.debug(container.isSystem, "ContainerActions names", JSON.stringify(container.Names), "status", container.State); + const deleteContainer = (event) => { setActionsKebabOpen(false); @@ -76,13 +78,16 @@ const ContainerActions = ({ container, healthcheck, onAddNotification, version, const stopContainer = (force) => { const args = {}; + if (force) + args.t = 0; + + utils.debug(container.isSystem, "stopContainer", container.Id, "args", JSON.stringify(args)); setActionsKebabOpen(false); - if (force) - args.t = 0; client.postContainer(container.isSystem, "stop", container.Id, args) .catch(ex => { + utils.debug(container.isSystem, "stopContainer", container.Id, "failed", JSON.stringify(ex)); const error = cockpit.format(_("Failed to stop container $0"), container.Names); onAddNotification({ type: 'danger', error, errorDetail: ex.message }); }); diff --git a/src/PodActions.jsx b/src/PodActions.jsx index 5e7f92bfe..46cc7d71a 100644 --- a/src/PodActions.jsx +++ b/src/PodActions.jsx @@ -11,6 +11,7 @@ import cockpit from 'cockpit'; import { useDialogs } from "dialogs.jsx"; import * as client from './client.js'; +import { debug } from './util.js'; const _ = cockpit.gettext; @@ -71,6 +72,8 @@ export const PodActions = ({ onAddNotification, pod }) => { const Dialogs = useDialogs(); const [isOpen, setOpen] = useState(false); + debug(pod.isSystem, "PodActions name", pod.Name, "status", pod.Status); + const dropdownItems = []; // Possible Pod Statuses can be found here https://github.com/containers/podman/blob/main/libpod/define/podstate.go if (pod.Status == "Running" || pod.Status == "Paused") { diff --git a/test/check-application b/test/check-application index 48e1ad5de..e8ee33fbd 100755 --- a/test/check-application +++ b/test/check-application @@ -1155,9 +1155,27 @@ class TestApplication(testlib.MachineCase): def testLifecycleOperationsUser(self): self._testLifecycleOperations(False) + def testLifecycleOperationsUser2(self): + self._testLifecycleOperations(False) + + def testLifecycleOperationsUser3(self): + self._testLifecycleOperations(False) + + def testLifecycleOperationsUser4(self): + self._testLifecycleOperations(False) + def testLifecycleOperationsSystem(self): self._testLifecycleOperations(True) + def testLifecycleOperationsSystem2(self): + self._testLifecycleOperations(True) + + def testLifecycleOperationsSystem3(self): + self._testLifecycleOperations(True) + + def testLifecycleOperationsSystem4(self): + self._testLifecycleOperations(True) + def _testLifecycleOperations(self, auth): b = self.browser @@ -1165,6 +1183,9 @@ class TestApplication(testlib.MachineCase): self.allow_browser_errors("Failed to start system podman.socket.*") self.login() + + b.eval_js('window.debugging = "podman"') + b.cdp.trace = True self.filter_containers('all') # run a container