deduplicate table data
This commit is contained in:
parent
7989d4e553
commit
06b4cba4bc
1 changed files with 22 additions and 11 deletions
|
@ -112,24 +112,40 @@
|
|||
|
||||
{% for service_level, pricing_data in service_levels.items %}
|
||||
<div class="mb-4">
|
||||
<h3 class="mb-3 text-secondary">{{ service_level }}</h3>
|
||||
<h3 class="mb-3">SLA: {{ service_level }}</h3>
|
||||
{% if pricing_data %}
|
||||
{# Display common values for this service level #}
|
||||
{% with pricing_data.0 as first_row %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-2">
|
||||
<strong>Cloud Provider:</strong> {{ first_row.cloud_provider }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<strong>Service:</strong> {{ first_row.service }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<strong>CPU/Memory Ratio:</strong> {{ first_row.cpu_mem_ratio }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<strong>Variable Unit:</strong> {{ first_row.variable_unit }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<strong>Replica Enforce:</strong> {{ first_row.replica_enforce }}
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-sm pricing-table">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Cloud Provider</th>
|
||||
<th>Service</th>
|
||||
<th>Compute Plan</th>
|
||||
<th>vCPUs</th>
|
||||
<th>RAM (GB)</th>
|
||||
<th>CPU/Memory Ratio</th>
|
||||
<th>Term</th>
|
||||
<th>Currency</th>
|
||||
<th>Compute Plan Price</th>
|
||||
<th>Variable Unit</th>
|
||||
<th>Units</th>
|
||||
<th>Replica Enforce</th>
|
||||
<th>SLA Base</th>
|
||||
<th>SLA Per Unit</th>
|
||||
<th>SLA Price</th>
|
||||
|
@ -143,18 +159,13 @@
|
|||
<tbody>
|
||||
{% for row in pricing_data %}
|
||||
<tr>
|
||||
<td>{{ row.cloud_provider }}</td>
|
||||
<td>{{ row.service }}</td>
|
||||
<td>{{ row.compute_plan }}</td>
|
||||
<td>{{ row.vcpus }}</td>
|
||||
<td>{{ row.ram }}</td>
|
||||
<td>{{ row.cpu_mem_ratio }}</td>
|
||||
<td>{{ row.term }}</td>
|
||||
<td>{{ row.currency }}</td>
|
||||
<td>{{ row.compute_plan_price|floatformat:2 }}</td>
|
||||
<td>{{ row.variable_unit }}</td>
|
||||
<td>{{ row.units }}</td>
|
||||
<td>{{ row.replica_enforce }}</td>
|
||||
<td>{{ row.sla_base|floatformat:2 }}</td>
|
||||
<td>{{ row.sla_per_unit|floatformat:4 }}</td>
|
||||
<td>{{ row.sla_price|floatformat:2 }}</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue