diff --git a/epdb/templatetags/templatetags.py b/epdb/templatetags/envipytags.py similarity index 100% rename from epdb/templatetags/templatetags.py rename to epdb/templatetags/envipytags.py diff --git a/templates/objects/model.html b/templates/objects/model.html index 9ae4e523..558f7aa8 100644 --- a/templates/objects/model.html +++ b/templates/objects/model.html @@ -1,163 +1,264 @@ {% extends "framework.html" %} {% load static %} +{% load envipytags %} {% block content %} - {% block action_modals %} - {% include "modals/objects/edit_model_modal.html" %} - {% include "modals/objects/evaluate_model_modal.html" %} - {% include "modals/objects/retrain_model_modal.html" %} - {% include "modals/objects/generic_delete_modal.html" %} - {% endblock action_modals %} + {% block action_modals %} + {% include "modals/objects/edit_model_modal.html" %} + {% include "modals/objects/evaluate_model_modal.html" %} + {% include "modals/objects/retrain_model_modal.html" %} + {% include "modals/objects/generic_delete_modal.html" %} + {% endblock action_modals %} - - - - + + + + -
-
-
- {{ model.name|safe }} - +
+
+
+ {{ model.name|safe }} + +
+
+

{{ model.description|safe }}

+
+ {% if model|classname == 'MLRelativeReasoning' or model|classname == 'RuleBasedRelativeReasoning' %} + +
+

+ Rule Packages +

+
+
+
+ {% for p in model.rule_packages.all %} + {{ p.name|safe }} + {% endfor %} +
+
+ +
+

+ Rule Packages +

+
+
+
+ {% for p in model.data_packages.all %} + {{ p.name|safe }} + {% endfor %} +
+
+ {% if model.eval_packages.all|length > 0 %} + +
+

+ Rule Packages +

+
+
+
+ {% for p in model.eval_packages.all %} + {{ p.name|safe }} + {% endfor %}
-
-

{{ model.description|safe }}

+
+ {% endif %} + +
+

+ Model Status +

+
+
+
{{ model.status }}
+
+ {% endif %} + {% if model.ready_for_prediction %} + +
+

+ Predict +

+
+
+
+
+ + + +
- {% if model|classname == 'MLRelativeReasoning' or model|classname == 'RuleBasedRelativeReasoning'%} - -
-

- Rule Packages -

-
-
-
- {% for p in model.rule_packages.all %} - {{ p.name|safe }} - {% endfor %} -
-
- -
-

- Rule Packages -

-
-
-
- {% for p in model.data_packages.all %} - {{ p.name|safe }} - {% endfor %} -
-
- {% if model.eval_packages.all|length > 0 %} - -
-

- Rule Packages -

-
-
-
- {% for p in model.eval_packages.all %} - {{ p.name|safe }} - {% endfor %} -
-
- {% endif %} - -
-

- Model Status -

-
-
-
- {{ model.status }} -
-
- {% endif %} - {% if model.ready_for_prediction %} - -
-

- Predict -

-
-
-
-
- - - - -
-
-
-
-
- - {% endif %} +
+
+
+
+ + {% endif %} - {% if model.ready_for_prediction and model.app_domain %} - - -
-
-
- - - - -
-
-
-
-
- - {% endif %} + {% if model.ready_for_prediction and model.app_domain %} + + +
+
+
+ + + + +
+
+
+
+
+ + {% endif %} - {% if model.model_status == 'FINISHED' %} - - -
-
- -
-
-
-
-
- -
-
+ {% if model.model_status == 'FINISHED' %} + + +
+
+ +
+
+
+
+
+
+
+ {# prettier-ignore-start #} - - {% endif %} -
+ {# prettier-ignore-end #} + + {% endif %}
+
- - + }, + error: function (jqXHR, textStatus, errorThrown) { + $("#appDomainLoading").empty(); + $("#appDomainAssessmentResultTable").addClass("alert alert-danger"); + $("#appDomainAssessmentResultTable").append( + jqXHR.responseJSON.error, + ); + }, + }); + }); + } + {% endblock content %}