Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Thanks!
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4 https://wiki.phpmyadmin.net/pma/Page_loader
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4 https://wiki.phpmyadmin.net/pma/Page_loader
That not help me, I want to handle response data, get information and put them to console log...
-- Michal Čihař | http://cihar.com | http://phpmyadmin.net
The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4 https://wiki.phpmyadmin.net/pma/Page_loader
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for
the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
2014-05-26 17:56 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
I need global handlers handle my requests(show query result just like click a link), also need my handlers handle response data(update console messages).
-- Atul Pratap Singh http://blog.atulsisodia.in/
The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:56 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
I need global handlers handle my requests(show query result just like click a link), also need my handlers handle response data(update console messages).
So you mean that you want global handlers to send requests for you and you want to handle response yourself? Well then why not write custom handlers?
Or if you mean something else please explain more.
2014-05-26 18:19 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:56 GMT+08:00 Atul Pratap Singh <
atulpratapsingh05@gmail.com>:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
Hi, I'm writing console.js AJAX part. But I see two global AJAX handlers, if I want to use them, is that means I can't handle the response event? How can I write own response callback while using global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
I need global handlers handle my requests(show query result just like click a link), also need my handlers handle response data(update console messages).
So you mean that you want global handlers to send requests for you and you want to handle response yourself? Well then why not write custom handlers?
Or if you mean something else please explain more.
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes out replace your currect page, AJAX.requestHandler will take this job, but console only shows query string, I need handle response data, so I can put results on console logs, and errors and other messages. Thanks :)
-- Atul Pratap Singh http://blog.atulsisodia.in/
The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
2014-05-26 18:43 GMT+08:00 Edward Cheng c4150221@gmail.com:
2014-05-26 18:19 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com :
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:56 GMT+08:00 Atul Pratap Singh <
atulpratapsingh05@gmail.com>:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
> Hi, I'm writing console.js AJAX part. > But I see two global AJAX handlers, if I want to > use them, is that means I can't handle the response > event? > How can I write own response callback while using > global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
I need global handlers handle my requests(show query result just like click a link), also need my handlers handle response data(update console messages).
So you mean that you want global handlers to send requests for you and you want to handle response yourself? Well then why not write custom handlers?
I need global handlers push old page to AJAX.cache, and display new one.
is this the right way: write custom requestHandler, and call AJAX.responseHandler in my custom haldnler?
Or if you mean something else please explain more.
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes out replace your currect page, AJAX.requestHandler will take this job, but console only shows query string, I need handle response data, so I can put results on console logs, and errors and other messages. Thanks :)
-- Atul Pratap Singh http://blog.atulsisodia.in/
The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl... _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
-- Edward Cheng
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 18:19 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:56 GMT+08:00 Atul Pratap Singh <
atulpratapsingh05@gmail.com>:
On 5/26/14, Edward Cheng c4150221@gmail.com wrote:
2014-05-26 17:22 GMT+08:00 Michal Čihař michal@cihar.com:
Hi
Dne Mon, 26 May 2014 16:59:54 +0800 Edward Cheng c4150221@gmail.com napsal(a):
> Hi, I'm writing console.js AJAX part. > But I see two global AJAX handlers, if I want to > use them, is that means I can't handle the response > event? > How can I write own response callback while using > global handlers?
Maybe following wiki pages will help you:
https://wiki.phpmyadmin.net/pma/Generating_pages_and_ajax_responses_in_pma4
That not help me, I want to handle response data, get information and put them to console log...
From https://wiki.phpmyadmin.net/pma/Page_loader I get:- "In order for the generic page loader not to handle such cases, it is necessary to add an "ajax" class to the link or form"
So you can of course write your custom handler and handle response your own way. You just need to add class "ajax" to your element for it to work.
I need global handlers handle my requests(show query result just like click a link), also need my handlers handle response data(update console messages).
So you mean that you want global handlers to send requests for you and you want to handle response yourself? Well then why not write custom handlers?
Or if you mean something else please explain more.
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes out replace your currect page, AJAX.requestHandler will take this job,
For executing and fetching query results, please also take a look at existing system in sql.js where custom handler is written for #sqlqueryform.ajax. So I think you could just pass the query to this existing system and page replacing will happen.
About pushing subsequent sql result pages to AJAX.cache, I think it is not required and is not done right now. We currently push to AJAX.cache when user switches between different tabs etc. and not for subsequent sql result pages.
but console only shows query string, I need handle response data, so I can put results on console logs, and errors and other messages. Thanks :)
So console div would be out of page_content and will not be removed/replaced as queries get executed from the console. For this also, I think you can write a custom handler.
On May 26, 2014 4:39:16 PM GMT+05:30, Atul Pratap Singh atulpratapsingh05@gmail.com wrote:
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes
out
replace your currect page, AJAX.requestHandler will take this job,
For executing and fetching query results, please also take a look at existing system in sql.js where custom handler is written for #sqlqueryform.ajax. So I think you could just pass the query to this existing system and page replacing will happen.
About pushing subsequent sql result pages to AJAX.cache, I think it is not required and is not done right now. We currently push to AJAX.cache when user switches between different tabs etc. and not for subsequent sql result pages.
but console only shows query string, I need handle response data, so
I can put results
on console logs, and errors and other messages. Thanks :)
So console div would be out of page_content and will not be removed/replaced as queries get executed from the console. For this also, I think you can write a custom handler.
Also, you can update console success/error messages from the sqlqueryform handler itself as you get the response.
Thank you:)
2014-05-26 19:19 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
On May 26, 2014 4:39:16 PM GMT+05:30, Atul Pratap Singh <
atulpratapsingh05@gmail.com> wrote:
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes
out
replace your currect page, AJAX.requestHandler will take this job,
For executing and fetching query results, please also take a look at existing system in sql.js where custom handler is written for #sqlqueryform.ajax. So I think you could just pass the query to this existing system and page replacing will happen.
About pushing subsequent sql result pages to AJAX.cache, I think it is not required and is not done right now. We currently push to AJAX.cache when user switches between different tabs etc. and not for subsequent sql result pages.
but console only shows query string, I need handle response data, so
I can put results
on console logs, and errors and other messages. Thanks :)
So console div would be out of page_content and will not be removed/replaced as queries get executed from the console. For this also, I think you can write a custom handler.
Also, you can update console success/error messages from the sqlqueryform
handler itself as you get the response.
-- Atul Pratap Singh Sent from my Android device
------------------------------------------------------------------------------
The best possible search technologies are now affordable for all
companies.
Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl...
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
-- Edward Cheng
I'm writting AJAX part now. Have a look at this commit: https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e8... See my comment on it: For get response data I add a param, run between requestHandler and responseHandler. Now middle handler runs well, but I can't send message ID to PMA_console._responseMidHandler, my questions are: 1. Is the middle handler OK? Or is there another way to custom my AJAX request(I need pages jump use global AJAX handlers) 2. How to send message ID to my custom handler? If must modifi PHP scripts, which should I modifi?
Thanks!
2014-05-26 19:22 GMT+08:00 Edward Cheng c4150221@gmail.com:
Thank you:)
2014-05-26 19:19 GMT+08:00 Atul Pratap singh <atulpratapsingh05@gmail.com
:
On May 26, 2014 4:39:16 PM GMT+05:30, Atul Pratap Singh <
atulpratapsingh05@gmail.com> wrote:
Yeah, I made a console, you can type queries, execute queries, and check logs on it. When you type a query, press ctrl+enter you'll see the result comes
out
replace your currect page, AJAX.requestHandler will take this job,
For executing and fetching query results, please also take a look at existing system in sql.js where custom handler is written for #sqlqueryform.ajax. So I think you could just pass the query to this existing system and page replacing will happen.
About pushing subsequent sql result pages to AJAX.cache, I think it is not required and is not done right now. We currently push to AJAX.cache when user switches between different tabs etc. and not for subsequent sql result pages.
but console only shows query string, I need handle response data, so
I can put results
on console logs, and errors and other messages. Thanks :)
So console div would be out of page_content and will not be removed/replaced as queries get executed from the console. For this also, I think you can write a custom handler.
Also, you can update console success/error messages from the
sqlqueryform handler itself as you get the response.
-- Atul Pratap Singh Sent from my Android device
The best possible search technologies are now affordable for all
companies.
Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no
commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl...
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
-- Edward Cheng
Edward,
On Fri, May 30, 2014 at 2:02 PM, Edward Cheng c4150221@gmail.com wrote:
I'm writting AJAX part now. Have a look at this commit:
https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e8... See my comment on it: For get response data I add a param, run between requestHandler and responseHandler.
As I understand, this mid-handler is your responsehandler that subsequently makes a call to the generic responsehandler of ajax.js. So it is not a real custom handler (that requests + handles response independent of the generic one)
Also, as I understand from your code, the proposed console would store a log of run queries and on running a query from console, the results will be displayed in the same way as happens when running a query from SQL tab. Right ?
As per this understanding, you need a real custom handler because executing SQL and handling its response in PMA involves many custom checks and calls not only at response stage but also at request stage. For ex:- - checkSqlQuery() - bookmark handling - reloading navigation for certain queries - refreshing main panel for certain queries - triggering grid edit for results etc. see in sql.js near $("#sqlqueryform.ajax").live('submit', function (event) {
Or did you plan to duplicate above checks and calls into your midhandler?
Also, I don't understand why you need to call the generic response-handler of ajax.js? Remember that we don't need to populate AJAX.cache either.
Now middle handler runs well, but I can't send message ID to PMA_console._responseMidHandler, my questions are:
- Is the middle handler OK? Or is there another way to
custom my AJAX request(I need pages jump use global AJAX handlers)
Yes, you need to totally skip the generc/global AJAX handlers, for that you add a "class=ajax" to your form and write a custom handler.
2014-05-30 19:08 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
Edward,
On Fri, May 30, 2014 at 2:02 PM, Edward Cheng c4150221@gmail.com wrote:
I'm writting AJAX part now. Have a look at this commit:
https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e8... See my comment on it: For get response data I add a param, run between requestHandler and responseHandler.
As I understand, this mid-handler is your responsehandler that subsequently makes a call to the generic responsehandler of ajax.js. So it is not a real custom handler (that requests + handles response independent of the generic one)
Also, as I understand from your code, the proposed console would store a log of run queries and on running a query from console, the results will be displayed in the same way as happens when running a query from SQL tab. Right ?
Sometimes people'll run queries on console while they're browsing other pages, not SQL tab.
As per this understanding, you need a real custom handler because executing SQL and handling its response in PMA involves many custom checks and calls not only at response stage but also at request stage. For ex:-
checkSqlQuery()
Sorry I don't get this :), just run it if some errors we can wait response to tell users
- bookmark handling
Bookmark handling will use another functions and send another AJAX request, old way is not good enough.
reloading navigation for certain queries
reloading navigation, global handlers take this job is better
- refreshing main panel for certain queries
Do you main #page_content ?
- triggering grid edit for results
etc. see in sql.js near $("#sqlqueryform.ajax").live('submit', function (event) {
I have noticed this handler.
Or did you plan to duplicate above checks and calls into your midhandler?
No, midhandler just get result and append to console corresponding message(e.g. shows under query string "SELECT * FROM `mysql`.`user`")
Also, I don't understand why you need to call the generic response-handler of ajax.js? Remember that we don't need to populate AJAX.cache either.
My eng is not very well, so I draw a picture, see attachment
Thanks :)
Now middle handler runs well, but I can't send message ID to PMA_console._responseMidHandler, my questions are:
- Is the middle handler OK? Or is there another way to
custom my AJAX request(I need pages jump use global AJAX handlers)
Yes, you need to totally skip the generc/global AJAX handlers, for that you add a "class=ajax" to your form and write a custom handler.
-- Regards
Atul Pratap Singh http://blog.atulsisodia.in/
Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On May 30, 2014 6:15:51 PM GMT+05:30, Edward Cheng c4150221@gmail.com wrote:
2014-05-30 19:08 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
Edward,
On Fri, May 30, 2014 at 2:02 PM, Edward Cheng c4150221@gmail.com
wrote:
I'm writting AJAX part now. Have a look at this commit:
https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e8...
See my comment on it: For get response data I add a param, run between requestHandler
and
responseHandler.
As I understand, this mid-handler is your responsehandler that subsequently makes a call to the generic responsehandler of ajax.js.
So it
is not a real custom handler (that requests + handles response
independent
of the generic one)
Also, as I understand from your code, the proposed console would
store a
log of run queries and on running a query from console, the results
will be
displayed in the same way as happens when running a query from SQL
tab.
Right ?
Sometimes people'll run queries on console while they're browsing other pages, not SQL tab.
As per this understanding, you need a real custom handler because executing SQL and handling its response in PMA involves many custom
checks
and calls not only at response stage but also at request stage. For
ex:-
checkSqlQuery()
Sorry I don't get this :), just run it if some errors we can wait response to tell users
- bookmark handling
Bookmark handling will use another functions and send another AJAX request, old way is not good enough.
reloading navigation for certain queries
reloading navigation, global handlers take this job is better
- refreshing main panel for certain queries
Do you main #page_content ?
- triggering grid edit for results
etc. see in sql.js near $("#sqlqueryform.ajax").live('submit',
function
(event) {
I have noticed this handler.
Or did you plan to duplicate above checks and calls into your
midhandler?
No, midhandler just get result and append to console corresponding message(e.g. shows under query string "SELECT
- FROM `mysql`.`user`")
Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the console. My previous reply was according to that understanding. Also, please tell me about the following details..
- I am still unclear about warnings etc. that we display for certain queries like DROP, will we warn the user when executing such queries from console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the selected database and update the navigation and main panel? Same will be required for ALTER queries etc.. Here I am pointing to the overall relation and synchronization between console and rest of the application.
- And would you store the sql query logs only or the sql results history as well? I think as the results may change at any time, storing queries only should be fine.
2014-05-30 22:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
On May 30, 2014 6:15:51 PM GMT+05:30, Edward Cheng c4150221@gmail.com wrote:
2014-05-30 19:08 GMT+08:00 Atul Pratap Singh atulpratapsingh05@gmail.com:
Edward,
On Fri, May 30, 2014 at 2:02 PM, Edward Cheng c4150221@gmail.com
wrote:
I'm writting AJAX part now. Have a look at this commit:
https://github.com/WhaleWatching/phpmyadmin/commit/a382070ee42b72474842d20e8...
See my comment on it: For get response data I add a param, run between requestHandler
and
responseHandler.
As I understand, this mid-handler is your responsehandler that subsequently makes a call to the generic responsehandler of ajax.js.
So it
is not a real custom handler (that requests + handles response
independent
of the generic one)
Also, as I understand from your code, the proposed console would
store a
log of run queries and on running a query from console, the results
will be
displayed in the same way as happens when running a query from SQL
tab.
Right ?
Sometimes people'll run queries on console while they're browsing other pages, not SQL tab.
As per this understanding, you need a real custom handler because executing SQL and handling its response in PMA involves many custom
checks
and calls not only at response stage but also at request stage. For
ex:-
checkSqlQuery()
Sorry I don't get this :), just run it if some errors we can wait response to tell users
- bookmark handling
Bookmark handling will use another functions and send another AJAX request, old way is not good enough.
reloading navigation for certain queries
reloading navigation, global handlers take this job is better
- refreshing main panel for certain queries
Do you main #page_content ?
- triggering grid edit for results
etc. see in sql.js near $("#sqlqueryform.ajax").live('submit',
function
(event) {
I have noticed this handler.
Or did you plan to duplicate above checks and calls into your
midhandler?
No, midhandler just get result and append to console corresponding message(e.g. shows under query string "SELECT
- FROM `mysql`.`user`")
Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the console. My previous reply was according to that understanding. Also, please tell me about the following details..
- I am still unclear about warnings etc. that we display for certain
queries like DROP, will we warn the user when executing such queries from console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the selected
database and update the navigation and main panel? Same will be required for ALTER queries etc.. Here I am pointing to the overall relation and synchronization between console and rest of the application.
These features can be added later, before execute there's PMA_console.execute(), after execute there's midHandler.
- And would you store the sql query logs only or the sql results history
as well? I think as the results may change at any time, storing queries only should be fine.
Yeah, data may change any time, but we still can store results, users know when a query should be re executed.
Alright, I'll change my design, store queries only, with bookmarks and history.
-- Atul Pratap Singh
Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On May 30, 2014 8:41:05 PM GMT+05:30, Edward Cheng c4150221@gmail.com wrote:
2014-05-30 22:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the
console.
My previous reply was according to that understanding. Also, please
tell me
about the following details..
- I am still unclear about warnings etc. that we display for certain
queries like DROP, will we warn the user when executing such queries
from
console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the
selected
database and update the navigation and main panel? Same will be
required
for ALTER queries etc.. Here I am pointing to the overall relation
and
synchronization between console and rest of the application.
These features can be added later, before execute there's PMA_console.execute(), after execute there's midHandler.
Ok, I will make few comments on the commit at github soon.
- And would you store the sql query logs only or the sql results
history
as well? I think as the results may change at any time, storing
queries
only should be fine.
Yeah, data may change any time, but we still can store results, users know when a query should be re executed.
Alright, I'll change my design, store queries only, with bookmarks and history.
Bookmarks are a part of sql tab I guess, why storing them here?
2014-05-31 0:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
On May 30, 2014 8:41:05 PM GMT+05:30, Edward Cheng c4150221@gmail.com wrote:
2014-05-30 22:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the
console.
My previous reply was according to that understanding. Also, please
tell me
about the following details..
- I am still unclear about warnings etc. that we display for certain
queries like DROP, will we warn the user when executing such queries
from
console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the
selected
database and update the navigation and main panel? Same will be
required
for ALTER queries etc.. Here I am pointing to the overall relation
and
synchronization between console and rest of the application.
These features can be added later, before execute there's PMA_console.execute(), after execute there's midHandler.
Ok, I will make few comments on the commit at github soon.
I replied.
- And would you store the sql query logs only or the sql results
history
as well? I think as the results may change at any time, storing
queries
only should be fine.
Yeah, data may change any time, but we still can store results, users know when a query should be re executed.
Alright, I'll change my design, store queries only, with bookmarks and history.
Bookmarks are a part of sql tab I guess, why storing them here?
Query window has history and bookmarks, yeah they also in SQL tab, but I think I can give them better experience.
-- Atul Pratap Singh
Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
2014-05-31 10:29 GMT+08:00 Edward Cheng c4150221@gmail.com:
2014-05-31 0:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
On May 30, 2014 8:41:05 PM GMT+05:30, Edward Cheng c4150221@gmail.com
wrote:
2014-05-30 22:45 GMT+08:00 Atul Pratap singh atulpratapsingh05@gmail.com:
Ok, so you plan to display query results in the console itself. I misunderstood some details from your proposal and thought that query results will be displayed in the main panel and query logs in the
console.
My previous reply was according to that understanding. Also, please
tell me
about the following details..
- I am still unclear about warnings etc. that we display for certain
queries like DROP, will we warn the user when executing such queries
from
console? Or would it be totally like mysql console?
- Also in case user puts a USE query in console, do we change the
selected
database and update the navigation and main panel? Same will be
required
for ALTER queries etc.. Here I am pointing to the overall relation
and
synchronization between console and rest of the application.
These features can be added later, before execute there's PMA_console.execute(), after execute there's midHandler.
Ok, I will make few comments on the commit at github soon.
I replied.
Now this feature spends my two days, remove it. I'll make this feature easy to add, if someday comes that shows we need it.
- And would you store the sql query logs only or the sql results
history
as well? I think as the results may change at any time, storing
queries
only should be fine.
Yeah, data may change any time, but we still can store results, users know when a query should be re executed.
Alright, I'll change my design, store queries only, with bookmarks and history.
Bookmarks are a part of sql tab I guess, why storing them here?
Query window has history and bookmarks, yeah they also in SQL tab, but I think I can give them better experience.
-- Atul Pratap Singh
Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
-- Edward Cheng