Repository: tajo
Updated Branches:
  refs/heads/master 7d720888f -> c42d4b3c5


TAJO-1530: Display warn message when the query kill button is clicked in WEB UI.
(Dongjoon Hyun via hyoungjun)

Closes #525

Signed-off-by: Hyoungjun Kim <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/c42d4b3c
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/c42d4b3c
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/c42d4b3c

Branch: refs/heads/master
Commit: c42d4b3c5c5b6452a82a81fd51dc8e2f30e0816c
Parents: 7d72088
Author: Dongjoon Hyun <[email protected]>
Authored: Tue Apr 14 21:01:29 2015 +0900
Committer: Hyoungjun Kim <[email protected]>
Committed: Tue Apr 14 21:01:29 2015 +0900

----------------------------------------------------------------------
 CHANGES                                         |  3 ++
 .../src/main/resources/webapps/admin/query.jsp  | 30 +++++++++++---------
 2 files changed, 19 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/c42d4b3c/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a18ae88..bbf99e9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,9 @@ Release 0.11.0 - unreleased
     (Contributed by Dongjoon Hyun, Committed by jihoon)
 
   IMPROVEMENT
+
+    TAJO-1530: Display warn message when the query kill button is clicked in 
+    WEB UI. (Contributed by Dongjoon Hyun, Committed by hyoungjun)
   
     TAJO-1509: Use dedicated thread to release resource allocated to container.
     (Contributed by navis, Committed by hyoungjun)

http://git-wip-us.apache.org/repos/asf/tajo/blob/c42d4b3c/tajo-core/src/main/resources/webapps/admin/query.jsp
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/resources/webapps/admin/query.jsp 
b/tajo-core/src/main/resources/webapps/admin/query.jsp
index 85f7176..43e7775 100644
--- a/tajo-core/src/main/resources/webapps/admin/query.jsp
+++ b/tajo-core/src/main/resources/webapps/admin/query.jsp
@@ -89,20 +89,22 @@
     <script type="text/javascript">
 
     function killQuery(queryId) {
-        $.ajax({
-            type: "POST",
-            url: "query_exec",
-            data: { action: "killQuery", queryId: queryId }
-        })
-        .done(function(msg) {
-            var resultJson = $.parseJSON(msg);
-            if(resultJson.success == "false") {
-                alert(resultJson.errorMessage);
-            } else {
-                alert(resultJson.successMessage);
-                location.reload();
-            }
-        })
+        if (confirm("Are you sure to kill " + queryId + "?")) {
+            $.ajax({
+                type: "POST",
+                url: "query_exec",
+                data: { action: "killQuery", queryId: queryId }
+            })
+            .done(function(msg) {
+                var resultJson = $.parseJSON(msg);
+                if(resultJson.success == "false") {
+                    alert(resultJson.errorMessage);
+                } else {
+                    alert(resultJson.successMessage);
+                    location.reload();
+                }
+            })
+        }
     }
 
 

Reply via email to