diff --git a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html index 4a64ef5ea..4804b25c8 100644 --- a/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/DockerSiteHome.html @@ -915,7 +915,7 @@ } }); - // Angular extension for container action handling + // Add n8n version checking and update functionality angular.module('WebsitesApp').run(['$rootScope', function($rootScope) { // Add custom icon rendering for container actions $rootScope.renderIcon = function(iconName) { @@ -949,9 +949,9 @@ }; } - // Add n8n version checking function - $rootScope.checkN8nVersion = function(container) { - // Simulate version check + // Initialize n8n version info for containers + $rootScope.initializeN8nVersion = function(container) { + // This would normally come from the backend container.n8nVersion = { current: '1.0.0', latest: '1.1.0', @@ -970,6 +970,17 @@ container.updatingN8n = false; }, 3000); }; + + // Initialize version info when loading containers + var originalLunchcontainer = $rootScope.Lunchcontainer; + if (originalLunchcontainer) { + $rootScope.Lunchcontainer = function(containerId) { + var result = originalLunchcontainer(containerId); + // Initialize version info after container is loaded + $rootScope.initializeN8nVersion($rootScope.web); + return result; + }; + } }]); }); @@ -1144,6 +1155,12 @@