public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
Date: Mon, 6 Feb 2017 11:10:19 +0530
Message-ID: <CAKKotZQmA2OEFtTYpeSADrvPb89XDOwyniwfmdu9pg0ChA+zxg@mail.gmail.com> (raw)
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-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"};
   }
 },


view thread (4+ 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: [pgAdmin4][PATCH] To fix graphical explain for Insert/Update/Delete quries
  In-Reply-To: <CAKKotZQmA2OEFtTYpeSADrvPb89XDOwyniwfmdu9pg0ChA+zxg@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