]> PHS Git Server - phs-admin.git/commitdiff
Fixing docker container get.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 15:03:38 +0000 (10:03 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 15:03:38 +0000 (10:03 -0500)
src/app/views/Docker/Docker.jsx

index 8836601888c9a1b2eb305aa6ff88d0277944d21d..f0c332ccf507c4c500be5b6672d0eab6d4485992 100644 (file)
@@ -12,7 +12,7 @@ const Docker = () => {
 
   const fetchContainers = async () => {
     try {
-      const containersData = await DockerService.fetchContainers(); // Assuming you have a service to fetch containers
+      const containersData = await DockerService.fetchContainers( { all: true } ); // Assuming you have a service to fetch containers
       setContainers(containersData);
     } catch (error) {
       setMessage(error);
@@ -29,8 +29,8 @@ const Docker = () => {
   };
 
   useEffect( () => {
-    fetchImages().catch( e => setMessage( e ) );
-    fetchContainers().catch( e => setMessage( e ) );
+    fetchImages().catch();
+    fetchContainers().catch();
   }, [] );
 
   const handleContainerAction = async (action, containerId) => {
@@ -100,7 +100,7 @@ const Docker = () => {
         <Button type="submit" variant="contained" color="secondary">Stop Compose Services</Button>
       </form>
 
-      {message && <Typography color={message.startsWith('Error') ? 'error' : 'success'}>{message}</Typography>}
+      {message && <Typography color={message?.startsWith('Error') ? 'error' : 'success'}>{message}</Typography>}
     </Container>
   )
 }