Skip to content

Commit 2246a1e

Browse files
committed
Add form design for generic Git import
1 parent 03d7259 commit 2246a1e

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

NOTICE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ For more information regarding the authorized uses of these items please [contac
7676

7777
-----------
7878

79+
# Git logo
80+
img/gitlogo.png
81+
Git Logo by Jason Long is licensed under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
82+
83+
-----------
84+
7985
# European Union flag
8086
img/Flag_of_Europe.svg
8187
Public Domain

src/main/resources/static/css/main-20170616.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ body {
8686
padding-left: 45px;
8787
}
8888

89+
#repoURL {
90+
background: url("/img/gitlogo.png") no-repeat scroll 4px 1px;
91+
background-size: 30px 30px;
92+
padding-left: 45px;
93+
}
94+
8995
#githubLogo {
9096
margin-right: 5px;
9197
}
2.1 KB
Loading

src/main/resources/templates/index.html

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ <h1>Common Workflow Language Viewer</h1>
4545
<p>Want to generate visualisations in build scripts or from another automated process? Find out about <a href="/apidocs" alt="API Documentation">our API</a></p>
4646
</div>
4747

48+
<hr/>
49+
4850
<h2>Workflow from Github URL</h2>
4951
<p>Provide a Github link to the workflow here</p>
5052
<form id="add" action="#" th:action="@{/workflows}" th:object="${workflowForm}" method="POST">
@@ -65,12 +67,41 @@ <h2>Workflow from Github URL</h2>
6567
or <a href="/workflows">explore the collection</a>
6668
</div>
6769
<div class="input-group">
68-
<input type="text" class="form-control" placeholder="Github URL" id="githubURL" name="githubURL" th:field="*{githubURL}" th:value="${formURL}" />
70+
<label for="githubURL" class="sr-only">Github URL</label>
71+
<input type="text" class="form-control" placeholder="Github URL" id="githubURL" name="githubURL" th:field="*{githubURL}" th:value="${formURL}" required="true" />
6972
<span class="input-group-btn">
7073
<button class="btn btn-primary" type="submit">Parse Workflow</button>
7174
</span>
7275
</div>
7376
</form>
77+
78+
<hr/>
79+
80+
<h2>Workflow from Git Details</h2>
81+
<p>Provide the repository URL, path and branch details for the workflow here</p>
82+
<form id="git" action="#" th:action="@{/workflows}" th:object="${workflowForm}" method="POST">
83+
<div class="alert alert-danger" th:if="${errors} != null and ${errors.hasErrors()}">
84+
<div th:each="error : ${errors.getAllErrors()}">
85+
<strong>Error:</strong> <span th:text="${error.getDefaultMessage()}">Error message here</span>
86+
</div>
87+
</div>
88+
<div class="alert alert-danger" th:if="${#fields.hasErrors('githubURL')}">
89+
<strong>Error:</strong> <span th:errors="*{githubURL}">Error message here</span>
90+
</div>
91+
<label for="repoURL">Repository URL</label>
92+
<input type="text" class="form-control" placeholder="Repository URL (HTTPS)" id="repoURL" name="repoURL" th:field="*{githubURL}" th:value="${formURL}" required="true" />
93+
<div class="row" style="margin-top:10px;margin-bottom:10px;">
94+
<div class="col-md-6">
95+
<label for="branch">Branch Name/Commit ID</label>
96+
<input type="text" class="form-control" placeholder="Branch Name or Commit ID" name="branch" required="true" />
97+
</div>
98+
<div class="col-md-6">
99+
<label for="path">Path to Workflow</label>
100+
<input type="text" class="form-control" placeholder="/path/to/workflow.cwl" name="path" required="true" />
101+
</div>
102+
</div>
103+
<button class="btn btn-primary pull-right" type="submit">Parse Workflow</button>
104+
</form>
74105
</div>
75106
</div>
76107
</div>

0 commit comments

Comments
 (0)