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