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

This commit is contained in:
Nikhil Mohite
2022-10-20 16:26:10 +05:30
committed by GitHub
parent cc6ee1ddd2
commit 4925c6ce50

View File

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