refactor to generic classes

This commit is contained in:
null
2024-03-09 20:13:30 +01:00
parent ae707720bc
commit 1399cdacca
9 changed files with 29 additions and 218 deletions
+1 -42
View File
@@ -12,48 +12,7 @@
<body>
<div class="container">
<dialog>
<iframe frameborder="0"></iframe>
</dialog>
<table id="conditionTable">
<thead>
<tr>
<td colspan="5"><h2>Conditions</h2></td>
</tr>
{% if data.conditions %}
<tr>
<th>ID</th>
<th>Symbol</th>
<th>Condition</th>
<th>Value</th>
<th>Disabled</th>
<th>Fulfilled</th>
</tr>
{% else %}
<tr>
<th class="nodata">No Data</th>
</tr>
{% endif %}
</thead>
<tbody>
{% for item in data.conditions %}
<tr onclick="onOpenDialog('/conditions/{{ item.id }}')">
{% set order = ["id", "symbol", "condition", "value", "disabled", "fulfilled"] %}
{% for key in order %}
<td>{{ item[key] }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="6" style="text-align: right;"> <!-- Adjust colspan as per your total columns -->
<button onclick="onOpenDialog('/conditions/create')">Add Item</button>
</td>
</tr>
</tfoot>
</table>
<a href="/strategies/abc">Abc</a>
</div>
</body>