mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issue 'Reload Configuration' option is also enabled on database node while it should only be enabled on server node
This commit is contained in:
parent
176b99c90b
commit
8cfca280d4
@ -44,7 +44,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
name: 'reload_configuration', node: 'server', module: this,
|
name: 'reload_configuration', node: 'server', module: this,
|
||||||
applies: ['tools', 'context'], callback: 'reload_configuration',
|
applies: ['tools', 'context'], callback: 'reload_configuration',
|
||||||
category: 'reload', priority: 6, label: '{{ _('Reload Configuration...') }}',
|
category: 'reload', priority: 6, label: '{{ _('Reload Configuration...') }}',
|
||||||
icon: 'fa fa-repeat', enable : 'is_connected'
|
icon: 'fa fa-repeat', enable : 'enable_reload_config'
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
pgBrowser.messages['PRIV_GRANTEE_NOT_SPECIFIED'] =
|
pgBrowser.messages['PRIV_GRANTEE_NOT_SPECIFIED'] =
|
||||||
@ -58,6 +58,12 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||||||
is_connected: function(node) {
|
is_connected: function(node) {
|
||||||
return (node && node.connected == true);
|
return (node && node.connected == true);
|
||||||
},
|
},
|
||||||
|
enable_reload_config: function(node) {
|
||||||
|
if (node && node._type == "server" && node.connected == true) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
/* Connect the server */
|
/* Connect the server */
|
||||||
connect_server: function(args){
|
connect_server: function(args){
|
||||||
|
Loading…
Reference in New Issue
Block a user