[
https://issues.apache.org/jira/browse/DRILL-7605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045901#comment-17045901
]
ASF GitHub Bot commented on DRILL-7605:
---------------------------------------
dobesv commented on pull request #1995: DRILL-7605: Preserve query form field
values between reloads / navigation
URL: https://github.com/apache/drill/pull/1995#discussion_r384766698
##########
File path: exec/java-exec/src/main/resources/rest/query/query.ftl
##########
@@ -87,13 +87,30 @@
</form>
<script>
+ // Remember form field values over page reloads
+
$('input[type=text],input[type=checkbox],input[type=radio],select').each(function()
{
+ var $input = $(this);
+ var key = 'saved_query_' + $input.attr('name');
+ var savedValue = sessionStorage.getItem(key);
+ if($input.attr("type") === 'checkbox') {
+ if(savedValue === 'true') $input.prop('checked', true);
Review comment:
I don't want to set the prop unless there is actually a valid value set in
the session storage. If the value is `null` and there's some other process
that sets a default, we should keep that default (e.g. not uncheck a checkbox
that would be checked by default).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Web UI should remember last Query text & settings
> -------------------------------------------------
>
> Key: DRILL-7605
> URL: https://issues.apache.org/jira/browse/DRILL-7605
> Project: Apache Drill
> Issue Type: Improvement
> Components: Web Server
> Affects Versions: 1.17.0
> Reporter: Dobes Vandermeer
> Assignee: Dobes Vandermeer
> Priority: Major
> Fix For: 1.18.0
>
>
> It would be a great convenience if the web UI would remember your previous
> options when you run a query and return back to the query page. This way if
> you just want to slightly adjust your last query you don't have to re-type
> it, or find it in the profiles list and click to edit it. Also it should
> remember you preference for the row limit and userName.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)