From 1a7e41edb2b756d91ed25d3f8d6c7560d85990d7 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 26 Jun 2025 11:51:05 -0400 Subject: [PATCH] Fixed the benchmark.view and component.view views so they now link to tests that reference them --- views/benchmark/view.twig | 31 ++++++++++++------------------- views/component/view.twig | 27 ++++++++++----------------- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/views/benchmark/view.twig b/views/benchmark/view.twig index 5c792ce..b006cd1 100644 --- a/views/benchmark/view.twig +++ b/views/benchmark/view.twig @@ -5,8 +5,8 @@ {% block content %}
-

{{ test.name }}

-

{{ test.description }}

+

{{ benchmark.name }}

+

{{ benchmark.description }}

@@ -14,36 +14,29 @@
-

Test results:

-

Add new result

+

Tests using this benchmark:

- {% if test.results | length > 0 %} + {% if benchmark.tests | length > 0 %} - - - - - - + + + - {% for r in test.results %} + {% for t in benchmark.tests %} - - - - - - + + + {% endfor %}
ComponentBenchmarkScoringAvg.Min.Max.Test titleBenchmarksLast updated
{{ r.component }}{{ r.benchmark }}{{ r.type | capitalize }}{{ r.average }}{{ r.minimum ? r.minimum : 'N/a' }}{{ r.maximum ? r.maximum : 'N/a' }}{{ t.title }}{{ t.benchmarks | length }}{{ t.updated_at }}
{% else %} -

There are no results associated with this.

+

There are no tests associated with this benchmark.

{% endif %}
diff --git a/views/component/view.twig b/views/component/view.twig index 9fac01b..db33dbe 100644 --- a/views/component/view.twig +++ b/views/component/view.twig @@ -14,36 +14,29 @@
-

Test results:

-

Add new result

+

Tests using this component:

- {% if test.results | length > 0 %} + {% if component.tests | length > 0 %} - - - - - - + + + - {% for r in test.results %} + {% for t in component.tests %} - - - - - - + + + {% endfor %}
ComponentBenchmarkScoringAvg.Min.Max.Test titleBenchmarksLast updated
{{ r.component }}{{ r.benchmark }}{{ r.type | capitalize }}{{ r.average }}{{ r.minimum ? r.minimum : 'N/a' }}{{ r.maximum ? r.maximum : 'N/a' }}{{ t.title }}{{ t.benchmarks | length }}{{ t.updated_at }}
{% else %} -

There are no results associated with this.

+

There are no tests associated with this component.

{% endif %}