You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by js...@apache.org on 2016/01/28 23:29:31 UTC
[1/2] drill git commit: DRILL-2653: Improve web UI experience when
there is an error in a storage plugin configuration
Repository: drill
Updated Branches:
refs/heads/2653-merge [created] 1b51850f3
DRILL-2653: Improve web UI experience when there is an error in a storage plugin configuration
Fixed success message, made the error messages red
This closes #343
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/9fa7b28c
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/9fa7b28c
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/9fa7b28c
Branch: refs/heads/2653-merge
Commit: 9fa7b28c299b9d2dc4fda49271fe929db62f5e49
Parents: a515719
Author: Jason Altekruse <al...@gmail.com>
Authored: Thu Jan 28 10:01:30 2016 -0800
Committer: Jason Altekruse <al...@gmail.com>
Committed: Thu Jan 28 14:02:06 2016 -0800
----------------------------------------------------------------------
.../src/main/resources/rest/storage/update.ftl | 21 ++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/9fa7b28c/exec/java-exec/src/main/resources/rest/storage/update.ftl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/rest/storage/update.ftl b/exec/java-exec/src/main/resources/rest/storage/update.ftl
index 2a276e1..5e7de5e 100644
--- a/exec/java-exec/src/main/resources/rest/storage/update.ftl
+++ b/exec/java-exec/src/main/resources/rest/storage/update.ftl
@@ -53,8 +53,25 @@
});
function doUpdate() {
$("#updateForm").ajaxForm(function(data) {
- $("#message").removeClass("hidden").text(data.result).alert();
- setTimeout(function() { location.reload(); }, 800);
+ var messageEl = $("#message");
+ if (data.result == "success") {
+ messageEl.removeClass("hidden")
+ .removeClass("alert-danger")
+ .addClass("alert-info")
+ .text(data.result).alert();
+ setTimeout(function() { location.reload(); }, 800);
+ } else {
+ messageEl.addClass("hidden");
+ // Wait a fraction of a second before showing the message again. This
+ // makes it clear if a second attempt gives the same error as
+ // the first that a "new" message came back from the server
+ setTimeout(function() {
+ messageEl.removeClass("hidden")
+ .removeClass("alert-info")
+ .addClass("alert-danger")
+ .text("Please retry: " + data.result).alert();
+ }, 200);
+ }
});
};
function deleteFunction() {
[2/2] drill git commit: DRILL-4322: Add underlying exception message
when IOException causes DROP TABLE failure
Posted by js...@apache.org.
DRILL-4322: Add underlying exception message when IOException causes DROP TABLE failure
This closes #344
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/1b51850f
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/1b51850f
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/1b51850f
Branch: refs/heads/2653-merge
Commit: 1b51850f31c02f0a7fa77f0258a83081a9d9e826
Parents: 9fa7b28
Author: Jason Altekruse <al...@gmail.com>
Authored: Thu Jan 28 11:18:43 2016 -0800
Committer: Jason Altekruse <al...@gmail.com>
Committed: Thu Jan 28 14:13:56 2016 -0800
----------------------------------------------------------------------
.../apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/1b51850f/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
index 65e387e..1623463 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
@@ -728,13 +728,13 @@ public class WorkspaceSchemaFactory {
fs.delete(new Path(defaultLocation, tableRename), true);
} catch (AccessControlException e) {
throw UserException
- .permissionError()
- .message("Unauthorized to drop table", e)
+ .permissionError(e)
+ .message("Unauthorized to drop table")
.build(logger);
} catch (IOException e) {
throw UserException
- .dataWriteError()
- .message("Failed to drop table", e)
+ .dataWriteError(e)
+ .message("Failed to drop table: " + e.getMessage())
.build(logger);
}
}