diff --git a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html index 7097db516..187b63318 100644 --- a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html @@ -941,23 +941,34 @@ $scope.conatinerview = false; $scope.cyberpanelLoading = true; - // Initialize container data - $scope.initContainer = function(container) { - if (container.environment && container.environment.some(env => env.includes('n8n'))) { - // Get container details including image info - $http.get('/docker/container/' + container.id + '/json').then(function(response) { - container.image = response.data.Config.Image; - $scope.$apply(); - }); + // Function to extract n8n version from environment variables + $scope.getN8nVersion = function(container) { + if (container.environment) { + for (var i = 0; i < container.environment.length; i++) { + var env = container.environment[i]; + if (env.startsWith('N8N_VERSION=')) { + return env.split('=')[1]; + } + } } + // If no version found in environment, try to extract from image tag + if (container.image && container.image.includes(':')) { + return container.image.split(':')[1]; + } + return 'unknown'; + }; + + // Function to check if updates are available + $scope.checkN8nUpdates = function(currentVersion) { + // This is a placeholder. You'll need to implement the actual version check + // For now, we'll assume an update is available if version is not 'latest' + return currentVersion !== 'latest'; }; - // Watch for container list changes - $scope.$watch('ContainerList', function(newVal) { - if (newVal && newVal.length > 0) { - newVal.forEach($scope.initContainer); - } - }); + // Add custom icon rendering for container actions + $scope.renderIcon = function(iconName) { + return ''; + }; // Handle container actions $scope.handleAction = function(action, container) { @@ -1180,16 +1191,16 @@
{{ web.id }}{$ web.id $}{{ containerPort }}{$ containerPort $}{{ volume.Source }}{{ volume.Destination }}{$ volume.Source $}{$ volume.Destination $}{{ env.split('=')[0] }}{$ env.split('=')[0] $}{{ env.split('=')[1] }}
- {{ env.split('=')[1] }}
+ {$ env.split('=')[1] $}
+ {$ env.split('=')[1] $}