Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Modular code for sql query box (page) and codemirror related pages #14493

Merged
merged 16 commits into from Aug 14, 2018

Conversation

Projects
None yet
3 participants
@Piyush3079
Copy link
Contributor

Piyush3079 commented Jul 20, 2018

This pr contains the files needed for modular code for making sql queries.

This pr is in continuation of the pr Mod_Js_Structuring_1. Before reviewing this pr review and merge Mod_Js_Structuring_1

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests
@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented Jul 20, 2018

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

1 similar comment
@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented Jul 29, 2018

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

@devenbansod devenbansod changed the base branch from master to gsoc-js-refactoring Aug 1, 2018

@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented Aug 1, 2018

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

@devenbansod devenbansod self-requested a review Aug 7, 2018

@devenbansod devenbansod self-assigned this Aug 7, 2018

@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented Aug 7, 2018

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

1 similar comment
@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented Aug 7, 2018

This pull requests contains too many commits, in most cases it is caused by wrong merge target. In case you have forked master branch you should also ask merging to master branch. See GitHub documentation for more details.

@devenbansod

This comment has been minimized.

Copy link
Member

devenbansod commented Aug 7, 2018

Please rebase

@Piyush3079

This comment has been minimized.

Copy link
Contributor Author

Piyush3079 commented Aug 7, 2018

This pr is not the next one, next pr is #14524, so we need to first complete this pr(#14524). Although I will rebase this also but we need to merge that first.

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch from 374c8d9 to f503797 Aug 7, 2018

@devenbansod

This comment has been minimized.

Copy link
Member

devenbansod commented Aug 9, 2018

Please rebase.

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch 10 times, most recently from 912910f to 7cc998d Aug 9, 2018

Piyush3079 added some commits May 14, 2018

Weekly progress.
1). Microhistory added in classes for modular code
2). Code is structured and camel casing of varables is done for removing linter warnings.
3). JQuery plugins are added in some files.
4). jQplot is working for server_status_queries and server_status_monitor.
5). Work started for Dabatase, SQl and Table files.
Some changes are stll left for server_status_monitor and sql.js
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Edit package.json for updated-jqplot package. Adding eslint scripts a…
…nd script for creating production build edited

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Adding jQplot package and its plugins and tablesorter are as module i…
…n js files and removed from php files.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
No need to review this commit as these files are directly copied from…
… old vendor and plugins folder. These files can be ignored during review.

They are not availabe as npm mpdule right now and their alternative are largerr in size with the same functionality.
So they are being used as it is.
Their size will be reduced in the outpul bundle after using webpack plugins to emove comments from js files.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Separating basic functions needed for initialising codemirror and inl…
…ine codemirror, saving and getting saved queries and making profiling charts.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Edit codemirror sql plugin for modular code.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Adding codemirror in pma console.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch from 7cc998d to fe5def0 Aug 10, 2018

Piyush3079 added some commits Jul 14, 2018

Adding variable used for codemirror in the head of the page at the to…
…p of the scripts.

Imports changes as per new directory stucture for sql.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Updating Sql utility function file, sql source file containing code f…
…or various sql related events, adding function for sql editor and inline sql editor in functions.js

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Ctrl plus enter to submit query event in functions.js
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Add modular Sql.js to table sql and database sql and SqlQueryForm mod…
…ified accordingly

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Add multi column sort in server_sql for add and remove column sort on…
… table browse.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
@phpmyadmin-bot

This comment has been minimized.

Copy link

phpmyadmin-bot commented on 91afae1 Aug 10, 2018

This commit is using tab character for indentation instead of spaces, what is mandated by phpMyAdmin. Please check our Developer guidelines for more information.

Offending files: js/src/plugins/jquery/jquery.sortableTable.js, js/src/plugins/jquery/jquery.tablesorter.js

This comment has been minimized.

Copy link

phpmyadmin-bot replied Aug 10, 2018

This commit contains trailing whitespace, what is prohibited in phpMyAdmin. Please check our Developer guidelines for more information.

Offending files: js/src/plugins/jquery/jquery.sortableTable.js

This comment has been minimized.

Copy link

phpmyadmin-bot replied Aug 10, 2018

This commit is using DOS end of line characters instead of UNIX ones, what is mandated by phpMyAdmin. Please check our Developer guidelines for more information.

Offending files: js/src/plugins/jquery/jquery.tablesorter.js

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch 5 times, most recently from 57d7f2f to 3b11fca Aug 11, 2018

@codecov

This comment has been minimized.

Copy link

codecov bot commented Aug 11, 2018

Codecov Report

Merging #14493 into gsoc-js-refactoring will increase coverage by 0.03%.
The diff coverage is 68.96%.

@@                    Coverage Diff                    @@
##             gsoc-js-refactoring   #14493      +/-   ##
=========================================================
+ Coverage                  50.53%   50.56%   +0.03%     
- Complexity                 14434    14439       +5     
=========================================================
  Files                        501      501              
  Lines                      68012    68002      -10     
=========================================================
+ Hits                       34372    34388      +16     
+ Misses                     33640    33614      -26
@devenbansod
Copy link
Member

devenbansod left a comment

LGTM, just a few minor comments.

Great job on this, I acknowledge these files were indeed tricky to manage given their dependencies strewn throughout.

$scripts->addFile('sql.js');
$scripts->addFile('makegrid.js');
// $scripts->addFile('makegrid.js');

This comment has been minimized.

@devenbansod

devenbansod Aug 14, 2018

Member

Please remove if not needed

if (codemirror_editor) {
$(codemirror_editor.getWrapperElement()).off('keydown');
}
// $(document).off('click', 'a.inline_edit_sql');

This comment has been minimized.

@devenbansod

devenbansod Aug 14, 2018

Member

Please remove if not needed

@@ -24,7 +25,7 @@
"js-cookie": "2.2.0",
"sprintf-js": "^1.1.1",
"tracekit": "0.4.5",
"updated-jqplot": "1.0.9",
"updated-jqplot": "1.0.9-2",

This comment has been minimized.

@devenbansod

devenbansod Aug 14, 2018

Member

Is such a specific version required?

This comment has been minimized.

@Piyush3079

Piyush3079 Aug 14, 2018

Author Contributor

The previous version was not working with webpack. It was giving some errors related to global scoping. so I have added this updated package.

$scripts->addFile('makegrid.js');
$scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
$scripts->addFile('sql.js');
// $scripts->addFile('makegrid.js');

This comment has been minimized.

@devenbansod

devenbansod Aug 14, 2018

Member

Remove if not required

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch from 82edabc to bc42ec9 Aug 14, 2018

Piyush3079 added some commits Jul 20, 2018

Comment code in js/functions.js to disable tirggering of codemirror l…
…oading from js/functions.js

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Separating sorting functions from multi_column_sort file.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Sql_Js branch from bc42ec9 to 5240ca6 Aug 14, 2018

Piyush3079 added some commits Aug 9, 2018

Resolving merge errors.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
Add jsoc to create documentation of JavaScript code.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>

@Piyush3079 Piyush3079 changed the title Mod js sql js Add Modular code for sql query box (page) and codemirror related pages Aug 14, 2018

@devenbansod devenbansod merged commit fc72f0d into phpmyadmin:gsoc-js-refactoring Aug 14, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
DCO All commits have a DCO sign-off from the author
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.