Skip to content

Commit

Permalink
Minor bug fixes in exception and UI (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
nntnag17 authored and akshayrai committed Apr 19, 2017
1 parent 642f3a0 commit fa166d3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
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

0 comments on commit fa166d3

Please sign in to comment.