From 30051f32575bb7951c4c0420f82ac1d7dc750b8d Mon Sep 17 00:00:00 2001 From: Anil Sahoo Date: Tue, 16 Jul 2024 17:42:16 +0530 Subject: [PATCH] Fixed an issue where Reassign/Drop Owned dialog not opening for Role. #7663 --- .../server_groups/servers/roles/static/js/roleReassign.js | 2 +- web/pgadmin/static/js/UtilityView.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/roles/static/js/roleReassign.js b/web/pgadmin/browser/server_groups/servers/roles/static/js/roleReassign.js index 8ebdfbe55..7415eb757 100644 --- a/web/pgadmin/browser/server_groups/servers/roles/static/js/roleReassign.js +++ b/web/pgadmin/browser/server_groups/servers/roles/static/js/roleReassign.js @@ -209,7 +209,7 @@ export function showRoleReassign() { }); pgAdmin.Browser.Events.trigger('pgadmin:utility:show', item, - gettext(gettext(`Reassign/Drop Owned - ${data.label}`), treeNodeInfo.table.label),{ + gettext(`Reassign/Drop Owned - ${data.label}`),{ schema, extraData, urlBase, sqlHelpUrl, helpUrl, saveBtnName: gettext('Reassign/Drop'), }, pgAdmin.Browser.stdW.md ); diff --git a/web/pgadmin/static/js/UtilityView.jsx b/web/pgadmin/static/js/UtilityView.jsx index 000d7d427..6ef0ae339 100644 --- a/web/pgadmin/static/js/UtilityView.jsx +++ b/web/pgadmin/static/js/UtilityView.jsx @@ -43,8 +43,10 @@ export default function UtilityView() { gettext('Error'), gettext(data.errormsg) ); - } else { + } else if(data.data) { pgAdmin.Browser.BgProcessManager.startProcess(data.data.job_id, data.data.desc); + } else if(data.info) { + pgAdmin.Browser.notifier.success(data.info); } pgAdmin.Browser.docker.close(panelId); })} @@ -77,7 +79,7 @@ function UtilityViewContent({panelId, schema, treeNodeInfo, actionType, formType /* button icons */ const saveBtnIcon = extraData.save_btn_icon; - /* Node type & Noen obj*/ + /* Node type & Node obj*/ let nodeObj = extraData.nodeType? pgAdmin.Browser.Nodes[extraData.nodeType]: undefined; let itemNodeData = extraData?.itemNodeData ? itemNodeData: undefined;