diff --git a/server/templates/logger.html b/server/templates/logger.html index 3ee27a3..2fd3b82 100644 --- a/server/templates/logger.html +++ b/server/templates/logger.html @@ -6,18 +6,14 @@ var intTime=200; // fix visualizzazioni fixDisplay(); + fixFileTable(); // avvio timer var timeout = setTimeout(dataRefresh, intTime); var fileTable = [ { - "File Name": "-", - "File Size": "0", - "Date": "2021/04/02 15:01:23" - }, - { - "File Name": "-", - "File Size": "0", - "Date": "2021/04/02 15:01:23" + "name": "-", + "size": "0", + "date": "2021/04/02 15:01:23" } ] @@ -96,7 +92,7 @@ ,data: "" }) // fix file - UpdateFileTable(fileTable); + fixFileTable(); }; // Funzione stopLog: fa chiamata per settare a 0 il LOG:STATUS @@ -108,12 +104,20 @@ }) // fix file - UpdateFileTable(fileTable); + fixFileTable(); }; + function fixFileTable(){ + // scarico i dati aggioranti + $.ajax({url: "/api/v1/files/list", success: function(result){ + fileTable = result.fileTable; + // fix file + UpdateFileTable(fileTable); + }}); + } + function UpdateFileTable(fileTable) { - // EXTRACT VALUE FOR HTML HEADER. // ('Book ID', 'Book Name', 'Category' and 'Price') var col = []; @@ -190,7 +194,6 @@
File Write period: ms -
@@ -208,16 +211,9 @@
Session:  
- - - - - -

- - -
+

+ {% endblock %} \ No newline at end of file