blob: 66a5b110af337542cd5f8a2890acd16c5ed30d9e [file] [log] [blame]
<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org">
<head>
</head>
<body>
<div th:fragment="servicesList" id="selectedServices" th:object="${workflowStatus}">
<ul class="list-group">
<li th:each="selected : ${workflowStatus.selectedServices}" class="list-group-item d-flex justify-content-between">
<p class="p-0 m-0 flex-grow-1" th:text="${selected}">Service</p>
<a th:attr="onclick=|removeSelectedServices('${selected}')|" class="btn btn-secondary btn-sm">remove</a>
</li>
</ul>
<select name="services" id="services" onchange="updateSelectedServices(this.value)" class="form-control">
<option></option>
<option
th:each="service : ${cloudServiceDefinitions}"
th:text="${service.name}"
th:value="${service.name}"
th:selected="${service.name == selected}">
</option>
</select><br>
<div th:if="not *{configurations.isEmpty()}">
<div th:each="config : *{configurations}" class="mb-3">
<h4 th:text="${config.key + ' Configuration'}">Config</h4>
<div th:each="parameter, parameterStatus : ${config.value.parameterList}">
<!-- single non-boolean value -->
<div th:if="${parameter.cardinality == 'single' and parameter.type != 'boolean' and parameter.possibleValues.isEmpty()}">
<label class="form-check-label" th:text="${parameter.name}">Label</label>
<input
class="form-control"
type="text"
th:field="*{configurations[__${config.key}__].parameterList[__${parameterStatus.index}__].value}"/>
</div>
<!-- single boolean value -->
<div th:if="${parameter.cardinality == 'single' and parameter.type == 'boolean'}" class="form-check">
<input
class="form-check-input"
type="checkbox"
th:field="*{configurations[__${config.key}__].parameterList[__${parameterStatus.index}__].value}"
th:value="true">
<label class="form-check-label" th:text="${parameter.name}" th:for="${parameter.key}">Label</label>
</div>
<!-- multiple possible values + cardinality multiple = checkboxes -->
<div th:if="${parameter.cardinality == 'multiple' and parameter.possibleValues.size() > 1}">
<label th:text="${parameter.name}">Label</label>
<div th:each="pv : ${parameter.possibleValues}" class="form-check">
<input
type="checkbox"
th:field="*{configurations[__${config.key}__].parameterList[__${parameterStatus.index}__].value}"
th:value="${pv}">
<label class="form-check-label" th:text="${pv}">Value</label>
</div>
</div>
<!-- multiple possible values + cardinality single = combobox -->
<div th:if="${parameter.cardinality == 'single' and parameter.possibleValues.size() > 1}">
<label th:text="${parameter.name}">Label</label>
<select
class="custom-select"
th:field="*{configurations[__${config.key}__].parameterList[__${parameterStatus.index}__].value}">
<option value=""></option>
<option
th:each="pv : ${parameter.possibleValues}"
th:text="${pv}"
th:value="${pv}">
</option>
</select>
</div>
</div>
</div>
</div>
</div>
</body>
</html>