Skip to content

Commit 5b217f0

Browse files
Pierce Chaffinhedgiejo
authored andcommitted
Adds Run Status per Cohort to the Projects Table
Files changed:pegr/grails-app/views/project/_overview.gsp pegr/grails-app/views/project/_overview.gsp
1 parent be1f584 commit 5b217f0

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

pegr/grails-app/views/project/_overview.gsp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<th>Description</th>
66
<th>Date Created</th>
77
<th>Sequencing Cohorts</th>
8+
<th>Status</th>
89
</tr>
910
</thead>
1011
<tbody>
@@ -16,11 +17,13 @@
1617
<g:if test="${!project.cohorts?.size()}">
1718
<td></td>
1819
</tr>
19-
</g:if>
20+
</g:if>
2021
<g:else>
2122
<g:each in="${project.cohorts}" var="cohort" status="n">
2223
<g:if test="${n>0}"><tr></g:if>
2324
<td>${cohort.name} <g:if test="${cohort.report}"><g:link controller="report" action="show" id="${cohort.report.id}" class="edit">Report</g:link></g:if></td>
25+
<!-- ADDED COLUMN DATA FOR COHORT RUN STATUS -->
26+
<td><span class="label">${cohort.run.status}</span></td>
2427
</tr>
2528
</g:each>
2629
</g:else>

pegr/grails-app/views/project/all.gsp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<title>My Projects</title>
3+
<title>My Projects</title>
44
<meta name="layout" content="main"/>
55
</head>
66
<body>
@@ -25,6 +25,19 @@
2525
</div>
2626
<script>
2727
$("#nav-projects").addClass("active");
28+
$(".label").each(function() {
29+
if ($(this).text() == "ANALYZING") {
30+
$(this).addClass("label-info");
31+
} else if ($(this).text() == "COMPLETED") {
32+
$(this).addClass("label-success");
33+
} else if ($(this).text() == "QUEUE") {
34+
$(this).addClass("label-warning");
35+
} else if ($(this).text() == "FAILED") {
36+
$(this).addClass("label-danger");
37+
} else {
38+
$(this).addClass("label-default");
39+
}
40+
});
2841
</script>
2942
</body>
3043
</html>

0 commit comments

Comments
 (0)