display storage plans

This commit is contained in:
Tobias Brunner 2025-05-30 13:43:02 +02:00
parent d987f62471
commit 7b93830df2
No known key found for this signature in database
2 changed files with 47 additions and 1 deletions

View file

@ -112,6 +112,41 @@
{% if representative_plan.compute_plan_group_node_label %}
<p class="text-muted mb-3"><strong>Node Label:</strong> <code>{{ representative_plan.compute_plan_group_node_label }}</code></p>
{% endif %}
{# Display storage pricing for this cloud provider #}
{% if representative_plan.storage_plans %}
<div class="mb-3">
<p class="text-muted mb-2"><strong>Storage Options:</strong></p>
<div class="table-responsive">
<table class="table table-sm table-bordered">
<thead class="table-secondary">
<tr>
<th>Storage Plan</th>
<th>Term</th>
<th>Unit</th>
<th>Prices</th>
</tr>
</thead>
<tbody>
{% for storage_plan in representative_plan.storage_plans %}
<tr>
<td>{{ storage_plan.name }}</td>
<td>{{ storage_plan.get_term_display }}</td>
<td>{{ storage_plan.get_unit_display }}</td>
<td>
{% for price in storage_plan.prices.all %}
<span class="badge bg-light text-dark me-1">{{ price.amount }} {{ price.currency }}</span>
{% empty %}
<span class="text-muted">No prices</span>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
{% endwith %}
{% endif %}
{% endfor %}