Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
94 lines (87 sloc) 2.47 KB
<% import org.apache.oozie.client.CoordinatorJob %>
<% import scalaj.collection.Imports._ %>
<% import com.foursquare.oozie.dashboard.Implicits._ %>
<%@ var job: CoordinatorJob %>
<%@ var definition: String %>
<%@ val runTimes: List[Tuple2[Int, Long]] %>
<h2>${job.getAppName}</h2>
<div class="row">
<div class="span6">
<h3>Info</h3>
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td>Id</td>
<td>${job.getId}</td>
</tr>
<tr>
<td>Author</td>
<td>${job.getUser}</td>
</tr>
<tr>
<td>Created At</td>
<td>${job.getStartTime.pp}</td>
</tr>
</tbody>
</table>
</div>
<div class="span6">
<h3>Runtime History</h3>
<div id="runtimechart"></div>
</div>
</div>
<h3>Actions</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Action</th>
<th>Action Time</th>
<th>Created On</th>
<th>Status</th>
<th>External ID</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<% val rerun = List("FAILED", "KILLED", "TIMEDOUT") %>
#for(action <- job.getActions.asScala.sortBy(_.getActionNumber).reverse)
<tr>
<td>${action.getActionNumber}</td>
<td>${action.getNominalTime.pp}</td>
<td>${action.getCreatedTime.pp}</td>
<td>${action.getStatus.toString}</td>
<td><a href="/workflows/${action.getExternalId}">${action.getExternalId}</a></td>
<td>
#if (rerun.contains(action.getStatus.toString))
<form class="form-mini" action="/coordinators/${job.getId}/${action.getActionNumber}/rerun" method="POST">
<button class="btn btn-mini btn-primary" onClick="">Rerun</button>
</form>
#end
</td>
</tr>
#end
</tbody>
</table>
<h3>Job Definition</h3>
<div id="definition">
<pre class="brush: xml">
${definition}
</pre>
</div>
<h3>Configuration</h3>
<div id="config">
<pre class="brush: xml">
${job.getConf}
</pre>
</div>
<script type="text/javascript">
$('form').submit(function(){
$('button', this).attr('disabled', 'disabled');
});
$(document).ready(function(){
SyntaxHighlighter.all();
var dataset = [ <%=runTimes.map{case(a,b) => "[%d,%d]".format(a,b)}.mkString(",\n")%> ];
console.log("dataset: " + dataset.length);
$.plot($("#runtimechart"), [{"data": dataset, "hoverable": true, "clickable": true, "label": "time in minutes"}]);
});
</script>
Jump to Line
Something went wrong with that request. Please try again.