Skip to content

Commit 1a63aa3

Browse files
committed
feat(nimbus): Add basic feature tracking table to feature health page.
1 parent bde92fd commit 1a63aa3

File tree

3 files changed

+119
-2
lines changed

3 files changed

+119
-2
lines changed

experimenter/experimenter/nimbus_ui/templates/nimbus_experiments/features.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,61 @@ <h5 class="fw-semibold">
331331
</div>
332332
</div>
333333
</div>
334+
<hr>
335+
<h5 class="fw-semibold">
336+
<img src="{% static 'assets/qa-runs.svg' %}"
337+
<img src="{% static 'assets/feature-changes.svg' %}"
338+
alt="Hugging Foxes"
339+
style="width: 60px;
340+
height: auto" />
341+
Feature Changes
342+
<i class="fa-regular fa-circle-question"
343+
data-bs-toggle="tooltip"
344+
data-bs-placement="top"
345+
data-bs-title="This shows any changes made to the Nimbus feature manifest such as code changes for the feature you have chosen"></i>
346+
|
347+
<span class="badge bg-secondary">Number of changes: {{ feature_changes.count|default:"0" }}</span>
348+
</h5>
349+
<div>
350+
<div id="feature-changes-table">
351+
<table class="table table-hover table-borderless align-middle mb-3">
352+
<thead>
353+
<tr>
354+
<th scope="col" class="fw-semibold text-body">
355+
<span>Feature Version</span>
356+
</th>
357+
<th scope="col" class="fw-semibold text-body">
358+
<span>Date / Time</span>
359+
</th>
360+
<th scope="col" class="fw-semibold text-body">
361+
<span>Change Size</span>
362+
</th>
363+
<th scope="col" class="fw-semibold text-body">
364+
<span>Change Diff</span>
365+
</th>
366+
</tr>
367+
</thead>
368+
<tbody>
369+
{% for change in feature_changes %}
370+
<tr scope="row">
371+
<td id="feature-version">
372+
{{ change.change_version|format_not_set }}</a>
373+
</td>
374+
<td id="feature-change-date">{{ change.change_date|date:"m/d/Y @ H:i"|format_not_set }}</td>
375+
<td id="feature-change-size">{{ change.change_size|format_not_set }}</td>
376+
<td id="feature-change-complexity">{{ change.softvision_complexity|format_not_set }}</td>
377+
</tr>
378+
{% empty %}
379+
<tr>
380+
<td colspan="11" class="text-center text-muted py-5">No Tracked Feature Changes</td>
381+
</tr>
382+
</tr>
383+
{% endfor %}
384+
</tbody>
385+
</table>
386+
</div>
334387
</div>
335388
</div>
336389
</div>
390+
</div>
337391
{% endblock %}

experimenter/experimenter/nimbus_ui/tests/test_views.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3576,14 +3576,18 @@ def test_features_view_renders_table_with_correct_elements(
35763576
)
35773577

35783578
feature_id = self.feature_configs[feature_config].id
3579-
url = reverse("nimbus-ui-features")
35803579
response = self.client.get(
3581-
f"{url}?application={application.value}&feature_configs={feature_id}"
3580+
reverse("nimbus-ui-features"),
3581+
{
3582+
"application": application.value,
3583+
"feature_configs": feature_id,
3584+
},
35823585
)
35833586

35843587
self.assertEqual(response.status_code, 200)
35853588
self.assertContains(response, "deliveries-table")
35863589
self.assertContains(response, "qa-info-table")
3590+
self.assertContains(response, "feature-changes-table")
35873591
self.assertContains(response, experiment)
35883592

35893593
def test_features_view_deliveries_table_can_sort_by_recipe_name(self):

0 commit comments

Comments
 (0)