Skip to content

Commit 95b5f36

Browse files
authored
Merge pull request #26 from common-workflow-language/origin-info
Display Github link and when the workflow was downloaded
2 parents eb293ac + bce9fcf commit 95b5f36

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/main/java/org/commonwl/viewer/domain/Workflow.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import java.util.Date;
3232
import java.util.Map;
3333

34+
import static java.util.Calendar.DATE;
35+
3436
/**
3537
* Representation of a workflow
3638
*/
@@ -43,7 +45,7 @@ public class Workflow {
4345
private String id;
4446

4547
// Metadata
46-
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
48+
@DateTimeFormat(pattern="MMM d yyyy 'at' hh:mm")
4749
private Date retrievedOn;
4850
private GithubDetails retrievedFrom;
4951
private Path roBundle;
@@ -55,7 +57,7 @@ public class Workflow {
5557
private Map<String, CWLElement> outputs;
5658

5759
// DOT graph of the contents
58-
private String dotGraph = "test";
60+
private String dotGraph;
5961

6062
public Workflow(String label, String doc, Map<String, CWLElement> inputs, Map<String, CWLElement> outputs) {
6163
this.label = label;

src/main/resources/static/css/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ body {
3838
padding-left: 45px;
3939
}
4040

41+
#githubLogo {
42+
margin-right: 5px;
43+
}
44+
4145
#graph-menu {
4246
margin-bottom: 5px;
4347
}

src/main/resources/templates/workflow.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ <h4 class="modal-title" id="dotGraphLabel">Workflow DOT Graph</h4>
100100
<div class="row">
101101
<div class="col-md-12" role="main" id="main">
102102
<h2>Workflow: <span th:text="${workflow.label}">Workflow Name</span></h2>
103+
<p>
104+
<a th:href="@{'https://github.com/' + ${workflow.retrievedFrom.owner} + '/' + ${workflow.retrievedFrom.repoName} + '/tree/' + ${workflow.retrievedFrom.branch} + '/' + ${workflow.retrievedFrom.path}}" href="#" rel="noopener" target="_blank">
105+
<img id="githubLogo" src="../static/img/GitHub-Mark-32px.png" th:src="@{/img/GitHub-Mark-32px.png}" width="24" height="24" />
106+
</a>
107+
<i>Fetched <span th:text="${{workflow.retrievedOn}}">01/12/16 at 21:00</span></i>
108+
</p>
103109
<p th:text="${workflow.doc}">Workflow Doc</p>
104110
</div>
105111
</div>

0 commit comments

Comments
 (0)