-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Import and Export Modularized #14469
Import and Export Modularized #14469
Conversation
Please rebase and remove conflicts. |
fee3432
to
6c119c9
Compare
Codecov Report
@@ Coverage Diff @@
## gsoc-js-refactoring #14469 +/- ##
======================================================
Coverage ? 49.93%
Complexity ? 14435
======================================================
Files ? 504
Lines ? 68973
Branches ? 0
======================================================
Hits ? 34442
Misses ? 34531
Partials ? 0 |
3b774a6
to
f6f397d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comments to increase the readability of the pr.
@@ -1,3 +1,5 @@ | |||
js/vendor/ | |||
tmp/ | |||
vendor/ | |||
js/dist/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some folders to avoid check of linting
@@ -56,3 +56,6 @@ composer.lock | |||
# NPM | |||
/node_modules/ | |||
yarn.lock | |||
# Javascript Bundle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some folders to gitignore to avoid pushing them to the repo
@@ -0,0 +1,678 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chart class needed for drawing chart of server_status_queries.php page
server_status_advisor: ['server_status_advisor'], | ||
server_status_processes: ['server_status_processes'], | ||
server_status_variables: ['server_status_variables'], | ||
user_password: ['server_privileges'] | ||
user_password: ['server_privileges'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other server related files and server import and export files are added to the object
@@ -0,0 +1,391 @@ | |||
/* vim: set expandtab sw=4 ts=4 sts=4: */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modular code for exporting sql.
Functions required for this file are imported from a files js/src/functions/export.js
@@ -20,7 +20,7 @@ | |||
$response = Response::getInstance(); | |||
$header = $response->getHeader(); | |||
$scripts = $header->getScripts(); | |||
$scripts->addFile('import.js'); | |||
$scripts->addFile('import'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js extension removed from file to enable dynamic import
@@ -26,7 +26,7 @@ | |||
$header = $response->getHeader(); | |||
$scripts = $header->getScripts(); | |||
$scripts->addFile('server_privileges'); | |||
$scripts->addFile('replication.js'); | |||
$scripts->addFile('replication'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js extension removed from file to enable dynamic import
@@ -30,8 +30,8 @@ | |||
$scripts->addFile('vendor/jqplot/plugins/jqplot.highlighter.js'); | |||
$scripts->addFile('vendor/jqplot/plugins/jqplot.enhancedPieLegendRenderer.js'); | |||
$scripts->addFile('vendor/jquery/jquery.tablesorter.js'); | |||
$scripts->addFile('server_status_sorter.js'); | |||
$scripts->addFile('server_status_queries.js'); | |||
$scripts->addFile('server_status_sorter'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js extension removed from file to enable dynamic import
@@ -23,7 +23,7 @@ | |||
$response = Response::getInstance(); | |||
$header = $response->getHeader(); | |||
$scripts = $header->getScripts(); | |||
$scripts->addFile('server_user_groups.js'); | |||
$scripts->addFile('server_user_groups'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.js extension removed from file to enable dynamic import
@@ -19,6 +19,6 @@ | |||
{#- If the time limit set is zero, then time out won't occur so no need | |||
to check for time out. -#} | |||
{%- if exec_time_limit > 0 %} | |||
onclick="check_time_out({{ exec_time_limit }})" | |||
data-timeout={{ exec_time_limit }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed inline onClick event which requires the function to be available in the global scope.
Added the value of timeOut in data and the add an event in export.js to make call to this function.
adding them in modular code. Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>
…queries, processes. Sever monitor is also modularised and is not working but jQplot is not imported as it is giving error with webpack. Another issue with these files is that table sorter is also not woking working properly as it is not available on npm as plugin. Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>
ba8ca5d
to
d111a2c
Compare
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
…function. Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally. Works fine for me.
With this pr the |
This pr contains the modular code for Import and Export js files.
This pr is in continuation of Mod_Jd_Navigation. Before reviewing this pr, review Mod_Js_Navigation and merge and then compare with this pr.
Before submitting pull request, please check that every commit: