diff --git a/benchmark/scripts/be_flask.py b/benchmark/scripts/be_flask.py
index 0581b19..56ba6c9 100755
--- a/benchmark/scripts/be_flask.py
+++ b/benchmark/scripts/be_flask.py
@@ -39,9 +39,10 @@ def index():
candidate = app.config[FRAMEWORKS].copy()
candidate.remove(app.config[FRAMEWORK])
return render_template(
- f"select_{app.config[FRAMEWORK]}.html",
+ f"select.html",
files=files,
framework=candidate[0],
+ used_framework=app.config[FRAMEWORK],
)
@@ -52,7 +53,10 @@ def show():
data = json.load(f)
summary = process_data(selected_file, data)
return render_template(
- f"report_{app.config[FRAMEWORK]}.html", data=data, summary=summary
+ f"report.html",
+ data=data,
+ summary=summary,
+ used_framework=app.config[FRAMEWORK],
)
diff --git a/benchmark/scripts/templates/base_bootstrap.html b/benchmark/scripts/templates/base_bootstrap.html
new file mode 100644
index 0000000..cd6a841
--- /dev/null
+++ b/benchmark/scripts/templates/base_bootstrap.html
@@ -0,0 +1,25 @@
+
+
+
+ {{ title }}
+
+
+
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
+
diff --git a/benchmark/scripts/templates/base_bulma.html b/benchmark/scripts/templates/base_bulma.html
new file mode 100644
index 0000000..927ea63
--- /dev/null
+++ b/benchmark/scripts/templates/base_bulma.html
@@ -0,0 +1,21 @@
+
+
+
+ {{ title }}
+
+
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
diff --git a/benchmark/scripts/templates/partials/js_select.html b/benchmark/scripts/templates/partials/js_select.html
new file mode 100644
index 0000000..4a76c38
--- /dev/null
+++ b/benchmark/scripts/templates/partials/js_select.html
@@ -0,0 +1,30 @@
+
\ No newline at end of file
diff --git a/benchmark/scripts/templates/partials/table_select_design.html b/benchmark/scripts/templates/partials/table_select_design.html
new file mode 100644
index 0000000..5c1589a
--- /dev/null
+++ b/benchmark/scripts/templates/partials/table_select_design.html
@@ -0,0 +1,11 @@
+
+
Benchmark Results
+
+
+ {% include "partials/table_select.html" %}
+
+
+
+
+{% include "partials/js_select.html" %}
\ No newline at end of file
diff --git a/benchmark/scripts/templates/report.html b/benchmark/scripts/templates/report.html
new file mode 100644
index 0000000..82e7f5c
--- /dev/null
+++ b/benchmark/scripts/templates/report.html
@@ -0,0 +1,187 @@
+{% set title = "Report Viewer" %}
+{% if used_framework == "bootstrap" %}
+ {% extends "base_bootstrap.html" %}
+{% else %}
+ {% extends "base_bulma.html" %}
+{% endif%}
+{% block content%}
+ {% if used_framework == "bootstrap" %}
+ {% set center = "text-center" %}
+ {% set right = "text-end" %}
+
+
+
+
+
+
{{ data.title }}
+
+
+
+
+
+ Platform |
+ Model |
+ Date |
+ Time |
+ {% if data.duration > 7200 %}
+ {% set unit = "h" %}
+ {% set divider = 3600 %}
+ {% else %}
+ {% set unit = "min" %}
+ {% set divider = 60 %}
+ {% endif %}
+ Duration ({{ unit }}) |
+ Stratified |
+ Discretized |
+ # Folds |
+
+
+ {{ data.platform }} |
+ {{ data.model }} {{ data.version }} |
+ {{ data.date}} |
+ {{ data.time}} |
+ {{ "%.2f" % (data.duration/divider) }} |
+ {{ data.stratified }} |
+ {{ data.discretized }} |
+ {{ data.folds }} |
+
+
+ Language |
+ {{ data.language }} {{ data.language_version }} |
+ Seeds |
+ {{ data.seeds }} |
+
+
+
+
+
+
+ Dataset |
+ Samples |
+ Features |
+ Classes |
+ Nodes |
+ {{data.score_name|capitalize}} |
+ Time |
+ hyperparameters |
+
+
+
+ {% include "partials/table_report.html" %}
+
+
+ {% if summary|length > 0 %}
+
+
+
+
+ Symbol |
+ Meaning |
+ Count |
+
+
+ {% include "partials/table_summary.html" %}
+
+
+ {% endif %}
+
+
+ Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
+
+
+
+
+ {% else %}
+ {% set center = "has-text-centered" %}
+ {% set right = "has-text-right" %}
+
+
+
+
+
+
+
{{ data.title }}
+
+
+
+
+
+
+
+
+
+
+ Platform |
+ Model |
+ Date |
+ Time |
+ {% if data.duration > 7200 %}
+ {% set unit = "h" %}
+ {% set divider = 3600 %}
+ {% else %}
+ {% set unit = "min" %}
+ {% set divider = 60 %}
+ {% endif %}
+ Duration ({{ unit }}) |
+ Stratified |
+ Discretized |
+ # Folds |
+
+
+ {{ data.platform }} |
+ {{ data.model }} {{ data.version }} |
+ {{ data.date}} |
+ {{ data.time}} |
+ {{ "%.2f" % (data.duration/divider) }} |
+ {{ data.stratified }} |
+ {{ data.discretized }} |
+ {{ data.folds }} |
+
+
+ Language |
+ {{ data.language }} {{ data.language_version }} |
+ Seeds |
+ {{ data.seeds }} |
+
+
+
+
+
+
+ Dataset |
+ Samples |
+ Features |
+ Classes |
+ Nodes |
+ {{data.score_name|capitalize}} |
+ Time |
+ hyperparameters |
+
+
+
+ {% include "partials/table_report.html" %}
+
+
+ {% if summary|length > 0 %}
+
+
+
+
+ Symbol |
+ Meaning |
+ Count |
+
+
+ {% include "partials/table_summary.html" %}
+
+
+ {% endif %}
+
+
+ Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
+
+
+
+
+ {% endif %}
+{% endblock %}
diff --git a/benchmark/scripts/templates/report_bootstrap.html b/benchmark/scripts/templates/report_bootstrap.html
deleted file mode 100644
index dcbedc9..0000000
--- a/benchmark/scripts/templates/report_bootstrap.html
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
- Report Viewer
-
-
-
-
- {% set center = "text-center" %}
- {% set right = "text-end" %}
-
-
-
-
-
-
{{ data.title }}
-
-
-
-
-
- Platform |
- Model |
- Date |
- Time |
- {% if data.duration > 7200 %}
- {% set unit = "h" %}
- {% set divider = 3600 %}
- {% else %}
- {% set unit = "min" %}
- {% set divider = 60 %}
- {% endif %}
- Duration ({{ unit }}) |
- Stratified |
- Discretized |
- # Folds |
-
-
- {{ data.platform }} |
- {{ data.model }} {{ data.version }} |
- {{ data.date}} |
- {{ data.time}} |
- {{ "%.2f" % (data.duration/divider) }} |
- {{ data.stratified }} |
- {{ data.discretized }} |
- {{ data.folds }} |
-
-
- Language |
- {{ data.language }} {{ data.language_version }} |
- Seeds |
- {{ data.seeds }} |
-
-
-
-
-
-
- Dataset |
- Samples |
- Features |
- Classes |
- Nodes |
- {{data.score_name|capitalize}} |
- Time |
- hyperparameters |
-
-
-
- {% include "partials/table_report.html" %}
-
-
- {% if summary|length > 0 %}
-
-
-
-
- Symbol |
- Meaning |
- Count |
-
-
- {% include "partials/table_summary.html" %}
-
-
- {% endif %}
-
-
- Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/benchmark/scripts/templates/report_bulma.html b/benchmark/scripts/templates/report_bulma.html
deleted file mode 100644
index a2da25b..0000000
--- a/benchmark/scripts/templates/report_bulma.html
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
- Report Viewer
-
-
-
-
- {% set center = "has-text-centered" %}
- {% set right = "has-text-right" %}
-
-
-
-
-
-
-
{{ data.title }}
-
-
-
-
-
-
-
-
-
-
- Platform |
- Model |
- Date |
- Time |
- {% if data.duration > 7200 %}
- {% set unit = "h" %}
- {% set divider = 3600 %}
- {% else %}
- {% set unit = "min" %}
- {% set divider = 60 %}
- {% endif %}
- Duration ({{ unit }}) |
- Stratified |
- Discretized |
- # Folds |
-
-
- {{ data.platform }} |
- {{ data.model }} {{ data.version }} |
- {{ data.date}} |
- {{ data.time}} |
- {{ "%.2f" % (data.duration/divider) }} |
- {{ data.stratified }} |
- {{ data.discretized }} |
- {{ data.folds }} |
-
-
- Language |
- {{ data.language }} {{ data.language_version }} |
- Seeds |
- {{ data.seeds }} |
-
-
-
-
-
-
- Dataset |
- Samples |
- Features |
- Classes |
- Nodes |
- {{data.score_name|capitalize}} |
- Time |
- hyperparameters |
-
-
-
- {% include "partials/table_report.html" %}
-
-
- {% if summary|length > 0 %}
-
-
-
-
- Symbol |
- Meaning |
- Count |
-
-
- {% include "partials/table_summary.html" %}
-
-
- {% endif %}
-
-
- Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/benchmark/scripts/templates/select.html b/benchmark/scripts/templates/select.html
new file mode 100644
index 0000000..7ab074c
--- /dev/null
+++ b/benchmark/scripts/templates/select.html
@@ -0,0 +1,22 @@
+{% set title = "Benchmark Results" %}
+{% if used_framework == "bootstrap" %}
+ {% extends "base_bootstrap.html" %}
+ {% set button_class = "btn btn-primary bt-sm" %}
+ {% set h1_class = "text-center" %}
+ {% set table_class = "table table-striped table-hover" %}
+ {% set button_pre = '' %}
+{% else %}
+ {% extends "base_bulma.html" %}
+ {% set button_class = "button is-primary is-small" %}
+ {% set h1_class = "title is-1 has-text-centered" %}
+ {% set table_class = "table is-striped is-hoverable cell-border" %}
+ {% set button_pre = 'View' %}
+ {% set selected = "is-selected" %}
+{% endif %}
+{% block content %}
+ {% include "partials/table_select_design.html" %}
+{% endblock %}
diff --git a/benchmark/scripts/templates/select_bootstrap.html b/benchmark/scripts/templates/select_bootstrap.html
deleted file mode 100644
index 1e2aba2..0000000
--- a/benchmark/scripts/templates/select_bootstrap.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
- Benchmark
-
-
-
-
-
-
-
-
-
Benchmark Results
-
- {% set table_class = "table table-striped table-hover" %}
- {% set button_pre = '' %}
- {% include "partials/table_select.html" %}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/benchmark/scripts/templates/select_bulma.html b/benchmark/scripts/templates/select_bulma.html
deleted file mode 100644
index c306978..0000000
--- a/benchmark/scripts/templates/select_bulma.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
- Benchmark Results
-
-
-
-
-
-
-
-
Benchmark Results
-
- {% set table_class = "table is-striped is-hoverable cell-border" %}
- {% set button_pre = 'View' %}
- {% include "partials/table_select.html" %}
-
-
-
-
-
-
-
\ No newline at end of file