Skip to content

Commit

Permalink
feat: add results link to experiments table (#11990)
Browse files Browse the repository at this point in the history
Because

- it is impossible to tell if an experiment has results without clicking
into it
- it can be useful to see a list of experiments with/without results
- it can be useful to navigate directly to the experiment's results

This commit

- adds a results link to the experiments table if results exist

Fixes #10946 

![image](https://github.com/user-attachments/assets/6fad1b82-b14e-4a0e-a9af-7859656ebbe3)

---------

Co-authored-by: RJAK11 <[email protected]>
Co-authored-by: Rana Al-Khulaidi <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent 9013a34 commit 89b9d53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h1 class="modal-title fs-5" id="createModalLabel">
{% include "nimbus_experiments/table_header.html" with field="Versions" up=sort_choices.VERSIONS_UP down=sort_choices.VERSIONS_DOWN %}
{% include "nimbus_experiments/table_header.html" with field="Dates" up=sort_choices.DATES_UP down=sort_choices.DATES_DOWN %}

<th scope="col">Results</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -118,6 +119,13 @@ <h1 class="modal-title fs-5" id="createModalLabel">
N/A
{% endif %}
</td>
<td>
{% if experiment.show_results_url %}
<a href="{% url "nimbus-results" slug=experiment.slug %}">View Results</a>
{% else %}
<a>N/A</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down
3 changes: 3 additions & 0 deletions experimenter/experimenter/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
re_path(r"^nimbus/new/", NimbusUIView.as_view(), name="nimbus-create"),
re_path(r"^nimbus/$", NimbusExperimentsListView.as_view(), name="nimbus-list"),
re_path(r"^nimbus/(?P<slug>[\w-]+)/", NimbusUIView.as_view(), name="nimbus-detail"),
re_path(
r"^nimbus/(?P<slug>[\w-]+)/results", NimbusUIView.as_view(), name="nimbus-results"
),
re_path(r"^legacy/$", ExperimentListView.as_view(), name="home"),
re_path(
r"^$",
Expand Down

0 comments on commit 89b9d53

Please sign in to comment.