Skip to content

Commit eb293ac

Browse files
authored
Merge pull request #25 from common-workflow-language/hotfix-arraytypes
Hotfix arraytypes
2 parents 2779053 + a05eadc commit eb293ac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ private String extractTypes(JsonNode typeNode) {
320320

321321
// Set the type to the constructed string
322322
return typeDetails.toString();
323+
324+
} else if (typeNode.getClass() == ObjectNode.class) {
325+
// Type: array and items:
326+
if (typeNode.has("items")) {
327+
return typeNode.get("items").asText() + "[]";
328+
}
323329
}
324330
}
325331
return null;

src/main/resources/templates/workflow.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,14 @@ <h2>Outputs</h2>
143143
<table class="table table-striped">
144144
<thead>
145145
<th>ID</th>
146+
<th>Type</th>
146147
<th>Label</th>
147148
<th>Doc</th>
148149
</thead>
149150
<tbody>
150151
<tr th:each="output : ${workflow.outputs}">
151152
<td th:text="${output.key}">ID</td>
153+
<td th:text="${output.value.type}">Type</td>
152154
<td th:text="${output.value.label}">Label</td>
153155
<td th:text="${output.value.doc}">Description</td>
154156
</tr>

0 commit comments

Comments
 (0)