From c3080fedf9dcfe3d2c12a7942d3f82713be695f2 Mon Sep 17 00:00:00 2001 From: Kunal Khatua Date: Tue, 13 Nov 2018 12:09:42 -0800 Subject: DRILL-5571: Cancel running query from its Web UI Currently, a running query can be cancelled by navigating to the Edit Query Tab of the profile page, making it difficult to access. This commit allows the user to cancel. In addition, the Duration segment is also made visible by default rather than collapsed. --- .../src/main/resources/rest/profile/profile.ftl | 44 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/exec/java-exec/src/main/resources/rest/profile/profile.ftl b/exec/java-exec/src/main/resources/rest/profile/profile.ftl index c14e1b2e9..cbef54874 100644 --- a/exec/java-exec/src/main/resources/rest/profile/profile.ftl +++ b/exec/java-exec/src/main/resources/rest/profile/profile.ftl @@ -50,6 +50,22 @@ "info": false } );} ); + + //Close the cancellation status popup + function refreshStatus() { + //Close PopUp Modal + $("#queryCancelModal").modal("hide"); + location.reload(true); + } + + //Cancel query & show cancellation status + function cancelQuery() { + document.getElementById("cancelTitle").innerHTML = "Drillbit on " + location.hostname + " says"; + $.get("/profiles/cancel/"+globalconfig.queryid, function(data, status){/*Not Tracking Response*/}); + //Show PopUp Modal + $("#queryCancelModal").modal("show"); + }; + + <#macro page_body> @@ -171,7 +188,30 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de <#assign queued = queueName != "" && queueName != "-" /> -

Query Profile : ${model.getQueryId()}

+

Query Profile: ${model.getQueryId()} + <#if model.getQueryStateDisplayName() == "Prepared" || model.getQueryStateDisplayName() == "Planning" || model.getQueryStateDisplayName() == "Enqueued" || model.getQueryStateDisplayName() == "Starting"> +
+ +
+ + + + +

+
@@ -214,7 +254,7 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de

- + Duration

-- cgit v1.2.3