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

Fix bugs in SQL query restore after session expire #14094

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@shucon
Contributor

shucon commented Mar 18, 2018

Fixes: #14093
Also, the sql query was getting stored in the browser indefinetly even after visiting another page and then coming back. So it had to be cleared from localstorage on page change.

Signed-off-by: Saksham Gupta shucon01@gmail.com

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
Fix bugs in SQL query restore after session expire
Fixes: #14093
Also, the sql query was getting stored in the browser indefinetly even after visiting another page and then coming back. So it had to be cleared from localstorage on page change.

Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@codecov

This comment has been minimized.

codecov bot commented Mar 24, 2018

Codecov Report

Merging #14094 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #14094      +/-   ##
============================================
+ Coverage     55.43%   55.43%   +<.01%     
- Complexity    14366    14374       +8     
============================================
  Files           494      494              
  Lines         70550    70612      +62     
============================================
+ Hits          39106    39147      +41     
- Misses        31444    31465      +21
Remove autosaved query after query execution
Signed-off-by: Saksham Gupta <shucon01@gmail.com>

@mauriciofauth mauriciofauth requested a review from nijel Mar 26, 2018

@@ -82,6 +82,7 @@ public static function getHtml(
// start output
$html .= '<form method="post" action="import.php" ' . $enctype;
$html .= ' class="ajax lock-page"';
$html .= ' onsubmit=window.localStorage.auto_saved_sql=""';

This comment has been minimized.

@mauriciofauth

mauriciofauth Mar 27, 2018

Member

Why add inline javascript here? See #13270.

This comment has been minimized.

@shucon

shucon Mar 27, 2018

Contributor

Most places have inline onsubmit present in forms so maintain the same coding style I preferred inline js.

This comment has been minimized.

@shucon

shucon Mar 27, 2018

Contributor

Okay, so all the onsubmit js are inline and needs to be changed, so I'll just fix this one here.

shucon added some commits Mar 27, 2018

Fix Inline JS
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
Fix Spaces
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@mauriciofauth

The "Get auto-saved query" button has no more action after these changes.

@shucon

This comment has been minimized.

Contributor

shucon commented Mar 31, 2018

@mauriciofauth Get auto-saved query is not working on master branch too. I'll check it and try to fix that too.

Fix Get auto saved query
Signed-off-by: Saksham Gupta <shucon01@gmail.com>
@mauriciofauth

This comment has been minimized.

Member

mauriciofauth commented May 3, 2018

Thanks for your contribution.
Closing this PR in favor of #14166.

@mauriciofauth mauriciofauth self-assigned this May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment