cache control, layout scrolling, no cyan

This commit is contained in:
coulisse 2023-01-27 11:03:43 +01:00
parent bced1786fc
commit 01ed82c4ee
10 changed files with 128 additions and 20 deletions

View File

@ -1,5 +1,13 @@
### Change log
Date: 23/01/2023
Date: 27/01/2023
Release: v2.4.1.2
- Changed cache-control header
- Fixed Layout scrolling (SEO)
- First time spot load: not show cyan background
___
Date: 25/01/2023
Release: v2.4.1.2
- fixed issue #30 bug on callsign search

View File

@ -121,6 +121,7 @@ if [ "$1" == "-r" ]; then
echo 'remove some packages from requirements...'
sed -i '/certifi==/d' ../requirements.txt
sed -i '/staticjinja==/d' ../requirements.txt
sed -i '/lighthouse==/d' ../requirements.txt
if ! sed -i '13,20s/level=DEBUG/level=INFO/g' ${app_ini}; then
echo 'ERROR settimg loglevel=INFO '

View File

@ -20,7 +20,13 @@ db_insert () {
spotteritu=$(shuf -i 1-90 -n 1)
spottercq=$(shuf -i 1-40 -n 1)
#for epoc use https://www.epochconverter.com/
timestamp=$(shuf -i 1673759569-1673763169 -n 1)
curr_epoch_time=$(date +%s)
#timestamp=$(shuf -i 1673759569-1673763169 -n 1)
epoch_start=$((${curr_epoch_time}-3600))
echo ${curr_epoch_time}
echo ${epoch_start}
timestamp=$(shuf -i ${epoch_start}-${curr_epoch_time} -n 1)
cs_letter_1=$(chr $(shuf -i 65-90 -n1))
cs_letter_2=$(chr $(shuf -i 65-90 -n1))

2
scripts/lh.sh Executable file
View File

@ -0,0 +1,2 @@
lighthouse ${1} --chrome-flags=”--headless” --quiet --view

View File

@ -129,7 +129,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">We use cookies</h5>
<strong class="modal-title" id="exampleModalLabel">We use cookies</strong>
</div>
<div class="modal-body">
<p>We use only technical cookies.</p>

View File

@ -6,6 +6,7 @@ class table_builder {
constructor(selector) {
this.selector = selector;
this.current_data = [];
this.first_time = true;
}
/**
* @return last_rowid {integer} the last rowid
@ -36,25 +37,12 @@ class table_builder {
*/
#buildRow(line, isnew, dt_current, callsign = '') {
const row = document.createElement('tr');
/*
row.id = line.rowid;
if (callsign.length > 0) {
if (callsign == line.de) {
row.id = line.rowid;
} else if (callsign == line.dx) {
row.id = line.rowid;
}
} else if (isnew) {
row.className = 'table-info';
}
*/
if (callsign.length > 0) {
/*
do not check new lines
*/
} else if (isnew) {
} else if (isnew && !this.first_time) {
row.className = 'table-info';
}
@ -256,6 +244,8 @@ class table_builder {
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl);
});
this.first_time=false;
}
}
} //end class

File diff suppressed because one or more lines are too long

View File

@ -129,7 +129,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">We use cookies</h5>
<strong class="modal-title" id="exampleModalLabel">We use cookies</strong>
</div>
<div class="modal-body">
<p>We use only technical cookies.</p>

View File

@ -188,6 +188,107 @@
</tr>
</thead>
<tbody id="bodyspot">
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</tbody>
</table>
</div>

View File

@ -471,7 +471,7 @@ def add_security_headers(resp):
resp.headers["X-Frame-Options"] = "SAMEORIGIN"
resp.headers["X-Content-Type-Options"] = "nosniff"
resp.headers["Referrer-Policy"] = "strict-origin-when-cross-origin"
resp.headers["Cache-Control"] = "public, no-cache"
resp.headers["Cache-Control"] = "public, no-cache, no-store, must-revalidate"
resp.headers["Pragma"] = "no-cache"
resp.headers["Content-Security-Policy"] = "\