chg: [dashboard] add day date

This commit is contained in:
terrtia 2024-11-28 10:46:42 +01:00
parent 1c770988c5
commit 2d25579e7f
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 13 additions and 4 deletions

View file

@ -299,8 +299,8 @@ for taxonomy in default_taxonomies:
# ========== GIT Cache ============
clear_git_meta_cache()
# rrrr = [str(p) for p in app.url_map.iter_rules()]
# for p in rrrr:
# r = [str(p) for p in app.url_map.iter_rules()]
# for p in r:
# print(p)
# ============ MAIN ============

View file

@ -114,7 +114,9 @@
</div>
</div>
<div class="col-12 col-xl-6 mt-4">
<div class="col-12 col-xl-6">
<h3 class="text-center mt-1 mb-4" id="current_date"></h3>
<div class="row">
@ -215,8 +217,9 @@
<script>
var chart = {};
$(document).ready(function(){
$("#page-Decoded").addClass("active");
$("#page-Dashboard").addClass("active");
$("#nav_dashboard_{{obj_type}}").addClass("active");
updateDate();
});
var btn_selector = {
@ -323,6 +326,12 @@ function updateFeederChart(data) {
feederChart.setOption(optionFeeder)
}
function updateDate() {
let d = new Date();
let current_date = d.getUTCFullYear() + ' - ' + (d.getUTCMonth() + 1) + ' - ' + d.getUTCDate();
$('#current_date').text(current_date)
}
function updateNbObjects(data) {
for (const obj_type in data) {
btn_selector[obj_type].text(data[obj_type]);