Ensure the Generate ERD option is hidden if the connection to the database is not allowed. #5149

pull/5461/head
Nikhil Mohite 2022-10-20 16:26:10 +05:30 committed by GitHub
parent cc6ee1ddd2
commit 4925c6ce50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ define('pgadmin.node.database', [
name: 'generate_erd', node: 'database', module: this,
applies: ['object', 'context'], callback: 'generate_erd',
category: 'erd', priority: 5, label: gettext('Generate ERD'),
enable: (node) => {
return node.allowConn;
}
}]);
_.bindAll(this, 'connection_lost');