forked from enviPath/enviPy
[Feature] Prediction settings list on User page (#276)
Some checks failed
Build CI Docker Image / build-and-push (push) Failing after 23s
Some checks failed
Build CI Docker Image / build-and-push (push) Failing after 23s
I have added a list of other prediction settings to the User page and a way to change a setting to the default.
<img width="500" alt="{4EFA1273-E53A-4333-948B-8AE3597821A8}.png" src="attachments/048fdc83-1c3e-41d2-a59b-44b0337a05bf">
Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#276
Reviewed-by: jebus <lorsbach@envipath.com>
Co-authored-by: Liam Brydon <lbry121@aucklanduni.ac.nz>
Co-committed-by: Liam Brydon <lbry121@aucklanduni.ac.nz>
This commit is contained in:
@ -88,75 +88,26 @@
|
||||
Current Prediction Setting
|
||||
</div>
|
||||
<div class="collapse-content">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table-zebra table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if user.default_setting.model %}
|
||||
<tr>
|
||||
<td>Model</td>
|
||||
<td>
|
||||
<div class="space-y-2">
|
||||
<a
|
||||
href="{{ user.default_setting.model.url }}"
|
||||
class="link link-primary"
|
||||
>
|
||||
{{ user.default_setting.model.name }}
|
||||
</a>
|
||||
<table class="table-xs table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Model Parameter</th>
|
||||
<th>Parameter Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Threshold</td>
|
||||
<td>{{ user.default_setting.model_threshold }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if user.default_setting.rule_packages.all %}
|
||||
<tr>
|
||||
<td>Rule Packages</td>
|
||||
<td>
|
||||
<ul class="menu bg-base-200 rounded-box">
|
||||
{% for p in user.default_setting.rule_packages.all %}
|
||||
<li>
|
||||
<a href="{{ p.url }}" class="hover:bg-base-300"
|
||||
>{{ p.name }}</a
|
||||
>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>Max Nodes</td>
|
||||
<td>{{ user.default_setting.max_nodes }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Max Depth</td>
|
||||
<td>{{ user.default_setting.max_depth }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expansion Scheme</td>
|
||||
<td>{{ user.default_setting.expansion_scheme }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% with setting_to_render=user.default_setting can_be_default=False %}
|
||||
{% include "objects/setting_template.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Other Prediction Settings -->
|
||||
<div class="collapse-arrow bg-base-200 collapse">
|
||||
<input type="checkbox" />
|
||||
<div class="collapse-title text-xl font-medium">
|
||||
Other Prediction Settings
|
||||
</div>
|
||||
<div class="collapse-content space-y-3">
|
||||
{% for setting in meta.available_settings %}
|
||||
{% if setting != user.default_setting %}
|
||||
{% with setting_to_render=setting can_be_default=True %}
|
||||
{% include "objects/setting_template.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user