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
Modularize Server Status JS files #14467
Modularize Server Status JS files #14467
Conversation
Please rebase. |
6bde991
to
7d1e939
Compare
Codecov Report
@@ Coverage Diff @@
## gsoc-js-refactoring #14467 +/- ##
======================================================
Coverage ? 49.93%
Complexity ? 14435
======================================================
Files ? 504
Lines ? 68970
Branches ? 0
======================================================
Hits ? 34439
Misses ? 34531
Partials ? 0 |
ec28325
to
52a7849
Compare
…rocesses. Add codemirror package in server_privileges. Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>
b3a29f6
to
6f65d91
Compare
…d files. Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
…jax for dynamic loading. 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.
General comments to increase understandability of the pr
@@ -0,0 +1,164 @@ | |||
import { PMA_ajaxShowMessage } from '../../utils/show_ajax_messages'; |
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.
A class created for handling Server Status Process operations.
// the refresh URL (required to save last used option) | ||
// i.e. full or sorting url | ||
this.refreshUrl = null; | ||
this.init = this.init.bind(this); |
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.
Bindings done for various functions so that this can be accessed from these functions.
@@ -15,6 +15,7 @@ import { PMA_Messages as PMA_messages } from './variables/export_variables'; | |||
import { PMA_ajaxShowMessage, PMA_ajaxRemoveMessage } from './utils/show_ajax_messages'; | |||
import { PMA_commonParams } from './variables/common_params'; | |||
import { jQuery as $ } from './utils/JqueryExtended'; | |||
import { PMA_getSQLEditor } from './utils/sql'; |
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.
Codemirror library added in modular code and for testing, the code is enabled on server_privileges.php for viewing Privileges or Grant queries dialogue.
@@ -0,0 +1,102 @@ | |||
/* 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 server_status_advisor with imports at the top of file.
@@ -0,0 +1,41 @@ | |||
/* 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 server_status_processes with imports at the top of file.
@@ -0,0 +1,100 @@ | |||
/* 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 server_status_variables.php with imports at the top of file.
@@ -0,0 +1,272 @@ | |||
import CodeMirror from 'codemirror'; | |||
import '../../../node_modules/codemirror/mode/sql/sql.js'; |
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.
Codemirror library imported with addition plugins for linting and hints.
…sses.php page. Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
6f65d91
to
84d0e80
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.
Looks good to me. Tried running locally works fine.
import '../../../node_modules/codemirror/addon/hint/show-hint.js'; | ||
import '../../../node_modules/codemirror/addon/hint/sql-hint.js'; | ||
import '../../../node_modules/codemirror/addon/lint/lint.js'; | ||
// import '../../../node_modules/codemirror/addon/lint/sql-lint.js'; |
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.
Is this needed?
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.
Yeah this is corrected in the upcoming pr
This pr contains the modular code for server status files except server_status_queries and server_status_monitor as these two files contains the jQplot library which is not yet included in the code.
This pr is in continuation of the pr Mod_Js_Console. Before reviewing this pr, review Mod_Js_Console and merger and then compare with this pr.
Before submitting pull request, please check that every commit: