Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from turn/master
Browse files Browse the repository at this point in the history
Display coordinator status in coordinator show page (and whitespace fixes)
  • Loading branch information
rathboma committed May 6, 2013
2 parents 4345b35 + 7f2e13e commit cfbd1fd
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 89 deletions.
35 changes: 11 additions & 24 deletions src/main/webapp/WEB-INF/views/coordinators/index.ssp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,29 +12,27 @@
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Author</th> <th>User</th>
<th>Last Action</th>
<th>Status</th> <th>Status</th>
<th>Author</th> <th>Last run</th>
<th>Last Action</th> <th>Materialization -1</th>
<th>Action -1</th> <th>Materialization -2</th>
<th>Action -2</th> <th>Materialization -3</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
#for(workflow <- jobs) #for(workflow <- jobs)
<% val isRunning = workflow.getStatus.toString == "RUNNING" %> <% val isRunning = workflow.getStatus.toString == "RUNNING" %>
<tr> <tr>
<td class="${if (isRunning) "updateme" else "dontupdateme"}" id="${workflow.getId}"><a href="/coordinators/${workflow.getId}">${workflow.getAppName}</a></td> <td class="${if (isRunning) "updateme" else "dontupdateme"}" id="${workflow.getId}"><a href="/coordinators/${workflow.getId}">${workflow.getAppName}</a></td>
<td>${workflow.getUser}</td> <td>${workflow.getUser}</td>
<td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
<td>${workflow.getLastActionTime.pp}</td> <td>${workflow.getLastActionTime.pp}</td>
<td>${workflow.getStatus.toString}</td> <td class="actions" id="${workflow.getId}-action0">${if (isRunning) "Loading..." else ""}</td>
<td>${workflow.getUser}</td>
<td class="actions" id="${workflow.getId}-action0">${if (isRunning) "loading..." else ""}</td>
<td class="actions" id="${workflow.getId}-action1"></td> <td class="actions" id="${workflow.getId}-action1"></td>
<td class="actions" id="${workflow.getId}-action2"></td> <td class="actions" id="${workflow.getId}-action2"></td>
</tr> </tr>
#end #end
</tbody> </tbody>
</table> </table>


Expand All @@ -47,16 +45,7 @@
var statuses = data.split(","); var statuses = data.split(",");
for(var i = 0; i < statuses.length; i++){ for(var i = 0; i < statuses.length; i++){
var elementId = "#" + id + "-action" + i; var elementId = "#" + id + "-action" + i;
$(elementId).html(statuses[i]); $(elementId).attr('class', statuses[i]).html(statuses[i]);

if (statuses[i] == "FAILED" || statuses[i] == "KILLED") {
$(elementId).attr("class", $(elementId).attr("class") + " bad");

} else if (statuses[i] == "SUCCEEDED") {
$(elementId).attr("class", $(elementId).attr("class") + " good");
} else {
$(elementId).attr("class", $(elementId).attr("class") + " neutral");
}
} }
}); });
}); });
Expand All @@ -66,6 +55,4 @@
} }
}); });
}); });

</script>

</script>
30 changes: 17 additions & 13 deletions src/main/webapp/WEB-INF/views/coordinators/show.ssp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,33 +15,37 @@
<td>Id</td> <td>Id</td>
<td>${job.getId}</td> <td>${job.getId}</td>
</tr> </tr>
<tr>
<td>Status</td>
<td class="${job.getStatus.toString}">${job.getStatus.toString}</td>
</tr>
<tr> <tr>
<td>Author</td> <td>Author</td>
<td>${job.getUser}</td> <td>${job.getUser}</td>
</tr> </tr>
<tr> <tr>
<td>Created At</td> <td>Created at</td>
<td>${job.getStartTime.pp}</td> <td>${job.getStartTime.pp}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="span6"> <div class="span6">
<h3>Runtime History</h3> <h3>Runtime History</h3>
<div id="runtimechart"></div> <div id="runtimechart"></div>
</div> </div>
</div> </div>


<h3>Actions</h3> <h3>Materializations</h3>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th>Action</th> <th>#</th>
<th>Action Time</th> <th>Workflow time</th>
<th>Created On</th> <th>Materialized on</th>
<th>Status</th> <th>Status</th>
<th>External ID</th> <th>External ID</th>
<th>Action</th> <th>Workflow</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
Expand All @@ -51,7 +55,7 @@
<td>${action.getActionNumber}</td> <td>${action.getActionNumber}</td>
<td>${action.getNominalTime.pp}</td> <td>${action.getNominalTime.pp}</td>
<td>${action.getCreatedTime.pp}</td> <td>${action.getCreatedTime.pp}</td>
<td>${action.getStatus.toString}</td> <td class="${action.getStatus.toString}">${action.getStatus.toString}</td>
<td><a href="/workflows/${action.getExternalId}">${action.getExternalId}</a></td> <td><a href="/workflows/${action.getExternalId}">${action.getExternalId}</a></td>
<td> <td>
#if (rerun.contains(action.getStatus.toString)) #if (rerun.contains(action.getStatus.toString))
Expand All @@ -66,17 +70,17 @@
</tbody> </tbody>
</table> </table>


<h3>Job Definition</h3> <h3>Job definition</h3>
<div id="definition"> <div id="definition">
<pre class="brush: xml"> <pre class="brush: xml">
${definition} ${definition}
</pre> </pre>
</div> </div>


<h3>Configuration</h3> <h3>Configuration</h3>
<div id="config"> <div id="config">
<pre class="brush: xml"> <pre class="brush: xml">
${job.getConf} ${job.getConf}
</pre> </pre>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
Expand All @@ -91,4 +95,4 @@
$.plot($("#runtimechart"), [{"data": dataset, "hoverable": true, "clickable": true, "label": "time in minutes"}]); $.plot($("#runtimechart"), [{"data": dataset, "hoverable": true, "clickable": true, "label": "time in minutes"}]);
}); });


</script> </script>
39 changes: 19 additions & 20 deletions src/main/webapp/WEB-INF/views/index.ssp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th width="45%">Name</th>
<th>Author</th> <th width="10%">Author</th>
<th>Status</th> <th width="25%">Submitted</th>
<th>Submitted</th> <th width="20%">Status</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
#for(workflow <- workflows) #for(workflow <- workflows)
<tr> <tr>
<td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td> <td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td>
<td>${workflow.getUser}</td> <td>${workflow.getUser}</td>
<td>${workflow.getStatus.toString}</td>
<td>${workflow.getStartTime.pp}</td> <td>${workflow.getStartTime.pp}</td>
<td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr> </tr>
#end #end
</tbody> </tbody>
</table> </table>


Expand All @@ -36,21 +36,20 @@
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th width="45%">Name</th>
<th>Author</th> <th width="10%">Author</th>
<th>Last Action</th> <th width="25%">Last Action</th>
<th>Status</th> <th width="20%">Status</th>
<th>Author</th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
#for(workflow <- coordinators) #for(coordinator <- coordinators)
<tr> <tr>
<td><a href="/coordinators/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td> <td><a href="/coordinators/${coordinator.getId}">${coordinator.getAppName}</a> <span class="mini">(${coordinator.getId})</span></td>
<td>${workflow.getUser}</td> <td>${coordinator.getUser}</td>
<td>${workflow.getLastActionTime.pp}</td> <td>${coordinator.getLastActionTime.pp}</td>
<td>${workflow.getStatus.toString}</td> <td class="${coordinator.getStatus.toString}">${coordinator.getStatus.toString}</td>
<td>${workflow.getUser}</td>
</tr> </tr>
#end #end
</tbody> </tbody>
</table>
20 changes: 8 additions & 12 deletions src/main/webapp/WEB-INF/views/workflows/index.ssp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
</li> </li>
</ul> </ul>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">

<form id="filterForm" action="/workflows" method="get"> <form id="filterForm" action="/workflows" method="get">

<tr> <tr>
<th><input type="text" name="name" value="${nameValue}" placeholder="name equals..."></th> <th><input type="text" name="name" value="${nameValue}" placeholder="name equals..."></th>
<th><input type="text" name="user" value="${userValue}" placeholder="user equals..."></th> <th><input type="text" name="user" value="${userValue}" placeholder="user equals..."></th>
Expand All @@ -30,21 +28,19 @@
</tr> </tr>
</form> </form>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>User</th> <th>User</th>
<th>Status</th> <th>Created</th>
<th>Created</th> <th>Status</th>
</tr> </tr>

#for(workflow <- workflows) #for(workflow <- workflows)
<tr> <tr>
<td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td> <td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td>
<td>${workflow.getUser}</td> <td>${workflow.getUser}</td>
<td>${workflow.getStatus.toString}</td>
<td>${workflow.getCreatedTime.pp}</td> <td>${workflow.getCreatedTime.pp}</td>
<td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr> </tr>
#end #end

</table> </table>


<ul class="pager"> <ul class="pager">
Expand All @@ -56,4 +52,4 @@
<li class="next"> <li class="next">
<a href="?${filterUri}page=${page + 1}">Older &rarr;</a> <a href="?${filterUri}page=${page + 1}">Older &rarr;</a>
</li> </li>
</ul> </ul>
22 changes: 11 additions & 11 deletions src/main/webapp/WEB-INF/views/workflows/show.ssp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<h2>${workflow.getAppName}</h2> <h2>${workflow.getAppName}</h2>
<div class="row"> <div class="row">
<div class="span6"> <div class="span6">
<h3>Info</h3>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<tbody> <tbody>
<tr> <tr>
Expand All @@ -14,7 +15,7 @@
</tr> </tr>
<tr> <tr>
<td>Status</td> <td>Status</td>
<td>${workflow.getStatus}</td> <td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr> </tr>
<tr> <tr>
<td>Author</td> <td>Author</td>
Expand All @@ -30,12 +31,11 @@
<td><a href="/workflows/${workflow.getId}/log">${linkText}</a></td> <td><a href="/workflows/${workflow.getId}/log">${linkText}</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>



<h3>Actions</h3>
<h3>Sub Actions</h3>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
Expand All @@ -44,30 +44,30 @@
<th>Start Time</th> <th>Start Time</th>
<th>Status</th> <th>Status</th>
<th>External</th> <th>External</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
#for(action <- workflow.getActions) #for(action <- workflow.getActions)
<tr> <tr>
<td>${action.getName} <span class="mini">${action.getId}</span></td> <td>${action.getName} <span class="mini">${action.getId}</span></td>
<td>${action.getType.toString}</td> <td>${action.getType.toString}</td>
<td>${action.getStartTime.pp}</td> <td>${action.getStartTime.pp}</td>
<td>${action.getStatus.toString} (=> ${action.getTransition})</td> <td class="${action.getStatus.toString}">${action.getStatus.toString} (=> ${action.getTransition})</td>
<td><a href="${action.getUrl}">${action.getExternalId}</a></td> <td><a href="${action.getUrl}">${action.getExternalId}</a></td>
</tr> </tr>
#end #end
</tbody> </tbody>
</table> </table>
<h3>Job Definition</h3> <h3>Job Definition</h3>
<div id="definition"> <div id="definition">
<pre class="brush: xml"> <pre class="brush: xml">
${definition} ${definition}
</pre> </pre>
</div> </div>
<h3>Configuration</h3> <h3>Configuration</h3>
<div id="config"> <div id="config">
<pre class="brush: xml"> <pre class="brush: xml">
${workflow.getConf} ${workflow.getConf}
</pre> </pre>
</div> </div>
<h3>User Props (beta)</h3> <h3>User Props (beta)</h3>
Expand All @@ -76,11 +76,11 @@
#for(prop <- props) #for(prop <- props)
${prop} ${prop}
<br /> <br />
#end #end
</div> </div>


<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
SyntaxHighlighter.all(); SyntaxHighlighter.all();
}); });
</script> </script>
23 changes: 14 additions & 9 deletions src/main/webapp/static/css/oozie.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ form.form-mini {
td.actions { td.actions {


} }
.bad { div#runtimechart {
background-color: #F2DEDE !important; height:150px;
} }


.good { h2 {
background-color: #DFF0D8 !important; font-size: 25pt;
margin-bottom: 0.5em;
} }


.neutral { h3 {
background-color: #F6F7DA !important; margin-top: 1em;
margin-bottom: 1em;
} }


div#runtimechart { .KILLED, .DONEWITHERROR, .ERROR, .FAILED {
height:150px; color: red;
} }
.SUCCEEDED {
color: green;
}

0 comments on commit cfbd1fd

Please sign in to comment.