Skip to content

[4.0] Fix Debug plugin to display query parameters#30717

Merged
wilsonge merged 6 commits intojoomla:4.0-devfrom
Fedik:debug-query-params
Sep 22, 2020
Merged

[4.0] Fix Debug plugin to display query parameters#30717
wilsonge merged 6 commits intojoomla:4.0-devfrom
Fedik:debug-query-params

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Sep 21, 2020

As additional to #30580

Summary of Changes

This fixing displaying of the SQL query parameters in debugBar.
Also optimised "Call Stack" rendering, that saves ~0.3s for rendering in my tests.

Testing Instructions

Apply path, run npm install

Actual result BEFORE applying this Pull Request

Not possible to view the query parameters

Expected result AFTER applying this Pull Request

Click on "Params" icon to show the table with used query parameters

Screenshot_2020-09-21_14-28-09

Documentation Changes Required

none

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels Sep 21, 2020
@richard67
Copy link
Member

Adding release blocker label as the original issue #30318 had it, and PR #30580 had only fixed one aspect while this PR now fixes the remaining issue.

@richard67
Copy link
Member

I have tested this item ✅ successfully on 9a522d0

Tested with "MySQLi", "MySQL (PDO)" and "PostgreSQL (PDO)" databases and drivers.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30717.

@richard67
Copy link
Member

richard67 commented Sep 21, 2020

@Fedik Maybe there is a small improvement possible?

The call stack and the query plan have a bold heading, see green frame in the below screenshot.

Would be nice to have something like that, e.g. "Query Parameters", for the parameters, too.

2020-09-21_01

And there is a little inconsistency, the "Call Stack" heading is only capitalized, but the "QUERY PLAN" is completely uppercase. Maybe the "QUERY PLAN" can be changed to "Query Plan"?

No need to do it with this PR here, future PR is also ok for me.

@Fedik
Copy link
Member Author

Fedik commented Sep 21, 2020

"Call Stack" heading is only capitalized, but the "QUERY PLAN" is completely uppercase.

"Explain table" rendered based on SQL response.
"QUERY PLAN" comes from SQL response for PostgreSQL, similar for MySQL headings all table columns comes from SQL response.

And "Call Stack" is hard-coded in the debugbar.

@richard67
Copy link
Member

@Fedik And a heading for the parameters table, e.g. "Query Parameters", can that be added?

@Fedik
Copy link
Member Author

Fedik commented Sep 21, 2020

Added, and update a styling a bit, to make it a little better readable

@richard67
Copy link
Member

I have tested this item ✅ successfully on 32565fc

@Fedik You are my hero ;-)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30717.

@richard67
Copy link
Member

@alikon Please test this PR here ... am sure you will like it 😄

@alikon
Copy link
Contributor

alikon commented Sep 21, 2020

using the Prebuilt package i've got strange results
image

i'll re-test later on a proper npm environment

@Fedik
Copy link
Member Author

Fedik commented Sep 21, 2020

yea, that exact result with old JS

@Quy
Copy link
Contributor

Quy commented Sep 21, 2020

I have tested this item ✅ successfully on 32565fc


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30717.

@Quy
Copy link
Contributor

Quy commented Sep 21, 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30717.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 21, 2020
@wilsonge wilsonge merged commit 6259510 into joomla:4.0-dev Sep 22, 2020
@wilsonge
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 22, 2020
@wilsonge wilsonge added this to the Joomla 4.0 milestone Sep 22, 2020
@Fedik Fedik deleted the debug-query-params branch September 23, 2020 07:37
dgrammatiko added a commit to dgrammatiko/joomla-cms that referenced this pull request Sep 26, 2020
* Joomla/4.0-dev: (844 commits)
  [4.0] Template layout select (joomla#30772)
  [4.0][CLI] com_finder use console command (joomla#30768)
  [4.0] Modifying com_actionlogs string (joomla#30758)
  [4.0] Fancy selectbox fix (joomla#30739)
  [4.0] Add missing Table Caption (joomla#30763)
  [4.0] Wrap all buttons in btn-group to improve styling (joomla#30761)
  [4.0] Cassiopeia missing string (joomla#30765)
  Improve batch text (joomla#28447)
  Fix icons not displaying (joomla#30749)
  Remove the chrome "cardGrey". The same effect can be achieved by using the module class "card-grey" with the "card" chrome (joomla#30734)
  Remove obsolete html code (joomla#30737)
  [4.0] Check out improvements related to nullable columns (joomla#30747)
  Removing card.scss overrides as we don't use those classes
  Use renderField() method to render fields (joomla#30738)
  [4.0] spelling (joomla#30742)
  [4.0] Remove use of ReflectionParameter::getClass() (joomla#30581)
  [4.0] Fix saving images (joomla#30730)
  [4.0] Cleanup cassiopeia chromes and rename "default" to "card" (joomla#30729)
  Fix hiddenLabel and add hiddenLegend form attribute (joomla#29710)
  [4.0] Fix Debug plugin to display query parameters (joomla#30717)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants