mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-16 07:55:54 +00:00
Add first select table with data
This commit is contained in:
@@ -108,7 +108,8 @@ class Files:
|
|||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def get_all_results(self, hidden) -> list[str]:
|
@staticmethod
|
||||||
|
def get_all_results(hidden) -> list[str]:
|
||||||
result_path = os.path.join(
|
result_path = os.path.join(
|
||||||
".", Folders.hidden_results if hidden else Folders.results
|
".", Folders.hidden_results if hidden else Folders.results
|
||||||
)
|
)
|
||||||
@@ -117,7 +118,7 @@ class Files:
|
|||||||
else:
|
else:
|
||||||
raise ValueError(f"{result_path} does not exist")
|
raise ValueError(f"{result_path} does not exist")
|
||||||
result = []
|
result = []
|
||||||
prefix, suffix = self.results_suffixes()
|
prefix, suffix = Files.results_suffixes()
|
||||||
for result_file in files_list:
|
for result_file in files_list:
|
||||||
if result_file.startswith(prefix) and result_file.endswith(suffix):
|
if result_file.startswith(prefix) and result_file.endswith(suffix):
|
||||||
result.append(result_file)
|
result.append(result_file)
|
||||||
|
@@ -5,7 +5,7 @@ from flask_login import LoginManager
|
|||||||
from .config import Config
|
from .config import Config
|
||||||
from .models import User, db
|
from .models import User, db
|
||||||
|
|
||||||
# from .results import results
|
from .results.main import results
|
||||||
from .main import main
|
from .main import main
|
||||||
|
|
||||||
bootstrap = Bootstrap5()
|
bootstrap = Bootstrap5()
|
||||||
@@ -31,6 +31,7 @@ def create_app():
|
|||||||
login_manager.init_app(app)
|
login_manager.init_app(app)
|
||||||
login_manager.login_view = "main.login"
|
login_manager.login_view = "main.login"
|
||||||
app.jinja_env.auto_reload = True
|
app.jinja_env.auto_reload = True
|
||||||
|
app.register_blueprint(results, url_prefix="/results")
|
||||||
app.register_blueprint(main)
|
app.register_blueprint(main)
|
||||||
app.shell_context_processor(make_shell_context)
|
app.shell_context_processor(make_shell_context)
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
@@ -1,19 +1,14 @@
|
|||||||
import os
|
|
||||||
from flask import (
|
from flask import (
|
||||||
Blueprint,
|
Blueprint,
|
||||||
current_app,
|
|
||||||
render_template,
|
render_template,
|
||||||
url_for,
|
url_for,
|
||||||
flash,
|
flash,
|
||||||
redirect,
|
redirect,
|
||||||
request,
|
request,
|
||||||
abort,
|
|
||||||
)
|
)
|
||||||
from flask_login import login_user, current_user, logout_user, login_required
|
from flask_login import login_user, current_user, logout_user, login_required
|
||||||
from werkzeug.urls import url_parse
|
from werkzeug.urls import url_parse
|
||||||
from benchmark.Utils import Files, Folders
|
|
||||||
from .forms import LoginForm
|
from .forms import LoginForm
|
||||||
from benchmark.ResultsBase import StubReport
|
|
||||||
from .models import User
|
from .models import User
|
||||||
|
|
||||||
main = Blueprint("main", __name__)
|
main = Blueprint("main", __name__)
|
||||||
@@ -22,46 +17,13 @@ main = Blueprint("main", __name__)
|
|||||||
@main.route("/")
|
@main.route("/")
|
||||||
@main.route("/index")
|
@main.route("/index")
|
||||||
def index():
|
def index():
|
||||||
# Get a list of files in a directory
|
|
||||||
files = {}
|
|
||||||
compare = False
|
|
||||||
# names = Files.get_all_results(hidden=False)
|
|
||||||
# for name in names:
|
|
||||||
# report = StubReport(os.path.join(Folders.results, name))
|
|
||||||
# report.report()
|
|
||||||
# files[name] = {
|
|
||||||
# "duration": report.duration,
|
|
||||||
# "score": report.score,
|
|
||||||
# "title": report.title,
|
|
||||||
# }
|
|
||||||
# candidate = current_app.config["FRAMEWORKS"].copy()
|
|
||||||
# candidate.remove(current_app.config["FRAMEWORK"])
|
|
||||||
# return render_template(
|
|
||||||
# "select.html",
|
|
||||||
# files=files,
|
|
||||||
# candidate=candidate[0],
|
|
||||||
# framework=current_app.config["FRAMEWORK"],
|
|
||||||
# compare=compare.capitalize() == "True",
|
|
||||||
# )
|
|
||||||
return render_template("index.html")
|
return render_template("index.html")
|
||||||
|
|
||||||
|
|
||||||
@main.route("/results")
|
|
||||||
@login_required
|
|
||||||
def results():
|
|
||||||
return render_template("results.html")
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/datasets")
|
|
||||||
@login_required
|
|
||||||
def datasets():
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/config")
|
@main.route("/config")
|
||||||
@login_required
|
@login_required
|
||||||
def config():
|
def config():
|
||||||
pass
|
return render_template("config.html")
|
||||||
|
|
||||||
|
|
||||||
@main.route("/login", methods=["GET", "POST"])
|
@main.route("/login", methods=["GET", "POST"])
|
||||||
|
46
benchmark/scripts/flask_app/results/main.py
Normal file
46
benchmark/scripts/flask_app/results/main.py
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import os
|
||||||
|
import json
|
||||||
|
import shutil
|
||||||
|
import xlsxwriter
|
||||||
|
from benchmark.Utils import Files, Folders
|
||||||
|
from benchmark.Arguments import EnvData
|
||||||
|
from benchmark.ResultsBase import StubReport
|
||||||
|
from benchmark.ResultsFiles import Excel, ReportDatasets
|
||||||
|
from benchmark.Datasets import Datasets
|
||||||
|
from flask import Blueprint, current_app, send_file
|
||||||
|
from flask import render_template, current_app, request, redirect, url_for
|
||||||
|
from flask_login import login_required
|
||||||
|
|
||||||
|
results = Blueprint("results", __name__, template_folder="templates")
|
||||||
|
|
||||||
|
|
||||||
|
@results.route("/select")
|
||||||
|
@login_required
|
||||||
|
def select(compare="False"):
|
||||||
|
# Get a list of files in a directory
|
||||||
|
files = {}
|
||||||
|
names = Files.get_all_results(hidden=False)
|
||||||
|
for name in names:
|
||||||
|
report = StubReport(os.path.join(Folders.results, name))
|
||||||
|
report.report()
|
||||||
|
files[name] = {
|
||||||
|
"duration": report.duration,
|
||||||
|
"score": report.score,
|
||||||
|
"title": report.title,
|
||||||
|
}
|
||||||
|
candidate = current_app.config["FRAMEWORKS"].copy()
|
||||||
|
candidate.remove(current_app.config["FRAMEWORK"])
|
||||||
|
return render_template(
|
||||||
|
"select.html",
|
||||||
|
files=files,
|
||||||
|
candidate=candidate[0],
|
||||||
|
framework=current_app.config["FRAMEWORK"],
|
||||||
|
compare=compare.capitalize() == "True",
|
||||||
|
)
|
||||||
|
return render_template("test.html")
|
||||||
|
|
||||||
|
|
||||||
|
@results.route("/datasets")
|
||||||
|
@login_required
|
||||||
|
def datasets(compare="False"):
|
||||||
|
return render_template("test.html")
|
@@ -1,88 +1,91 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import os
|
# import os
|
||||||
import json
|
# import json
|
||||||
import shutil
|
# import shutil
|
||||||
import xlsxwriter
|
# import xlsxwriter
|
||||||
from benchmark.Utils import Files, Folders
|
# from benchmark.Utils import Files, Folders
|
||||||
from benchmark.Arguments import EnvData
|
# from benchmark.Arguments import EnvData
|
||||||
from benchmark.ResultsBase import StubReport
|
# from benchmark.ResultsBase import StubReport
|
||||||
from benchmark.ResultsFiles import Excel, ReportDatasets
|
# from benchmark.ResultsFiles import Excel, ReportDatasets
|
||||||
from benchmark.Datasets import Datasets
|
# from benchmark.Datasets import Datasets
|
||||||
from flask import Blueprint, current_app, send_file
|
# from flask import Blueprint, current_app, send_file
|
||||||
from flask import render_template, request, redirect, url_for
|
# from flask import render_template, request, redirect, url_for
|
||||||
|
from flask import Blueprint, render_template
|
||||||
|
|
||||||
|
|
||||||
main = Blueprint("main", __name__)
|
results = Blueprint("results", __name__, template_folder="results")
|
||||||
FRAMEWORK = "framework"
|
# FRAMEWORK = "framework"
|
||||||
FRAMEWORKS = "frameworks"
|
# FRAMEWORKS = "frameworks"
|
||||||
OUTPUT = "output"
|
# OUTPUT = "output"
|
||||||
TEST = "test"
|
# TEST = "test"
|
||||||
|
|
||||||
|
|
||||||
class AjaxResponse:
|
# class AjaxResponse:
|
||||||
def __init__(self, success, file_name, code=200):
|
# def __init__(self, success, file_name, code=200):
|
||||||
self.success = success
|
# self.success = success
|
||||||
self.file_name = file_name
|
# self.file_name = file_name
|
||||||
self.code = code
|
# self.code = code
|
||||||
|
|
||||||
def to_string(self):
|
# def to_string(self):
|
||||||
return (
|
# return (
|
||||||
json.dumps(
|
# json.dumps(
|
||||||
{
|
# {
|
||||||
"success": self.success,
|
# "success": self.success,
|
||||||
"file": self.file_name,
|
# "file": self.file_name,
|
||||||
"output": current_app.config[OUTPUT],
|
# "output": current_app.config[OUTPUT],
|
||||||
}
|
# }
|
||||||
),
|
# ),
|
||||||
self.code,
|
# self.code,
|
||||||
{"ContentType": "application/json"},
|
# {"ContentType": "application/json"},
|
||||||
)
|
# )
|
||||||
|
|
||||||
|
|
||||||
def process_data(file_name, compare, data):
|
# def process_data(file_name, compare, data):
|
||||||
report = StubReport(
|
# report = StubReport(
|
||||||
os.path.join(Folders.results, file_name), compare=compare
|
# os.path.join(Folders.results, file_name), compare=compare
|
||||||
)
|
# )
|
||||||
new_list = []
|
# new_list = []
|
||||||
for result in data["results"]:
|
# for result in data["results"]:
|
||||||
symbol = report._compute_status(result["dataset"], result["score"])
|
# symbol = report._compute_status(result["dataset"], result["score"])
|
||||||
result["symbol"] = symbol if symbol != " " else " "
|
# result["symbol"] = symbol if symbol != " " else " "
|
||||||
new_list.append(result)
|
# new_list.append(result)
|
||||||
data["results"] = new_list
|
# data["results"] = new_list
|
||||||
# Compute summary with explanation of symbols
|
# # Compute summary with explanation of symbols
|
||||||
summary = {}
|
# summary = {}
|
||||||
for key, value in report._compare_totals.items():
|
# for key, value in report._compare_totals.items():
|
||||||
summary[key] = (report._status_meaning(key), value)
|
# summary[key] = (report._status_meaning(key), value)
|
||||||
return summary
|
# return summary
|
||||||
|
|
||||||
|
|
||||||
@results.route("/index/<compare>")
|
@results.route("/results/<compare>")
|
||||||
@results.route("/")
|
def results(compare="False"):
|
||||||
def index(compare="False"):
|
# # Get a list of files in a directory
|
||||||
# Get a list of files in a directory
|
# files = {}
|
||||||
files = {}
|
# names = Files.get_all_results(hidden=False)
|
||||||
names = Files.get_all_results(hidden=False)
|
# for name in names:
|
||||||
for name in names:
|
# report = StubReport(os.path.join(Folders.results, name))
|
||||||
report = StubReport(os.path.join(Folders.results, name))
|
# report.report()
|
||||||
report.report()
|
# files[name] = {
|
||||||
files[name] = {
|
# "duration": report.duration,
|
||||||
"duration": report.duration,
|
# "score": report.score,
|
||||||
"score": report.score,
|
# "title": report.title,
|
||||||
"title": report.title,
|
# }
|
||||||
}
|
# candidate = current_app.config[FRAMEWORKS].copy()
|
||||||
candidate = current_app.config[FRAMEWORKS].copy()
|
# candidate.remove(current_app.config[FRAMEWORK])
|
||||||
candidate.remove(current_app.config[FRAMEWORK])
|
# return render_template(
|
||||||
return render_template(
|
# "select.html",
|
||||||
"select.html",
|
# files=files,
|
||||||
files=files,
|
# candidate=candidate[0],
|
||||||
candidate=candidate[0],
|
# framework=current_app.config[FRAMEWORK],
|
||||||
framework=current_app.config[FRAMEWORK],
|
# compare=compare.capitalize() == "True",
|
||||||
compare=compare.capitalize() == "True",
|
# )
|
||||||
)
|
return render_template("test.html")
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
@results.route("/datasets/<compare>")
|
@results.route("/datasets/<compare>")
|
||||||
def datasets(compare):
|
@results.route("datasets")
|
||||||
|
def datasets(compare=False):
|
||||||
dt = Datasets()
|
dt = Datasets()
|
||||||
datos = []
|
datos = []
|
||||||
for dataset in dt:
|
for dataset in dt:
|
||||||
@@ -206,3 +209,4 @@ def best_results(file, compare):
|
|||||||
compare=compare,
|
compare=compare,
|
||||||
framework=current_app.config[FRAMEWORK],
|
framework=current_app.config[FRAMEWORK],
|
||||||
)
|
)
|
||||||
|
"""
|
@@ -0,0 +1,50 @@
|
|||||||
|
{%- macro get_button_tag(icon_name, method, visible=True, name="") -%}
|
||||||
|
<button class="btn btn-primary btn-small" onclick="{{ method }}" {{ "" if visible else "hidden='true'" }} {{ "" if name=="" else "name='" + name +"'"}}><i class="mdi mdi-{{ icon_name }}"></i>
|
||||||
|
</button>
|
||||||
|
{%- endmacro -%}
|
||||||
|
<table id="file-table"
|
||||||
|
class="table table-striped table-hover table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Model</th>
|
||||||
|
<th>Metric</th>
|
||||||
|
<th>Platform</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Time</th>
|
||||||
|
<th>Stratified</th>
|
||||||
|
<th>Title</th>
|
||||||
|
<th>Score</th>
|
||||||
|
<th>
|
||||||
|
<button class="btn btn-primary btn-small btn-danger"
|
||||||
|
onclick="setCheckBoxes(false)">
|
||||||
|
<i class="mdi mdi-checkbox-multiple-blank"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-small btn-success"
|
||||||
|
onclick="setCheckBoxes(true)">
|
||||||
|
<i class="mdi mdi-checkbox-multiple-marked"></i>
|
||||||
|
</button>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for file, data in files.items() %}
|
||||||
|
{% set parts = file.split('_') %}
|
||||||
|
{% set stratified = parts[6].split('.')[0] %}
|
||||||
|
<tr id="{{ file }}">
|
||||||
|
<td>{{ parts[2] }}</td>
|
||||||
|
<td>{{ parts[1] }}</td>
|
||||||
|
<td>{{ parts[3] }}</td>
|
||||||
|
<td>{{ parts[4] }}</td>
|
||||||
|
<td>{{ parts[5] }}</td>
|
||||||
|
<td>{{ 'True' if stratified =='1' else 'False' }}</td>
|
||||||
|
<td>{{ "%s" % data["title"] }}</td>
|
||||||
|
<td class="text-end">{{ "%.6f" % data["score"] }}</td>
|
||||||
|
<td>
|
||||||
|
{{ get_button_tag("table-eye", "showFile('" ~ file ~ "') ") | safe }}
|
||||||
|
{% set file_best = "best_results_" ~ parts[1] ~ "_" ~ parts[2] ~ ".json" %}
|
||||||
|
{{ get_button_tag("star-circle-outline", "redirectDouble('best_results', '" ~ file_best ~ "') ", visible=False, name="best_buttons") | safe }}
|
||||||
|
<input type="checkbox" name="selected_files" value="{{ file }}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
@@ -0,0 +1,9 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block content %}
|
||||||
|
{% include "_table_select.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
{% block jscript %}
|
||||||
|
{{ super() }}
|
||||||
|
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script src="{{ url_for('static', filename="js/select.js") }}"></script>
|
||||||
|
{% endblock %}
|
97
benchmark/scripts/flask_app/static/js/select.js
Normal file
97
benchmark/scripts/flask_app/static/js/select.js
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
$(document).ready(function () {
|
||||||
|
var table = $("#file-table").DataTable({
|
||||||
|
paging: true,
|
||||||
|
searching: true,
|
||||||
|
ordering: true,
|
||||||
|
info: true,
|
||||||
|
"select.items": "row",
|
||||||
|
pageLength: 25,
|
||||||
|
columnDefs: [
|
||||||
|
{
|
||||||
|
targets: 8,
|
||||||
|
orderable: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
//"language": {
|
||||||
|
// "lengthMenu": "_MENU_"
|
||||||
|
//}
|
||||||
|
});
|
||||||
|
$('#file-table').on( 'draw.dt', function () {
|
||||||
|
enable_disable_best_buttons();
|
||||||
|
} );
|
||||||
|
// Check if row is selected
|
||||||
|
$("#file-table tbody").on("click", "tr", function () {
|
||||||
|
if ($(this).hasClass("selected")) {
|
||||||
|
$(this).removeClass("selected");
|
||||||
|
} else {
|
||||||
|
table
|
||||||
|
.$("tr.selected")
|
||||||
|
.removeClass("selected");
|
||||||
|
$(this).addClass("selected");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Show file with doubleclick
|
||||||
|
$("#file-table tbody").on("dblclick", "tr", function () {
|
||||||
|
showFile($(this).attr("id"));
|
||||||
|
});
|
||||||
|
$(document).ajaxStart(function () {
|
||||||
|
$("body").addClass("ajaxLoading");
|
||||||
|
});
|
||||||
|
$(document).ajaxStop(function () {
|
||||||
|
$("body").removeClass("ajaxLoading");
|
||||||
|
});
|
||||||
|
$('#compare').change(function() {
|
||||||
|
enable_disable_best_buttons();
|
||||||
|
});
|
||||||
|
enable_disable_best_buttons();
|
||||||
|
});
|
||||||
|
function enable_disable_best_buttons(){
|
||||||
|
if ($('#compare').is(':checked')) {
|
||||||
|
$("[name='best_buttons']").addClass("tag is-link is-normal");
|
||||||
|
$("[name='best_buttons']").removeAttr("hidden");
|
||||||
|
} else {
|
||||||
|
$("[name='best_buttons']").removeClass("tag is-link is-normal");
|
||||||
|
$("[name='best_buttons']").attr("hidden", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function showFile(selectedFile) {
|
||||||
|
var form = $(
|
||||||
|
'<form action="/show" method="post">' +
|
||||||
|
'<input type="hidden" name="selected-file" value="' +
|
||||||
|
selectedFile +
|
||||||
|
'" />' +
|
||||||
|
'<input type="hidden" name="compare" value=' +
|
||||||
|
$("#compare").is(":checked") +
|
||||||
|
" />" +
|
||||||
|
"</form>"
|
||||||
|
);
|
||||||
|
$("body").append(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
function excel() {
|
||||||
|
var checkbox = document.getElementsByName("selected_files");
|
||||||
|
var selectedFiles = [];
|
||||||
|
for (var i = 0; i < checkbox.length; i++) {
|
||||||
|
if (checkbox[i].checked) {
|
||||||
|
selectedFiles.push(checkbox[i].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selectedFiles.length == 0) {
|
||||||
|
alert("Select at least one file");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var compare = $("#compare").is(":checked");
|
||||||
|
excelFiles(selectedFiles, compare);
|
||||||
|
}
|
||||||
|
function setCheckBoxes(value) {
|
||||||
|
var checkbox = document.getElementsByName("selected_files");
|
||||||
|
for (i = 0; i < checkbox.length; i++) {
|
||||||
|
checkbox[i].checked = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function redirectDouble(route, parameter) {
|
||||||
|
location.href = "/"+ route + "/" + parameter + "/" + $("#compare").is(":checked");
|
||||||
|
}
|
||||||
|
function redirectSimple(route) {
|
||||||
|
location.href = "/" + route + "/" + $("#compare").is(":checked");
|
||||||
|
}
|
@@ -13,13 +13,11 @@
|
|||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<!-- Left side of navbar -->
|
<!-- Left side of navbar -->
|
||||||
<ul class="navbar-nav me-auto">
|
<ul class="navbar-nav me-auto">
|
||||||
<li class="nav-item">
|
{{ render_nav_item('main.index', 'Home') }}
|
||||||
<a class="nav-link" href="{{ url_for("main.index") }}">Home</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav justify-content-end">
|
<ul class="navbar-nav justify-content-end">
|
||||||
{{ render_nav_item('main.results', 'Results') }}
|
{{ render_nav_item('results.select', 'Results') }}
|
||||||
{{ render_nav_item('main.datasets', 'Datasets') }}
|
{{ render_nav_item('results.datasets', 'Datasets') }}
|
||||||
{{ render_nav_item('main.config', 'Config') }}
|
{{ render_nav_item('main.config', 'Config') }}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ render_nav_item('main.logout', 'Logout') }}
|
{{ render_nav_item('main.logout', 'Logout') }}
|
||||||
|
@@ -20,5 +20,8 @@
|
|||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
{% block jscript %}{{ bootstrap.load_js() }}{% endblock %}
|
{% block jscript %}
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
{{ bootstrap.load_js() }}
|
||||||
|
{% endblock %}
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1,49 +0,0 @@
|
|||||||
{% block doc -%}
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html {% block html_attribs %}{% endblock html_attribs %}>
|
|
||||||
{%- block html %}
|
|
||||||
<head>
|
|
||||||
{%- block head %}
|
|
||||||
<title>
|
|
||||||
{% block title %}
|
|
||||||
{{ title|default }}
|
|
||||||
{% endblock title %}
|
|
||||||
</title>
|
|
||||||
{%- block metas %}
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
{%- endblock metas %}
|
|
||||||
{%- block styles %}
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
|
||||||
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65"
|
|
||||||
crossorigin="anonymous">
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600"
|
|
||||||
rel="stylesheet" />
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/7.1.96/css/materialdesignicons.css"
|
|
||||||
integrity="sha512-lD1LHcZ8tFHvMFNeo6qOLY/HjzSPCasPJOAoir22byDxlZI1R71S5lZel8zRL2TZ+Dut1wOHfYgSU2lHXuL00w=="
|
|
||||||
crossorigin="anonymous"
|
|
||||||
referrerpolicy="no-referrer" />
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="{{ url_for('static', filename='css/main.css') }}" />
|
|
||||||
</head>
|
|
||||||
{%- endblock styles %}
|
|
||||||
{%- endblock head %}
|
|
||||||
</head>
|
|
||||||
<body {% block body_attribs %}{% endblock body_attribs %}>
|
|
||||||
{% block body -%}
|
|
||||||
{% block navbar %}
|
|
||||||
{%- endblock navbar %}
|
|
||||||
{% block content -%}
|
|
||||||
{%- endblock content %}
|
|
||||||
{% block scripts %}
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
|
|
||||||
integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
{%- endblock scripts %}
|
|
||||||
{%- endblock body %}
|
|
||||||
</body>
|
|
||||||
{%- endblock html %}
|
|
||||||
</html>
|
|
||||||
{% endblock doc -%}
|
|
@@ -1,27 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>
|
|
||||||
{% block title %}
|
|
||||||
{{ title|default }}
|
|
||||||
{% endblock title %}
|
|
||||||
</title>
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css" />
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css" />
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/7.1.96/css/materialdesignicons.css"
|
|
||||||
integrity="sha512-lD1LHcZ8tFHvMFNeo6qOLY/HjzSPCasPJOAoir22byDxlZI1R71S5lZel8zRL2TZ+Dut1wOHfYgSU2lHXuL00w=="
|
|
||||||
crossorigin="anonymous"
|
|
||||||
referrerpolicy="no-referrer" />
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="{{ url_for('static', filename='css/main.css') }}" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
{% block navbar %}{% endblock %}
|
|
||||||
{% block content %}{% endblock %}
|
|
||||||
</body>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
||||||
{% block jscript %}{% endblock %}
|
|
||||||
</html>
|
|
Reference in New Issue
Block a user