From a61a9e5b8fe2c3c2d4fc98b400ad637dd762bfd7 Mon Sep 17 00:00:00 2001 From: Pradip Parkale Date: Wed, 10 Nov 2021 11:17:51 +0530 Subject: [PATCH] Fixed an issue where older server group name displayed in the confirmation pop-up when the user removes server group. Fixes #6939 --- docs/en_US/release_notes_6_2.rst | 1 + web/package.json | 2 +- web/pgadmin/browser/static/js/browser.js | 1 + web/pgadmin/static/js/tree/tree.js | 2 +- web/pgadmin/static/js/tree/tree_nodes.ts | 4 ++-- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/en_US/release_notes_6_2.rst b/docs/en_US/release_notes_6_2.rst index b0514717f..407acb59b 100644 --- a/docs/en_US/release_notes_6_2.rst +++ b/docs/en_US/release_notes_6_2.rst @@ -22,6 +22,7 @@ Bug fixes | `Issue #6780 `_ - Ensure that columns should be merged if the newly added column is present in the parent table. | `Issue #6809 `_ - Fixed an issue where pgAdmin is not opening properly. | `Issue #6859 `_ - Fixed an issue where properties panel is not updated when any object is added from the browser tree. +| `Issue #6939 `_ - Fixed an issue where older server group name displayed in the confirmation pop-up when the user removes server group. | `Issue #6940 `_ - Fixed an issue where user details are not shown when the non-admin user tries to connect to the shared server. | `Issue #6949 `_ - Ensure that dialog should be opened when clicking on Reassign/Drop owned menu. | `Issue #6954 `_ - Ensure that changing themes should work on Windows when system high contrast mode is enabled. diff --git a/web/package.json b/web/package.json index ae4a7af50..683ea009f 100644 --- a/web/package.json +++ b/web/package.json @@ -136,7 +136,7 @@ "path-fx": "^2.0.0", "pathfinding": "^0.4.18", "paths-js": "^0.4.9", - "pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#ab0af8e27c7bf24a750c998461c5a7aec2d4624f", + "pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#bc37afd0dd515229364d289e5d177cc31a5492bb", "postcss": "^8.2.15", "raf": "^3.4.1", "react": "^17.0.1", diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index 3f662a115..6be59dd97 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -1441,6 +1441,7 @@ define('pgadmin.browser', [ '_label': this.new._label, 'label': this.new.label, }); + this.t.update(ctx.i, this.new); this.t.setLabel(ctx.i, {label: this.new.label}); this.t.addIcon(ctx.i, {icon: this.new.icon}); this.t.setId(ctx.i, {id: this.new.id}); diff --git a/web/pgadmin/static/js/tree/tree.js b/web/pgadmin/static/js/tree/tree.js index 3ca4ee533..5f0700275 100644 --- a/web/pgadmin/static/js/tree/tree.js +++ b/web/pgadmin/static/js/tree/tree.js @@ -81,7 +81,7 @@ export class Tree { } async update(item, data) { - await this.tree.update(item, data.itemData); + await this.tree.update(item, data); } async remove(item) { diff --git a/web/pgadmin/static/js/tree/tree_nodes.ts b/web/pgadmin/static/js/tree/tree_nodes.ts index 3d75067dd..4a35b74f4 100644 --- a/web/pgadmin/static/js/tree/tree_nodes.ts +++ b/web/pgadmin/static/js/tree/tree_nodes.ts @@ -30,8 +30,8 @@ export class ManageTreeNodes { }) public updateNode = (_path, _data) => new Promise((res, rej) => { - if (_path in this.tree) { - const item = this.tree[_path]; + const item = this.findNode(_path); + if (item) { item.name = _data.label; item.metadata.data = _data; }