mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06:00
Update the server-information, when connected, and added.
This commit is contained in:
parent
932ed358e8
commit
3887c84446
@ -113,6 +113,7 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
},
|
||||
/* Connect the server (if not connected), before opening this node */
|
||||
beforeopen: function(item, data) {
|
||||
|
||||
if(!data || data._type != 'server') {
|
||||
return false;
|
||||
}
|
||||
@ -120,13 +121,17 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
pgBrowser.tree.addIcon(item, {icon: data.icon});
|
||||
if (!data.connected) {
|
||||
connect_to_server(this, data, pgBrowser.tree, item);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
opened: function(item, data) {
|
||||
added: function(item, data) {
|
||||
|
||||
pgBrowser.serverInfo = pgBrowser.serverInfo || {};
|
||||
pgBrowser.serverInfo[data._id] = _.extend({}, data);
|
||||
|
||||
return true;
|
||||
}
|
||||
},
|
||||
model: pgAdmin.Browser.Node.Model.extend({
|
||||
@ -245,6 +250,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||
}
|
||||
_.extend(data, res.data);
|
||||
|
||||
var serverInfo = pgBrowser.serverInfo = pgBrowser.serverInfo || {};
|
||||
serverInfo[data._id] = _.extend({}, data);
|
||||
|
||||
alertify.success(res.info);
|
||||
obj.trigger('server-connected', obj, item, data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user