diff --git a/controller/internal/web/templates/deploy.html b/controller/internal/web/templates/deploy.html index 1380cf5..82469fc 100644 --- a/controller/internal/web/templates/deploy.html +++ b/controller/internal/web/templates/deploy.html @@ -398,7 +398,8 @@ var postDeployInfo = { defaultCreds: {{json .Meta.AppInfo.DefaultCreds}}, docsURL: {{json .Meta.AppInfo.DocsURL}}, domain: {{json .Domain}}, - displayName: {{json .Meta.DisplayName}} + displayName: {{json .Meta.DisplayName}}, + deployFields: {{json .Meta.DeployFields}} }; function buildPostDeployCard(stackName) { @@ -427,8 +428,33 @@ function buildPostDeployCard(stackName) { html += ''; } - // Default creds - if (postDeployInfo.defaultCreds) { + // Credentials from deploy fields (show actual values from form) + var credRows = ''; + if (postDeployInfo.deployFields) { + for (var i = 0; i < postDeployInfo.deployFields.length; i++) { + var f = postDeployInfo.deployFields[i]; + // Show secrets, passwords, and username-like text fields + var isCredential = f.type === 'secret' || f.type === 'password'; + if (!isCredential && f.type === 'text') { + var ev = f.env_var.toUpperCase(); + isCredential = ev.indexOf('USER') >= 0 || ev.indexOf('ADMIN') >= 0 || ev.indexOf('LOGIN') >= 0; + } + if (!isCredential) continue; + // Skip internal DB credentials + var evUp = f.env_var.toUpperCase(); + if (evUp.indexOf('DB_PASSWORD') >= 0 || evUp.indexOf('MYSQL_ROOT') >= 0 || evUp.indexOf('SECRET_KEY') >= 0) continue; + // Read value from DOM + var el = document.getElementById('auto-field-' + f.env_var) || document.getElementById('field-' + f.env_var); + var val = el ? el.value : ''; + if (!val) continue; + credRows += '' + f.label + '' + + '' + val + ''; + } + } + if (credRows) { + html += '

Bejelentkezés

' + + '' + credRows + '
'; + } else if (postDeployInfo.defaultCreds) { var creds = postDeployInfo.defaultCreds.replace(/DOMAIN/g, postDeployInfo.domain); html += '

Bejelentkezés

' + '

' + creds + '

';