Permalink
Browse files

Merge pull request #4 from turn/master

Display coordinator status in coordinator show page (and whitespace fixes)
  • Loading branch information...
2 parents 4345b35 + 7f2e13e commit cfbd1fdc16c2bb5cd2a24d16ddea132517d96e66 @rathboma rathboma committed May 6, 2013
@@ -12,29 +12,27 @@
<thead>
<tr>
<th>Name</th>
- <th>Author</th>
- <th>Last Action</th>
+ <th>User</th>
<th>Status</th>
- <th>Author</th>
- <th>Last Action</th>
- <th>Action -1</th>
- <th>Action -2</th>
- </tr>
+ <th>Last run</th>
+ <th>Materialization -1</th>
+ <th>Materialization -2</th>
+ <th>Materialization -3</th>
+ </tr>
</thead>
<tbody>
#for(workflow <- jobs)
<% val isRunning = workflow.getStatus.toString == "RUNNING" %>
<tr>
<td class="${if (isRunning) "updateme" else "dontupdateme"}" id="${workflow.getId}"><a href="/coordinators/${workflow.getId}">${workflow.getAppName}</a></td>
<td>${workflow.getUser}</td>
+ <td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
<td>${workflow.getLastActionTime.pp}</td>
- <td>${workflow.getStatus.toString}</td>
- <td>${workflow.getUser}</td>
- <td class="actions" id="${workflow.getId}-action0">${if (isRunning) "loading..." else ""}</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}-action2"></td>
</tr>
- #end
+ #end
</tbody>
</table>
@@ -47,16 +45,7 @@
var statuses = data.split(",");
for(var i = 0; i < statuses.length; i++){
var elementId = "#" + id + "-action" + i;
- $(elementId).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");
- }
+ $(elementId).attr('class', statuses[i]).html(statuses[i]);
}
});
});
@@ -66,6 +55,4 @@
}
});
});
-
-
-</script>
+</script>
@@ -16,32 +16,36 @@
<td>${job.getId}</td>
</tr>
<tr>
+ <td>Status</td>
+ <td class="${job.getStatus.toString}">${job.getStatus.toString}</td>
+ </tr>
+ <tr>
<td>Author</td>
<td>${job.getUser}</td>
</tr>
<tr>
- <td>Created At</td>
+ <td>Created at</td>
<td>${job.getStartTime.pp}</td>
</tr>
</tbody>
- </table>
+ </table>
</div>
<div class="span6">
<h3>Runtime History</h3>
<div id="runtimechart"></div>
</div>
</div>
-<h3>Actions</h3>
+<h3>Materializations</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>#</th>
+ <th>Workflow time</th>
+ <th>Materialized on</th>
+ <th>Status</th>
<th>External ID</th>
- <th>Action</th>
+ <th>Workflow</th>
</tr>
</thead>
<tbody>
@@ -51,7 +55,7 @@
<td>${action.getActionNumber}</td>
<td>${action.getNominalTime.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>
#if (rerun.contains(action.getStatus.toString))
@@ -66,17 +70,17 @@
</tbody>
</table>
-<h3>Job Definition</h3>
+<h3>Job definition</h3>
<div id="definition">
<pre class="brush: xml">
- ${definition}
+${definition}
</pre>
</div>
<h3>Configuration</h3>
<div id="config">
<pre class="brush: xml">
- ${job.getConf}
+${job.getConf}
</pre>
</div>
<script type="text/javascript">
@@ -91,4 +95,4 @@
$.plot($("#runtimechart"), [{"data": dataset, "hoverable": true, "clickable": true, "label": "time in minutes"}]);
});
-</script>
+</script>
@@ -13,21 +13,21 @@
<table class="table table-striped table-bordered">
<thead>
<tr>
- <th>Name</th>
- <th>Author</th>
- <th>Status</th>
- <th>Submitted</th>
- </tr>
+ <th width="45%">Name</th>
+ <th width="10%">Author</th>
+ <th width="25%">Submitted</th>
+ <th width="20%">Status</th>
+ </tr>
</thead>
<tbody>
#for(workflow <- workflows)
<tr>
<td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td>
<td>${workflow.getUser}</td>
- <td>${workflow.getStatus.toString}</td>
<td>${workflow.getStartTime.pp}</td>
+ <td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr>
- #end
+ #end
</tbody>
</table>
@@ -36,21 +36,20 @@
<table class="table table-striped table-bordered">
<thead>
<tr>
- <th>Name</th>
- <th>Author</th>
- <th>Last Action</th>
- <th>Status</th>
- <th>Author</th>
- </tr>
+ <th width="45%">Name</th>
+ <th width="10%">Author</th>
+ <th width="25%">Last Action</th>
+ <th width="20%">Status</th>
+ </tr>
</thead>
<tbody>
- #for(workflow <- coordinators)
+ #for(coordinator <- coordinators)
<tr>
- <td><a href="/coordinators/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td>
- <td>${workflow.getUser}</td>
- <td>${workflow.getLastActionTime.pp}</td>
- <td>${workflow.getStatus.toString}</td>
- <td>${workflow.getUser}</td>
+ <td><a href="/coordinators/${coordinator.getId}">${coordinator.getAppName}</a> <span class="mini">(${coordinator.getId})</span></td>
+ <td>${coordinator.getUser}</td>
+ <td>${coordinator.getLastActionTime.pp}</td>
+ <td class="${coordinator.getStatus.toString}">${coordinator.getStatus.toString}</td>
</tr>
- #end
+ #end
</tbody>
+</table>
@@ -19,9 +19,7 @@
</li>
</ul>
<table class="table table-striped table-bordered">
-
<form id="filterForm" action="/workflows" method="get">
-
<tr>
<th><input type="text" name="name" value="${nameValue}" placeholder="name equals..."></th>
<th><input type="text" name="user" value="${userValue}" placeholder="user equals..."></th>
@@ -30,21 +28,19 @@
</tr>
</form>
<tr>
- <th>Name</th>
- <th>User</th>
- <th>Status</th>
- <th>Created</th>
- </tr>
-
+ <th>Name</th>
+ <th>User</th>
+ <th>Created</th>
+ <th>Status</th>
+ </tr>
#for(workflow <- workflows)
<tr>
<td><a href="/workflows/${workflow.getId}">${workflow.getAppName}</a> <span class="mini">(${workflow.getId})</span></td>
<td>${workflow.getUser}</td>
- <td>${workflow.getStatus.toString}</td>
<td>${workflow.getCreatedTime.pp}</td>
+ <td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr>
- #end
-
+ #end
</table>
<ul class="pager">
@@ -56,4 +52,4 @@
<li class="next">
<a href="?${filterUri}page=${page + 1}">Older &rarr;</a>
</li>
-</ul>
+</ul>
@@ -6,6 +6,7 @@
<h2>${workflow.getAppName}</h2>
<div class="row">
<div class="span6">
+ <h3>Info</h3>
<table class="table table-striped table-bordered">
<tbody>
<tr>
@@ -14,7 +15,7 @@
</tr>
<tr>
<td>Status</td>
- <td>${workflow.getStatus}</td>
+ <td class="${workflow.getStatus.toString}">${workflow.getStatus.toString}</td>
</tr>
<tr>
<td>Author</td>
@@ -30,12 +31,11 @@
<td><a href="/workflows/${workflow.getId}/log">${linkText}</a></td>
</tr>
</tbody>
- </table>
+ </table>
</div>
</div>
-
-<h3>Sub Actions</h3>
+<h3>Actions</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
@@ -44,30 +44,30 @@
<th>Start Time</th>
<th>Status</th>
<th>External</th>
- </tr>
+ </tr>
</thead>
<tbody>
#for(action <- workflow.getActions)
<tr>
<td>${action.getName} <span class="mini">${action.getId}</span></td>
<td>${action.getType.toString}</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>
</tr>
- #end
+ #end
</tbody>
</table>
<h3>Job Definition</h3>
<div id="definition">
<pre class="brush: xml">
- ${definition}
+${definition}
</pre>
</div>
<h3>Configuration</h3>
<div id="config">
<pre class="brush: xml">
- ${workflow.getConf}
+${workflow.getConf}
</pre>
</div>
<h3>User Props (beta)</h3>
@@ -76,11 +76,11 @@
#for(prop <- props)
${prop}
<br />
- #end
+ #end
</div>
<script type="text/javascript">
$(document).ready(function(){
SyntaxHighlighter.all();
});
-</script>
+</script>
@@ -14,18 +14,23 @@ form.form-mini {
td.actions {
}
-.bad {
- background-color: #F2DEDE !important;
+div#runtimechart {
+ height:150px;
}
-.good {
- background-color: #DFF0D8 !important;
+h2 {
+ font-size: 25pt;
+ margin-bottom: 0.5em;
}
-.neutral {
- background-color: #F6F7DA !important;
+h3 {
+ margin-top: 1em;
+ margin-bottom: 1em;
}
-div#runtimechart {
- height:150px;
-}
+.KILLED, .DONEWITHERROR, .ERROR, .FAILED {
+ color: red;
+}
+.SUCCEEDED {
+ color: green;
+}

0 comments on commit cfbd1fd

Please sign in to comment.