public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
4+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
@ 2017-02-06 05:40 Murtuza Zabuawala <[email protected]>
  2017-02-06 10:01 ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Dave Page <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Murtuza Zabuawala @ 2017-02-06 05:40 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

PFA patch to fix the issue with Graphical Explain plan functionality which
was breaking for INSERT/UPDATE/DELETE explain plans.
RM#2133

*Issue:* It was due to typo in imageMapper object.

Please review.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

diff --git a/web/pgadmin/misc/templates/explain/js/explain.js b/web/pgadmin/misc/templates/explain/js/explain.js
index 382fd61..3c4c6d9 100644
--- a/web/pgadmin/misc/templates/explain/js/explain.js
+++ b/web/pgadmin/misc/templates/explain/js/explain.js
@@ -145,11 +145,11 @@ var imageMapper = {
   }
 },
 "ModifyTable" : function(data) {
-  switch (data['Operaton']) {
-    case "insert": return { "image":"ex_insert.png",
+  switch (data['Operation']) {
+    case "Insert": return { "image":"ex_insert.png",
                             "image_text":"Insert"
                            };
-    case "update": return {"image":"ex_update.png","image_text":"Update"};
+    case "Update": return {"image":"ex_update.png","image_text":"Update"};
     case "Delete": return {"image":"ex_delete.png","image_text":"Delete"};
   }
 },


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [text/plain] Fix_graphical_explain_issue.diff (828B, 3-Fix_graphical_explain_issue.diff)
  download | inline diff:
diff --git a/web/pgadmin/misc/templates/explain/js/explain.js b/web/pgadmin/misc/templates/explain/js/explain.js
index 382fd61..3c4c6d9 100644
--- a/web/pgadmin/misc/templates/explain/js/explain.js
+++ b/web/pgadmin/misc/templates/explain/js/explain.js
@@ -145,11 +145,11 @@ var imageMapper = {
   }
 },
 "ModifyTable" : function(data) {
-  switch (data['Operaton']) {
-    case "insert": return { "image":"ex_insert.png",
+  switch (data['Operation']) {
+    case "Insert": return { "image":"ex_insert.png",
                             "image_text":"Insert"
                            };
-    case "update": return {"image":"ex_update.png","image_text":"Update"};
+    case "Update": return {"image":"ex_update.png","image_text":"Update"};
     case "Delete": return {"image":"ex_delete.png","image_text":"Delete"};
   }
 },


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
  2017-02-06 05:40 [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
@ 2017-02-06 10:01 ` Dave Page <[email protected]>
  2017-02-06 10:33   ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Page @ 2017-02-06 10:01 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers

Hi

On Mon, Feb 6, 2017 at 5:40 AM, Murtuza Zabuawala
<[email protected]> wrote:
> Hi,
>
> PFA patch to fix the issue with Graphical Explain plan functionality which
> was breaking for INSERT/UPDATE/DELETE explain plans.
> RM#2133
>
> Issue: It was due to typo in imageMapper object.
>
> Please review.

It's a definite improvement, but still isn't quite right - see the
attached screenshot for example; the node name should be pem.agent
shouldn't it (or 'Delete' or 'Delete from pem.agent')?


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

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


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [image/png] Screen Shot 2017-02-06 at 09.57.38.png (27.1K, 2-Screen%20Shot%202017-02-06%20at%2009.57.38.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
  2017-02-06 05:40 [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
  2017-02-06 10:01 ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Dave Page <[email protected]>
@ 2017-02-06 10:33   ` Murtuza Zabuawala <[email protected]>
  2017-02-06 10:45     ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Dave Page <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Murtuza Zabuawala @ 2017-02-06 10:33 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

Hi Dave,

With Same query I am getting proper output same as pgAdmin3.
Can you hard refresh browser & try again?


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Mon, Feb 6, 2017 at 3:31 PM, Dave Page <[email protected]> wrote:

> Hi
>
> On Mon, Feb 6, 2017 at 5:40 AM, Murtuza Zabuawala
> <[email protected]> wrote:
> > Hi,
> >
> > PFA patch to fix the issue with Graphical Explain plan functionality
> which
> > was breaking for INSERT/UPDATE/DELETE explain plans.
> > RM#2133
> >
> > Issue: It was due to typo in imageMapper object.
> >
> > Please review.
>
> It's a definite improvement, but still isn't quite right - see the
> attached screenshot for example; the node name should be pem.agent
> shouldn't it (or 'Delete' or 'Delete from pem.agent')?
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [image/png] Screen Shot 2017-02-06 at 4.01.37 pm.png (188.0K, 3-Screen%20Shot%202017-02-06%20at%204.01.37%20pm.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
  2017-02-06 05:40 [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
  2017-02-06 10:01 ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Dave Page <[email protected]>
  2017-02-06 10:33   ` Re: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
@ 2017-02-06 10:45     ` Dave Page <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Page @ 2017-02-06 10:45 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers

On Mon, Feb 6, 2017 at 10:33 AM, Murtuza Zabuawala
<[email protected]> wrote:
> Hi Dave,
>
> With Same query I am getting proper output same as pgAdmin3.
> Can you hard refresh browser & try again?

That's really weird - it's working now. It was a single-file change,
and when I tested it went from failing to display the node properly at
all, to displaying it with the incorrect label, so it must have loaded
an update.

Oh well - it works now, so patch applied.

Thanks!

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

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


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-02-06 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 05:40 [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries Murtuza Zabuawala <[email protected]>
2017-02-06 10:01 ` Dave Page <[email protected]>
2017-02-06 10:33   ` Murtuza Zabuawala <[email protected]>
2017-02-06 10:45     ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox