Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bug fixes in exception and UI #238

Merged
merged 1 commit into from
Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app/controllers/api/v1/Web.java
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ public static Result restExceptionStatuses () {
Set<String> schedulersConfigured = InfoExtractor.getSchedulersConfiguredForException();
JsonObject exception = new JsonObject();
if(schedulersConfigured.isEmpty()) {
exception.addProperty(JsonKeys.EXCEPTION_ENABLED, "true");
exception.addProperty(JsonKeys.EXCEPTION_ENABLED, "false");
exception.add(JsonKeys.SCHEDULERS, new JsonArray());

exception.addProperty(JsonKeys.ID, "exception-status");
Expand Down Expand Up @@ -1784,8 +1784,19 @@ public static Result restExceptions() throws URISyntaxException, MalformedURLExc
parent.add("workflow-exceptions", new JsonArray());
return notFound(new Gson().toJson(parent));
} else {
ExceptionFinder expGen = new ExceptionFinder(url, scheduler);
HadoopException flowException = expGen.getExceptions();
ExceptionFinder expGen;
HadoopException flowException;

try {
expGen = new ExceptionFinder(url, scheduler);
flowException = expGen.getExceptions();
} catch (RuntimeException e) {
parent.add("workflow-exceptions", new JsonArray());
return status(500,"Unexpected error occured");
} catch (Exception e) {
parent.add("workflow-exceptions", new JsonArray());
return status(500,"Unexpected error occured");
}

JsonArray jobsArray = new JsonArray();

Expand Down
1 change: 1 addition & 0 deletions app/views/newmain.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<li><a href="new#/workflow-exceptions">Exceptions</a></li>
<li><a href="newjobhistory">JobHistory</a></li>
<li><a href="newflowhistory">FlowHistory</a></li>
<li><a href="new#/user-details">User details</a></li>
<li><a href="newhelp">Help</a></li>
</ul>

Expand Down
3 changes: 2 additions & 1 deletion web/app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import DS from 'ember-data';
import Ember from 'ember';

export default DS.JSONAPIAdapter.extend({
namespace: 'rest',
namespace: 'rest'
});

export default DS.RESTAdapter.extend({
namespace: 'rest',
pathForType: function (type) {
Expand Down
1 change: 1 addition & 0 deletions web/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<li>{{#link-to "workflow-exceptions" (query-params workflowId=null)}}Exceptions{{/link-to}}</li>
<li><a href="../newjobhistory">JobHistory</a></li>
<li><a href="../newflowhistory">FlowHistory</a></li>
<li>{{#link-to "user-details"}}User details{{/link-to}}</li>
<li><a href="../newhelp">Help</a></li>
</ul>
</div>
Expand Down