[pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Akshay Joshi
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

RM_3589.patch (12K) Download Attachment
IE_Issue.png (98K) Download Attachment
IE_Issue.png (98K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Akshay Joshi
Hi Hackers

I didn't find the solution to show embedded SVG in Internet Explorer, so I have disabled the "Download" button for Internet Explorer. Added new function to get the browser name and version.

Attached is the modified patch, please review it. 

On Mon, Dec 3, 2018 at 6:39 PM Akshay Joshi <[hidden email]> wrote:
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

RM_3589_v2.patch (974K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Dave Page-7
Hi

On Thu, Dec 6, 2018 at 6:51 AM Akshay Joshi <[hidden email]> wrote:
Hi Hackers

I didn't find the solution to show embedded SVG in Internet Explorer, so I have disabled the "Download" button for Internet Explorer. Added new function to get the browser name and version.

Attached is the modified patch, please review it. 

Looking good. A few thoughts though:

- Can we add tests? I'm not sure if it's feasible to just save a plan and then check the contents look sane though, due to the download dialogue.

- The plan isn't overly helpful without the stats. Can you think of any way we can include them - e.g. is it possible to do mouseovers in pure SVG? Or perhaps we need to render a number of tables below the diagram?
 

On Mon, Dec 3, 2018 at 6:39 PM Akshay Joshi <[hidden email]> wrote:
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Akshay Joshi
Hi Dave
On Thu, Dec 6, 2018 at 2:45 PM Dave Page <[hidden email]> wrote:
Hi

On Thu, Dec 6, 2018 at 6:51 AM Akshay Joshi <[hidden email]> wrote:
Hi Hackers

I didn't find the solution to show embedded SVG in Internet Explorer, so I have disabled the "Download" button for Internet Explorer. Added new function to get the browser name and version.

Attached is the modified patch, please review it. 

Looking good. A few thoughts though:

- Can we add tests? I'm not sure if it's feasible to just save a plan and then check the contents look sane though, due to the download dialogue.

      You are talking about feature tests. If yes then it's been difficult because each browser have different download dialog.  

- The plan isn't overly helpful without the stats. Can you think of any way we can include them - e.g. is it possible to do mouseovers in pure SVG? Or perhaps we need to render a number of tables below the diagram?

      I'll try to include tooltips on mouseover in pure SVG.  
 

On Mon, Dec 3, 2018 at 6:39 PM Akshay Joshi <[hidden email]> wrote:
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Akshay Joshi
Hi Dave/Hackers


On Thu, Dec 6, 2018 at 3:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Dave
On Thu, Dec 6, 2018 at 2:45 PM Dave Page <[hidden email]> wrote:
Hi

On Thu, Dec 6, 2018 at 6:51 AM Akshay Joshi <[hidden email]> wrote:
Hi Hackers

I didn't find the solution to show embedded SVG in Internet Explorer, so I have disabled the "Download" button for Internet Explorer. Added new function to get the browser name and version.

Attached is the modified patch, please review it. 

Looking good. A few thoughts though:

- Can we add tests? I'm not sure if it's feasible to just save a plan and then check the contents look sane though, due to the download dialogue.

      You are talking about feature tests. If yes then it's been difficult because each browser have different download dialog.  

- The plan isn't overly helpful without the stats. Can you think of any way we can include them - e.g. is it possible to do mouseovers in pure SVG? Or perhaps we need to render a number of tables below the diagram?

      I'll try to include tooltips on mouseover in pure SVG.  

        Attached is the updated patch where I have added tooltips on mouseover in pure SVG. I have added the <title> tag to solve this issue. 
        I have also increase the stroke-width of the lines. Please review it.
 

On Mon, Dec 3, 2018 at 6:39 PM Akshay Joshi <[hidden email]> wrote:
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

RM_3589_v3.patch (976K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [pgAdmin4][Patch]: RM #3589 Allow user to save/download Explain plan as JPEG/SVG format

Dave Page-7
Hi

Thanks - patch applied.

I think we need further work on the plan line width though - they're thicker, but I still don't see obvious differences based on the cost. Maybe look at the algorithm used in pgAdmin3?

On Mon, Dec 10, 2018 at 6:20 AM Akshay Joshi <[hidden email]> wrote:
Hi Dave/Hackers


On Thu, Dec 6, 2018 at 3:16 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Dave
On Thu, Dec 6, 2018 at 2:45 PM Dave Page <[hidden email]> wrote:
Hi

On Thu, Dec 6, 2018 at 6:51 AM Akshay Joshi <[hidden email]> wrote:
Hi Hackers

I didn't find the solution to show embedded SVG in Internet Explorer, so I have disabled the "Download" button for Internet Explorer. Added new function to get the browser name and version.

Attached is the modified patch, please review it. 

Looking good. A few thoughts though:

- Can we add tests? I'm not sure if it's feasible to just save a plan and then check the contents look sane though, due to the download dialogue.

      You are talking about feature tests. If yes then it's been difficult because each browser have different download dialog.  

- The plan isn't overly helpful without the stats. Can you think of any way we can include them - e.g. is it possible to do mouseovers in pure SVG? Or perhaps we need to render a number of tables below the diagram?

      I'll try to include tooltips on mouseover in pure SVG.  

        Attached is the updated patch where I have added tooltips on mouseover in pure SVG. I have added the <title> tag to solve this issue. 
        I have also increase the stroke-width of the lines. Please review it.
 

On Mon, Dec 3, 2018 at 6:39 PM Akshay Joshi <[hidden email]> wrote:
Hi Hackers, 

I am currently working on Feature 3589 "Allow user to save/download Explain plan as JPEG/SVG format."  I have added one download button to the toolbar in "Explain" tab, when clicked it will download the explain plan as a SVG file.

To add this feature I'll have to modify the logic, so instead of providing relative path of each plan (svg image), I have embedded the binary data which is required to download the Explain plan.

I have tested it on following:
Attached is the working patch for the above except Internet Explorer. I have tried a lot to figure out the solution, but unable to fix the issue. Need help/suggestions how to fix the issue on Internet Explorer. 

--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Akshay Joshi
Sr. Software Architect


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company