mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-16 07:55:54 +00:00
Add button reset and refactor buttons in select
Change position of excel button in report
This commit is contained in:
@@ -10,17 +10,21 @@
|
|||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: Courier;
|
font-family: Courier;
|
||||||
}
|
}
|
||||||
#file-table tbody tr.selected td {
|
#file-table tbody tr.selected td {
|
||||||
background-color: #0dcaf0;
|
background-color: #0dcaf0;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
#report-table tbody tr.selected td {
|
#report-table tbody tr.selected td {
|
||||||
background-color: #0dcaf0;
|
background-color: #0dcaf0;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
.btn-small {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
{% else %}
|
{% else %}
|
||||||
<link
|
<link
|
||||||
|
@@ -11,7 +11,7 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
function excelFile() {
|
function excelFile() {
|
||||||
var selectedFiles = ["{{ file }}"];
|
var selectedFiles = ["{{ file }}"];
|
||||||
// send data to server with ajax post
|
// send data to server with ajax post
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'POST',
|
type:'POST',
|
||||||
url:'/excel',
|
url:'/excel',
|
||||||
|
@@ -9,7 +9,10 @@ $(document).ready(function () {
|
|||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
"targets": 8,
|
"targets": 8,
|
||||||
"orderable": false
|
"orderable": false
|
||||||
}]
|
}],
|
||||||
|
//"language": {
|
||||||
|
// "lengthMenu": "_MENU_"
|
||||||
|
//}
|
||||||
});
|
});
|
||||||
// Check if row is selected
|
// Check if row is selected
|
||||||
$('#file-table tbody').on('click', 'tr', function () {
|
$('#file-table tbody').on('click', 'tr', function () {
|
||||||
@@ -55,4 +58,10 @@ function excel() {
|
|||||||
alert(mensaje.mensaje);
|
alert(mensaje.mensaje);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
function clearCheckBoxes() {
|
||||||
|
var checkbox = document.getElementsByName("selected_files");
|
||||||
|
for (i = 0; i < checkbox.length; i++) {
|
||||||
|
checkbox[i].checked=false;
|
||||||
|
}
|
||||||
}
|
}
|
@@ -43,6 +43,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
<div>
|
||||||
|
<button class="{{ button }}" onclick="excelFile()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
||||||
|
</div>
|
||||||
<table id="report-table" class="table table-striped table-hover table-bordered">
|
<table id="report-table" class="table table-striped table-hover table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-primary text-white">
|
<tr class="bg-primary text-white">
|
||||||
@@ -79,9 +82,6 @@
|
|||||||
Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
|
Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
|
||||||
</b></h7>
|
</b></h7>
|
||||||
<h7>Number of files: {{ data.results | length }}</h7>
|
<h7>Number of files: {{ data.results | length }}</h7>
|
||||||
<div>
|
|
||||||
<button class="{{ button }}" onclick="excelFile()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
@@ -49,6 +49,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
<div>
|
||||||
|
<button class="{{ button }}" onclick="excelFile()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
||||||
|
</div>
|
||||||
<table id="report-table" class="table is-fullwidth is-striped is-hoverable is-bordered">
|
<table id="report-table" class="table is-fullwidth is-striped is-hoverable is-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="is-selected">
|
<tr class="is-selected">
|
||||||
@@ -85,9 +88,6 @@
|
|||||||
Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
|
Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }}
|
||||||
</b></h2>
|
</b></h2>
|
||||||
<h2>Number of files: {{ data.results | length }}</h2>
|
<h2>Number of files: {{ data.results | length }}</h2>
|
||||||
<div>
|
|
||||||
<button class="{{ button }}" onclick="excelFile()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
@@ -9,7 +9,7 @@
|
|||||||
<th>Stratified</th>
|
<th>Stratified</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Score</th>
|
<th>Score</th>
|
||||||
<th></th>
|
<th>{{ button_reset|safe }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@@ -4,10 +4,7 @@
|
|||||||
<div class="{{ frbutton_position }}">
|
<div class="{{ frbutton_position }}">
|
||||||
<button class="{{ button_class }}" onclick="location.href='/config/{{ candidate }}'">Use {{ candidate
|
<button class="{{ button_class }}" onclick="location.href='/config/{{ candidate }}'">Use {{ candidate
|
||||||
}}</button>
|
}}</button>
|
||||||
|
<button class="{{ button_class }}" onclick="excel()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
||||||
</div>
|
|
||||||
<div class="{{ level }}">
|
|
||||||
<button class="{{ button_class }}" onclick="excel()"><i class="mdi mdi-file-excel"></i> Excel</button>
|
|
||||||
</div>
|
</div>
|
||||||
{% if config.compare %}
|
{% if config.compare %}
|
||||||
<div class={{ frtag_position }}>
|
<div class={{ frtag_position }}>
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
{% set title = "Benchmark Results" %}
|
{% set title = "Benchmark Results" %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% if framework == "bootstrap" %}
|
{% if framework == "bootstrap" %}
|
||||||
{% set button_class = "btn btn-primary bt-sm" %}
|
{% set button_class = "btn btn-primary btn-small" %}
|
||||||
{% set h1_class = "text-center" %}
|
{% set h1_class = "text-center" %}
|
||||||
{% set table_class = "table table-striped table-hover table-bordered" %}
|
{% set table_class = "table table-striped table-hover table-bordered" %}
|
||||||
{% set button_pre = '<button class="btn btn-primary btn-sm"
|
{% set button_pre = '<button class="btn btn-primary btn-small"
|
||||||
style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem;"
|
|
||||||
onclick="showFile(\''%}
|
onclick="showFile(\''%}
|
||||||
{% set button_post = '\')"><i class="mdi mdi-eye"></i></button>' %}
|
{% set button_post = '\')"><i class="mdi mdi-eye"></i></button>' %}
|
||||||
{% set selected = "selected" %}
|
{% set selected = "selected" %}
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
{% set level = "navbar" %}
|
{% set level = "navbar" %}
|
||||||
{% set align_right = "text-end" %}
|
{% set align_right = "text-end" %}
|
||||||
{% set container = "container-fluid" %}
|
{% set container = "container-fluid" %}
|
||||||
|
{% set button_reset = '<button class="btn btn-primary btn-small btn-danger" onclick="clearCheckBoxes()"><i class="mdi mdi-backspace"></i></button>' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set button_class = "button is-primary is-small" %}
|
{% set button_class = "button is-primary is-small" %}
|
||||||
{% set h1_class = "title is-1 has-text-centered" %}
|
{% set h1_class = "title is-1 has-text-centered" %}
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
{% set level = "level" %}
|
{% set level = "level" %}
|
||||||
{% set tag_class = "tag is-primary is-small" %}
|
{% set tag_class = "tag is-primary is-small" %}
|
||||||
{% set container = "container is-fluid" %}
|
{% set container = "container is-fluid" %}
|
||||||
|
{% set button_reset = '<span class="tag is-link is-danger" type="button" onclick="clearCheckBoxes()"><i class="mdi mdi-backspace"></i></span>' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "partials/table_select_design.html" %}
|
{% include "partials/table_select_design.html" %}
|
||||||
|
Reference in New Issue
Block a user