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

Modularize Server Status JS files #14467

Merged
merged 4 commits into from Jul 28, 2018

Conversation

Projects
None yet
2 participants
@Piyush3079
Copy link
Contributor

Piyush3079 commented Jul 8, 2018

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:

  • 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

@devenbansod devenbansod referenced this pull request Jul 27, 2018

Merged

Console and Error Report files modularized #14466

0 of 4 tasks complete

@devenbansod devenbansod changed the base branch from master to gsoc-js-refactoring Jul 27, 2018

@devenbansod devenbansod changed the title Server Status files modularised Modularize Server Status JS files Jul 27, 2018

@devenbansod devenbansod self-requested a review Jul 27, 2018

@devenbansod devenbansod self-assigned this Jul 27, 2018

@devenbansod

This comment has been minimized.

Copy link
Member

devenbansod commented Jul 27, 2018

Please rebase.

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Server_Status branch from 6bde991 to 7d1e939 Jul 27, 2018

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jul 27, 2018

Codecov Report

❗️ No coverage uploaded for pull request base (gsoc-js-refactoring@ff81454). Click here to learn what that means.
The diff coverage is 14.7%.

@@                  Coverage Diff                   @@
##             gsoc-js-refactoring   #14467   +/-   ##
======================================================
  Coverage                       ?   49.93%           
  Complexity                     ?    14435           
======================================================
  Files                          ?      504           
  Lines                          ?    68970           
  Branches                       ?        0           
======================================================
  Hits                           ?    34439           
  Misses                         ?    34531           
  Partials                       ?        0

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Server_Status branch 8 times, most recently from ec28325 to 52a7849 Jul 27, 2018

Revamp server_status_advisor, server_status_variables, sever_status_p…
…rocesses.

Add codemirror package in server_privileges.
Signed-off-by: Piyush Vijay <piyushvijay.1997@gmail.com>

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Server_Status branch from b3a29f6 to 6f65d91 Jul 27, 2018

Piyush3079 added some commits Jul 7, 2018

Commented code and debug statements removed from server status relate…
…d files.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
remove .js extension from relevant php files and add those files in a…
…jax for dynamic loading.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
@Piyush3079
Copy link
Contributor Author

Piyush3079 left a comment

General comments to increase understandability of the pr

@@ -0,0 +1,164 @@
import { PMA_ajaxShowMessage } from '../../utils/show_ajax_messages';

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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);

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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';

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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: */

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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: */

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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: */

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

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';

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

Codemirror library imported with addition plugins for linting and hints.

Big fix for kill button and autoRefresh button on server_status_proce…
…sses.php page.

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

@Piyush3079 Piyush3079 force-pushed the Piyush3079:Mod_Js_Server_Status branch from 6f65d91 to 84d0e80 Jul 28, 2018

@devenbansod
Copy link
Member

devenbansod left a comment

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';

This comment has been minimized.

@devenbansod

devenbansod Jul 28, 2018

Member

Is this needed?

This comment has been minimized.

@Piyush3079

Piyush3079 Jul 28, 2018

Author Contributor

Yeah this is corrected in the upcoming pr

@devenbansod devenbansod merged commit ed6f106 into phpmyadmin:gsoc-js-refactoring Jul 28, 2018

1 check passed

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.