public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rahul Shirsat <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin] Bug #5831 Internal server error displayed if user open query tool window inside view data
Date: Mon, 14 Sep 2020 17:37:19 +0530
Message-ID: <CAKtn9dOoZWZB0MxUAjH_WLd91aAFsneZ4GcPbzF3EXp-C_NeCw@mail.gmail.com> (raw)
In-Reply-To: <CAKtn9dOL5Rc2XzphArET6z-isQBQOTQNvmu-tOKft-XzKme5uQ@mail.gmail.com>
References: <CAKtn9dOL5Rc2XzphArET6z-isQBQOTQNvmu-tOKft-XzKme5uQ@mail.gmail.com>
Hi Hackers,
Please find below fixes :
1. Query editor via view/edit data - fixed panel title issue.
2. Fixed Schema diff panel title on new tab.
On Mon, Sep 14, 2020 at 2:28 PM Rahul Shirsat <
[email protected]> wrote:
> Hi Hackers,
>
> Please find the attached patch which fixes the open query tool window
> inside view data.
>
> --
> *Rahul Shirsat*
> Software Engineer | EnterpriseDB Corporation.
>
--
*Rahul Shirsat*
Software Engineer | EnterpriseDB Corporation.
Attachments:
[application/octet-stream] RM5831_v2.patch (2.1K, 3-RM5831_v2.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/schema_diff/templates/schema_diff/index.html b/web/pgadmin/tools/schema_diff/templates/schema_diff/index.html
index ef687b8e8..7fa7683d3 100644
--- a/web/pgadmin/tools/schema_diff/templates/schema_diff/index.html
+++ b/web/pgadmin/tools/schema_diff/templates/schema_diff/index.html
@@ -21,6 +21,7 @@ try {
{% block css_link %}
<link type="text/css" rel="stylesheet" href="{{ url_for('browser.browser_css')}}"/>
{% endblock %}
+{% block title %}{{editor_title}}{% endblock %}
{% block body %}
<div id="schema-diff-container">
<div id="diff_fetching_data" class="pg-sp-container schema-diff-busy-fetching d-none">
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index ce02a53cb..3646a9750 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -4302,13 +4302,24 @@ define('tools.querytool', [
'trans_id': transId,
});
- url_endpoint += `?is_query_tool=${that.url_params.is_query_tool}`
+ url_endpoint += `?is_query_tool=${true}`
+`&sgid=${that.url_params.sgid}`
+`&sid=${that.url_params.sid}`
- +`&server_type=${that.url_params.server_type}`
- +`&did=${that.url_params.did}`;
+ +`&server_type=${that.url_params.server_type}`;
- launchDataGrid(pgWindow.default.pgAdmin.DataGrid, transId, url_endpoint, that.url_params.title, '', alertify);
+ if(that.url_params.did) {
+ url_endpoint += `&did=${that.url_params.did}`;
+ }
+
+ let panel_title = that.url_params.title;
+ if(that.url_params.is_query_tool == 'false') {//check whether query tool is hit from View/Edit
+ var split_title = that.url_params.title.split('/');
+ if(split_title.length > 2) {
+ panel_title = split_title[split_title.length-2] + '/' + split_title[split_title.length-1];
+ }
+ }
+
+ launchDataGrid(pgWindow.default.pgAdmin.DataGrid, transId, url_endpoint, panel_title, '', alertify);
},
/*
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin] Bug #5831 Internal server error displayed if user open query tool window inside view data
In-Reply-To: <CAKtn9dOoZWZB0MxUAjH_WLd91aAFsneZ4GcPbzF3EXp-C_NeCw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox