Added an error page for when a project create operation fails.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@307 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-03-16 18:40:07 +00:00
parent 798805edc5
commit 1a8a236cdd
3 changed files with 48 additions and 1 deletions

View File

@ -55,7 +55,9 @@ public class CreateProjectCommand extends Command {
redirect(response, "/project.html?project=" + project.id);
} catch (Exception e) {
// TODO Auto-generated catch block
redirect(response, "/error.html?redirect=index.html&msg=" +
ParsingUtilities.encode("Failed to import file: " + e.getLocalizedMessage())
);
e.printStackTrace();
}
}

View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Error - Gridworks</title>
<link rel="stylesheet" href="styles/common.css" />
<link rel="stylesheet" href="styles/error.css" />
<script type="text/javascript" src="externals/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/util/url.js"></script>
<script>
$(function() {
var params = URL.getParameters();
$("#message").text(params.msg.replace(/\+/g, ' '));
window.setTimeout(function() {
document.location.href = params.redirect;
}, 20000);
});
</script>
</head>
<body>
<div id="header">
<a id="logo" href="http://www.freebase.com/" title="Freebase"><img alt="Freebase" src="images/freebase-headerlogo.png" /></a>
<div id="path"><a class="app-path-section" href="./index.html">Gridworks</a></div>
</div>
<div id="body">
<h1>Oops, something went wrong!</h1>
<p id="message"></p>
<p>Redirecting you back to <a href="index.html">Gridworks' home page</a> in 20 seconds ...</p>
</div>
<div id="footer">
<a href="about.html">About Freebase Gridworks</a>
&bull;
&copy; 2010 <a href="http://www.metaweb.com/">Metaweb Technologies, Inc.</a>
</div>
</body>
</html>

View File

@ -0,0 +1,3 @@
#body {
padding: 5em;
}