1) Browser panel turns blank on connecting disconnected database & server has multiple databases. Fixes #6817

2) The object is not selected/properties panel is not updated when the user moves to object with arrow keys. Fixes #6821
3) Object gets deselected after editing. Fixes #6824
This commit is contained in:
Khushboo Vashi authored and Akshay Joshi committed 2021-09-29 17:18:55 +05:30
1 parent c57fc74e18
commit aa8854db53
5 files changed
+38 -49

No files matched your search

+1 -1
View File
@@ -135,7 +135,7 @@
"path-fx": "^2.0.0",
"pathfinding": "^0.4.18",
"paths-js": "^0.4.9",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#76d7801ae6c179a5efd3c826c1bd91446a2436fb",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#c66e5e0533cfc622915e85eed0adc3ac38305c61",
"postcss": "^8.2.15",
"raf": "^3.4.1",
"react": "^17.0.1",
@@ -282,7 +282,8 @@ define('pgadmin.node.database', [
}
pgBrowser.tree.addIcon(item, {icon: data.icon});
if (!data.connected && data.allowConn) {
if (!data.connected && data.allowConn && !data.is_connecting) {
data.is_connecting = true;
connect_to_database(this, data, pgBrowser.tree, item, true);
return false;
}
@@ -295,7 +296,8 @@ define('pgadmin.node.database', [
}
pgBrowser.tree.addIcon(item, {icon: data.icon});
if (!data.connected && data.allowConn) {
if (!data.connected && data.allowConn && !data.is_connecting) {
data.is_connecting = true;
connect_to_database(this, data, pgBrowser.tree, item, false);
return false;
}
@@ -416,6 +418,7 @@ define('pgadmin.node.database', [
onFailure = function(
xhr, status, error, _model, _data, _tree, _item, _status
) {
data.is_connecting = false;
if (xhr.status != 200 && xhr.responseText.search('Ticket expired') !== -1) {
tree.addIcon(_item, {icon: 'icon-server-connecting'});
let fetchTicket = Kerberos.fetch_ticket();
@@ -454,10 +457,6 @@ define('pgadmin.node.database', [
res, model, _data, _tree, _item, _connected
) {
_data.is_connecting = false;
if (!_connected) {
_tree.deselect(_item);
_tree.setInode(_item);
}
if (res && res.data) {
if(typeof res.data.connected == 'boolean') {
_data.connected = res.data.connected;
+29 -39
View File
@@ -1075,23 +1075,19 @@ define('pgadmin.browser', [
};
if (binarySearch()) {
__ctx.t.before(i, {
itemData: _data,
success: function() {
if (
__ctx.o && __ctx.o.success && typeof(__ctx.o.success) == 'function'
) {
__ctx.o.success.apply(__ctx.t, [i, _data]);
}
},
fail: function() {
console.warn('Failed to add before...', arguments);
if (
__ctx.o && __ctx.o.fail && typeof(__ctx.o.fail) == 'function'
) {
__ctx.o.fail.apply(__ctx.t, [i, _data]);
}
},
__ctx.t.before(i, _data).then(() => {
if (
__ctx.o && __ctx.o.success && typeof(__ctx.o.success) == 'function'
) {
__ctx.o.success.apply(__ctx.t, [i, _data]);
}
}, () => {
console.warn('Failed to add before...', arguments);
if (
__ctx.o && __ctx.o.fail && typeof(__ctx.o.fail) == 'function'
) {
__ctx.o.fail.apply(__ctx.t, [i, _data]);
}
});
} else {
var _append = function() {
@@ -1570,32 +1566,26 @@ define('pgadmin.browser', [
};
if (binarySearch()) {
__ctx.t.before(i, {
itemData: _new,
success: function() {
var new_item = $(arguments[1].items[0]);
__ctx.t.openPath(new_item);
__ctx.t.select(new_item);
if (
__ctx.o && __ctx.o.success && typeof(__ctx.o.success) == 'function'
) {
__ctx.o.success.apply(__ctx.t, [i, _old, _new]);
}
},
fail: function() {
console.warn('Failed to add before..', arguments);
if (
__ctx.o && __ctx.o.fail && typeof(__ctx.o.fail) == 'function'
) {
__ctx.o.fail.apply(__ctx.t, [i, _old, _new]);
}
},
__ctx.t.before(i, _new).then((new_item) => {
__ctx.t.openPath(new_item);
__ctx.t.select(new_item);
if (
__ctx.o && __ctx.o.success && typeof(__ctx.o.success) == 'function'
) {
__ctx.o.success.apply(__ctx.t, [i, _old, _new]);
}
}, () => {
console.warn('Failed to add before..', arguments);
if (
__ctx.o && __ctx.o.fail && typeof(__ctx.o.fail) == 'function'
) {
__ctx.o.fail.apply(__ctx.t, [i, _old, _new]);
}
});
} else {
var _appendNode = function() {
__ctx.t.append(__ctx.i, _new).then(
() => {
var new_item = $(arguments[1].items[0]);
(new_item) => {
__ctx.t.openPath(new_item);
__ctx.t.select(new_item);
if (
+1 -1
View File
@@ -77,7 +77,7 @@ export class Tree {
}
async before(item, data) {
await this.tree.create(item.parent, data.itemData);
return await this.tree.create(item.parent, data);
}
async update(item, data) {
+2 -2
View File
@@ -7582,9 +7582,9 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#76d7801ae6c179a5efd3c826c1bd91446a2436fb":
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#c66e5e0533cfc622915e85eed0adc3ac38305c61":
version "1.0.0"
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#76d7801ae6c179a5efd3c826c1bd91446a2436fb"
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#c66e5e0533cfc622915e85eed0adc3ac38305c61"
dependencies:
"@types/classnames" "^2.2.6"
"@types/react" "^16.7.18"