From 2bdfa61b0e133c28ff5e563f9959f498cd8d17c7 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 11 Apr 2025 14:17:56 +0500 Subject: [PATCH] fix container logs --- .../websiteFunctions/websiteFunctions.js | 8 +++- .../websiteFunctions/DockerSiteHome.html | 39 ++++++++----------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index 0dab2d6ab..da77fd248 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -17464,7 +17464,13 @@ app.controller('ListDockersitecontainer', function ($scope, $http) { $('#cyberpanelLoading').hide(); if (response.data.status === 1) { - $scope.logs = response.data.data[1]; + // Find the container in the list and update its logs + for (var i = 0; i < $scope.ContainerList.length; i++) { + if ($scope.ContainerList[i].id === containerid) { + $scope.ContainerList[i].logs = response.data.data[1]; + break; + } + } } else { new PNotify({ title: 'Operation Failed!', diff --git a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html index 06de474ca..afe878a4f 100644 --- a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html @@ -452,6 +452,22 @@ + +
+
+

+ {% trans "Logs" %} + +

+
+
+
+
+
+
+
@@ -521,29 +537,6 @@ -
- -
- -

- {% trans "Logs" %} - -

- - -
-
- -
-
- -
-
-
- -