Ensure the Generate ERD option is hidden if the connection to the database is not allowed. #5149
parent
cc6ee1ddd2
commit
4925c6ce50
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue