diff --git a/web/pgadmin/about/__init__.py b/web/pgadmin/about/__init__.py index 6fbac436a..0076a8a93 100644 --- a/web/pgadmin/about/__init__.py +++ b/web/pgadmin/about/__init__.py @@ -84,16 +84,25 @@ def index(): info['current_user'] = current_user.email - settings = '' + settings = "" for setting in dir(config): if not setting.startswith('_') and setting.isupper() and \ setting not in ['CSRF_SESSION_KEY', 'SECRET_KEY', 'SECURITY_PASSWORD_SALT', 'SECURITY_PASSWORD_HASH', - 'ALLOWED_HOSTS']: - settings = settings + '{} = {}\n'.format(setting, - getattr(config, setting)) + 'ALLOWED_HOSTS' + 'MAIL_PASSWORD', + 'LDAP_BIND_PASSWORD', + 'SECURITY_PASSWORD_HASH']: + if isinstance(getattr(config, setting), str): + settings = \ + settings + '{} = "{}"\n'.format( + setting, gettext(getattr(config, setting))) + else: + settings = \ + settings + '{} = {}\n'.format( + setting, gettext(getattr(config, setting))) info['settings'] = settings diff --git a/web/pgadmin/about/static/js/about.js b/web/pgadmin/about/static/js/about.js index 4dfa6b149..63a09c8a0 100644 --- a/web/pgadmin/about/static/js/about.js +++ b/web/pgadmin/about/static/js/about.js @@ -45,11 +45,26 @@ define( }, hooks:{ onshow:function(){ + var self = this; var container = $(this.elements.footer).find('button:not([disabled])'); commonUtils.findAndSetFocus(container); + $('#copy_textarea').on('click', function(){ + //Copy the server configuration details + let textarea = document.getElementById('about-textarea'); + textarea.select(); + document.execCommand('copy'); + $('#copy_textarea').text('Copied'); + }); + + $(this.elements.resizeHandle).on('click', function(){ + // Set the height of the Textarea + var height = self.elements.dialog.scrollHeight - 300; + if (height < 0) + height = self.elements.dialog.scrollHeight - 150; + $('#about-textarea').css({'height':height}); + }); }, }, - prepare:function() { this.setContent(this.message); }, diff --git a/web/pgadmin/about/templates/about/index.html b/web/pgadmin/about/templates/about/index.html index a3c6d0c2d..e7810a6b7 100644 --- a/web/pgadmin/about/templates/about/index.html +++ b/web/pgadmin/about/templates/about/index.html @@ -38,7 +38,10 @@