Move datas in data folder, change link to JSON instead of missing graph

This commit is contained in:
poka 2020-09-30 19:32:19 +02:00
parent 0d71817bcd
commit 24379c89bc
2 changed files with 12 additions and 10 deletions

View File

@ -26,6 +26,7 @@ addMembers() {
web() {
[ ! -d $WEBPATH/history/ ] && mkdir -p $WEBPATH/history/
[ ! -d $WEBPATH/graph/ ] && mkdir -p $WEBPATH/graph/
[ ! -d $WEBPATH/data/ ] && mkdir -p $WEBPATH/data/
[ ! -d $WEBPATH/css ] && cp -r $GPATH/tpl/css $WEBPATH/
[ ! -d $WEBPATH/js ] && cp -r $GPATH/tpl/js $WEBPATH/
indexhtml="$WEBPATH/index.html"
@ -57,9 +58,10 @@ web() {
[[ -z $(grep '"display:none;" class="previous"' $indexhtml) ]] && sed -i "s/_datePrevious/$datePrevious/g" $indexhtml && setPrevious="Oui"
[[ -z $(grep '"display:none;" class="next"' $indexhtml) ]] && sed -i "s/_dateNext/$dateNext/g" $indexhtml && setNext="Oui"
echo "$wallets" | grep . > $WEBPATH/wallets-g1.txt
echo -e "$membresPubkeys" | sed 's/ /\n/g' > $WEBPATH/wallets-g1-membres.txt
echo -e "$simpleWallets" > $WEBPATH/wallets-g1-simple.txt
echo "$wallets" | grep . > $WEBPATH/data/wallets-g1.txt
echo -e "$membresPubkeys" | sed 's/ /\n/g' > $WEBPATH/data/wallets-g1-membres.txt
echo -e "$simpleWallets" > $WEBPATH/data/wallets-g1-simple.txt
cp $GPATH/db/daily.json $WEBPATH/data/
if [[ "$startTime" == "00:00" ]]; then
cp $indexhtml $WEBPATH/history/index_$day.html

View File

@ -10,7 +10,7 @@
<div class="header">
<center><h1>La Ḡ1 en quelques chiffres</h1>
<h3>Beta</h3>
<a href="/graph/mixed.html">Voir les graphiques</a></center>
<a href="data/daily.json">Voir le fichier JSON</a></center>
</div>
<div id="mainbloc">
@ -18,15 +18,15 @@
Date: <b>_day - _heure</b>
Noeud scanné: <b>https://duniter-g1.p2p.legal</b>
---
Nombre total de wallet: <b>_nbrTotalWallets</b> <a href="/graph/nbr_wallets.html">Voir le graphique</a>
Nombre total de wallet: <b>_nbrTotalWallets</b>
Nombre de membres: <b>_nbrMembers</b> (_pourcentMbrs%)
Nombre de simple portefeuille: <b>_nbrSimpleWallets</b> (_pourcentWallets%)
---
Reçus simples portefeuille: <b>_sumRW Ḡ1</b> <a href="/graph/recus.html">Voir le graphique</a>
Reçus simples portefeuille: <b>_sumRW Ḡ1</b>
Envoyé simples portefeuille: <b>_sumSW Ḡ1</b>
Soldes simples portefeuille: <b>_soldeW Ḡ1</b> (_pourcentSimpleWallet% de la masse monétaire totale)
---
Reçus membres: <b>_sumRM Ḡ1</b> (sans les DU) <a href="/graph/recus.html">Voir le graphique</a>
Reçus membres: <b>_sumRM Ḡ1</b> (sans les DU)
Envoyé membres: <b>_sumSM Ḡ1</b>
Soldes membres: <b>_soldeM Ḡ1</b> (sans les DU)
---
@ -39,9 +39,9 @@ Masse monétaire: <b>_monetaryMass Ḡ1</b>
</div>
<center>
| <a href="/wallets-g1.txt">Liste de tous les wallets</a>
| <a href="/wallets-g1-membres.txt">Liste des wallets membres</a>
| <a href="/wallets-g1-simple.txt">Liste des simples portefeuilles</a> |
| <a href="/data/wallets-g1.txt">Liste de tous les wallets</a>
| <a href="/data/wallets-g1-membres.txt">Liste des wallets membres</a>
| <a href="/data/wallets-g1-simple.txt">Liste des simples portefeuilles</a> |
<br><br>
Ces données sont mises à jours toutes les 3 heures.<br>