forked from axiom-team/g1-stats
Compare commits
28 Commits
Author | SHA1 | Date |
---|---|---|
poka | a48ce32353 | |
poka | f8aa042a4b | |
poka | f2c19fb680 | |
poka | 0b449b4898 | |
poka | ff3e9486a8 | |
poka | 4000196acb | |
poka | 8d095771fc | |
poka | a9d85d974e | |
poka | 283af1b556 | |
poka | 92ae59a361 | |
poka | e671679932 | |
poka | 97669b90af | |
poka | 83475b8dfc | |
poka | 19b7cb156f | |
poka | b5f41b3c4c | |
poka | f2d925f139 | |
poka | 09abd63895 | |
poka | 23ef3b516c | |
poka | bbbaec2c9c | |
poka | 507fd996ad | |
poka | 67cd569684 | |
poka | b8db6bc258 | |
poka | 6406abc24d | |
poka | 58c485f568 | |
poka | 19d21c5846 | |
poka | 52c94e9f4d | |
poka | 542fd94012 | |
poka | 25a1d44ffe |
|
@ -6,3 +6,5 @@ debug.log
|
||||||
bk-debug.log
|
bk-debug.log
|
||||||
bk
|
bk
|
||||||
.gitPushToMaster.sh
|
.gitPushToMaster.sh
|
||||||
|
walletsBalance.log
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,4 @@ Par exemple pour l'exécuter toutes les 3 heures:
|
||||||
TERM=xterm # Nécessaire pour la gestion tput des sorties log
|
TERM=xterm # Nécessaire pour la gestion tput des sorties log
|
||||||
0 */3 * * * /path/to/script/g1-stats.sh web >> /var/log/g1-stats.log 2>&1
|
0 */3 * * * /path/to/script/g1-stats.sh web >> /var/log/g1-stats.log 2>&1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,15 @@ anniversary() {
|
||||||
jq "$jqNewUD" <<<$jsonData
|
jq "$jqNewUD" <<<$jsonData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
today() {
|
||||||
|
todayDate=$(date +'%d-%m-%y')
|
||||||
|
jq '.[] | select(.date=="'$todayDate'")' <<<$jsonData
|
||||||
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
curl -s https://g1-stats.axiom-team.fr/data/daily.json > $jsonFile && echo "Data have been updated" || echo "Error: Can't update data"
|
||||||
|
}
|
||||||
|
|
||||||
print() {
|
print() {
|
||||||
jq . <<<"$jsonData"
|
jq . <<<"$jsonData"
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ if $debug; then
|
||||||
echo # To clean next progress view
|
echo # To clean next progress view
|
||||||
else
|
else
|
||||||
TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]')
|
TXBLOCKS=$(curl -s ${DUNITER}/blockchain/with/tx | jq '.result.blocks[]')
|
||||||
|
# TXBLOCKS=$(cat $GPATH/tx.json | jq '.result.blocks[]')
|
||||||
echo "TXBLOCKS OK"
|
echo "TXBLOCKS OK"
|
||||||
membresPubkeys=$(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey')
|
membresPubkeys=$(curl -s ${DUNITER}/wot/members | jq -r '.results[].pubkey')
|
||||||
tput cuu1;tput el;
|
tput cuu1;tput el;
|
||||||
|
|
|
@ -54,7 +54,7 @@ web() {
|
||||||
sed -i "s/_pourcentSimpleWallet/$pourcentSimpleWallet/g" $indexhtml
|
sed -i "s/_pourcentSimpleWallet/$pourcentSimpleWallet/g" $indexhtml
|
||||||
sed -i "s/_nonConsumedUDT/$nonConsumedUDT/g" $indexhtml
|
sed -i "s/_nonConsumedUDT/$nonConsumedUDT/g" $indexhtml
|
||||||
sed -i "s/_monetaryMass/$monetaryMass/g" $indexhtml
|
sed -i "s/_monetaryMass/$monetaryMass/g" $indexhtml
|
||||||
sed -i "s/_sleepyG1/$sleepyG1/g" $indexhtml
|
# sed -i "s/_sleepyG1/$sleepyG1/g" $indexhtml
|
||||||
[[ -z $(grep '"display:none;" class="previous"' $indexhtml) ]] && sed -i "s/_datePrevious/$datePrevious/g" $indexhtml && setPrevious="Oui"
|
[[ -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"
|
[[ -z $(grep '"display:none;" class="next"' $indexhtml) ]] && sed -i "s/_dateNext/$dateNext/g" $indexhtml && setNext="Oui"
|
||||||
|
|
||||||
|
@ -132,3 +132,21 @@ Analyse
|
||||||
---
|
---
|
||||||
$sleepyG1% des Ḡ1 n'ont jamais été utilisés."
|
$sleepyG1% des Ḡ1 n'ont jamais été utilisés."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rmOldCache() {
|
||||||
|
keepCache=20
|
||||||
|
listCache=$(ls -l $GPATH/db/bk-* | awk '{ print $9 }')
|
||||||
|
listID=$(echo "$listCache" | awk -F '-' '{ print $NF }')
|
||||||
|
|
||||||
|
nbrID=$(echo "$listID" | wc -l)
|
||||||
|
nbrToSup=$((nbrID-$keepCache))
|
||||||
|
|
||||||
|
if [[ $nbrToSup -ge 0 ]]; then
|
||||||
|
cacheIDToSup=$(echo "$listID" | head -n$nbrToSup)
|
||||||
|
|
||||||
|
for i in $cacheIDToSup; do
|
||||||
|
rm $GPATH/db/bk-daily.json-$i
|
||||||
|
rm $GPATH/cache/bk-walletsUp-$i
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ scanTxWallets() {
|
||||||
local blockDateLast=$(cat "$startFile" | sed -e '1,/---/d' | sed -e '1,/---/d' | sed '/---/Q' | grep . | cut -d '|' -f 2)
|
local blockDateLast=$(cat "$startFile" | sed -e '1,/---/d' | sed -e '1,/---/d' | sed '/---/Q' | grep . | cut -d '|' -f 2)
|
||||||
local nbrDays=$(cat "$startFile" | sed -e '1,/---/d' | sed -e '1,/---/d' | sed '/---/Q' | grep . | cut -d '|' -f 3)
|
local nbrDays=$(cat "$startFile" | sed -e '1,/---/d' | sed -e '1,/---/d' | sed '/---/Q' | grep . | cut -d '|' -f 3)
|
||||||
#! ($debug) &&
|
#! ($debug) &&
|
||||||
[[ $lastBloc -le $startBloc || $startIter -ge ${#TXBLOCKS[@]} ]] && return
|
[[ $lastBloc -le $startBloc || $startIter -ge ${#TXBLOCKS[@]} ]] && echo "$lastBloc -le $startBloc || $startIter -ge ${#TXBLOCKS[@]}" && return
|
||||||
rm $startFile
|
rm $startFile
|
||||||
else
|
else
|
||||||
local startIter=0
|
local startIter=0
|
||||||
|
@ -24,6 +24,7 @@ scanTxWallets() {
|
||||||
fi
|
fi
|
||||||
incExec=1
|
incExec=1
|
||||||
for ((i=$startIter; i<${#TXBLOCKS[@]}; i++)); do
|
for ((i=$startIter; i<${#TXBLOCKS[@]}; i++)); do
|
||||||
|
local nbrIteration=$i
|
||||||
local startExec=$(($(date +%s%N)/1000000))
|
local startExec=$(($(date +%s%N)/1000000))
|
||||||
local bloc=${TXBLOCKS[$i]}
|
local bloc=${TXBLOCKS[$i]}
|
||||||
[[ -z $bloc ]] && break
|
[[ -z $bloc ]] && break
|
||||||
|
@ -31,6 +32,11 @@ scanTxWallets() {
|
||||||
|
|
||||||
# Récupération du bloc courant
|
# Récupération du bloc courant
|
||||||
local blocFull=$(curl -s ${DUNITER}/blockchain/block/$bloc)
|
local blocFull=$(curl -s ${DUNITER}/blockchain/block/$bloc)
|
||||||
|
while [[ $(jq -r '.ucode' <<<"$blocFull") == 1006 ]]; do
|
||||||
|
[[ $isWeb != "web" ]] && echo -e "i: $i\n$blocFull"
|
||||||
|
sleep 2
|
||||||
|
blocFull=$(curl -s ${DUNITER}/blockchain/block/$bloc)
|
||||||
|
done
|
||||||
until blocBrut=$(jq -r '.' <<<"$blocFull" 2>/dev/null); do
|
until blocBrut=$(jq -r '.' <<<"$blocFull" 2>/dev/null); do
|
||||||
[[ $isWeb != "web" ]] && echo -e "i: $i\n$blocFull"
|
[[ $isWeb != "web" ]] && echo -e "i: $i\n$blocFull"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -38,6 +44,10 @@ scanTxWallets() {
|
||||||
done
|
done
|
||||||
[[ -z "$blocBrut" ]] && continue
|
[[ -z "$blocBrut" ]] && continue
|
||||||
|
|
||||||
|
echo "$blocFull" > debugTmp.txt
|
||||||
|
echo "-----------------------------------" >> debugTmp.txt
|
||||||
|
echo "$blocBrut" >> debugTmp.txt
|
||||||
|
|
||||||
# Récupération de la date du block
|
# Récupération de la date du block
|
||||||
local blockDate=$(jq '.medianTime' <<<"$blocBrut")
|
local blockDate=$(jq '.medianTime' <<<"$blocBrut")
|
||||||
#kopa echo "$blocBrut"
|
#kopa echo "$blocBrut"
|
||||||
|
@ -141,6 +151,23 @@ scanTxWallets() {
|
||||||
nbrMembersToday=$(($nbrMembersTotalToday-$nbrMembersYesterday))
|
nbrMembersToday=$(($nbrMembersTotalToday-$nbrMembersYesterday))
|
||||||
|
|
||||||
jsonify
|
jsonify
|
||||||
|
|
||||||
|
# Mise en cache périodique
|
||||||
|
|
||||||
|
## On supprime les doublons et les lignes vides
|
||||||
|
wallets=$(echo -e "$wallets" | sort -u | awk 'NF')
|
||||||
|
|
||||||
|
# if ((i % 50 == 0)); then #kopaa
|
||||||
|
echo -e "$bloc\n$wallets\n---\n$walletsAuj\n---\n$nbrMembersYesterday|$blockDateLast|$nbrDays" > $GPATH/cache/bk-walletsUp-$nbrIteration
|
||||||
|
cp $GPATH/db/daily.json $GPATH/db/bk-daily.json-$nbrIteration
|
||||||
|
|
||||||
|
## Retire la dernière virgule et ajoute le crochet de fin de JSON
|
||||||
|
sed -i '$ s/,//g' $GPATH/db/bk-daily.json-$nbrIteration
|
||||||
|
echo "]" >> $GPATH/db/bk-daily.json-$nbrIteration
|
||||||
|
|
||||||
|
## On supprime le vieux cache
|
||||||
|
rmOldCache
|
||||||
|
# fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -n $blockDateLast && $blockDateLast != $blockDate ]]; then
|
if [[ -n $blockDateLast && $blockDateLast != $blockDate ]]; then
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Récupération du chemin absolut du répertoir du script actuel
|
||||||
|
GPATH="$( cd "$(dirname "$0")" ; pwd -P )/.."
|
||||||
|
[[ ! -f $GPATH/.env ]] && cp $GPATH/.env.example $GPATH/.env
|
||||||
|
source $GPATH/.env
|
||||||
|
|
||||||
|
log="/var/log/geoloc-members.log"
|
||||||
|
echo "### $(date +'%d-%m-%y - %H:%M') ###" >> $log
|
||||||
|
|
||||||
|
result=$($JAKLIS geolocProfiles)
|
||||||
|
|
||||||
|
finalResult=$(echo "$result" | jq .)
|
||||||
|
RESULT=$?
|
||||||
|
|
||||||
|
if [ $RESULT -eq 0 ]; then
|
||||||
|
echo "$finalResult" > $WEBPATH/data/geoloc-members.json
|
||||||
|
echo "OK" >> $log
|
||||||
|
else
|
||||||
|
echo "Failed" >> $log
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "---" >> $log
|
|
@ -0,0 +1,66 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Récupération du chemin absolut du répertoir du script actuel
|
||||||
|
GPATH="$( cd "$(dirname "$0")" ; pwd -P )/.."
|
||||||
|
[[ ! -f $GPATH/.env ]] && cp $GPATH/.env.example $GPATH/.env
|
||||||
|
source $GPATH/.env
|
||||||
|
node=$(cut -d '/' -f3 <<<"$DUNITER")
|
||||||
|
|
||||||
|
#Check if Jaklis is installed
|
||||||
|
[[ -z $JAKLIS ]] && JAKLIS=$(which silkaj)
|
||||||
|
[[ -z $JAKLIS ]] && echo "Erreur: Vous devez installer Jaklis." && exit 1
|
||||||
|
|
||||||
|
work() {
|
||||||
|
for i in $wallets; do
|
||||||
|
exec() {
|
||||||
|
jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null)
|
||||||
|
}
|
||||||
|
exec
|
||||||
|
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
|
||||||
|
unset k
|
||||||
|
|
||||||
|
balance=$(echo "$jsonResult" | jq -r '.balance')
|
||||||
|
[[ $balance == "null" ]] && balance="0"
|
||||||
|
username=$(echo "$jsonResult" | jq -r '.idty.username')
|
||||||
|
[[ $username == "null" ]] && username=""
|
||||||
|
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
|
||||||
|
|
||||||
|
if [[ $1 == "members" ]]; then
|
||||||
|
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td><b>$username</b></td></tr>"
|
||||||
|
unset username
|
||||||
|
else
|
||||||
|
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
|
||||||
|
fi
|
||||||
|
unset balance
|
||||||
|
|
||||||
|
echo "$formatedBalance" | tee -a /tmp/balance-g1.txt
|
||||||
|
|
||||||
|
totalBalance="$totalBalance"$'\n'"$formatedBalance"
|
||||||
|
echo "$jsonResult" >> /home/poka/debugJsonForbes.log
|
||||||
|
|
||||||
|
# For tests only
|
||||||
|
# [[ $i == "13fn6X3XWVgshHTgS8beZMo9XiyScx6MB6yPsBB5ZBia" ]] && break
|
||||||
|
# [[ $i == "12JDJibbgZPRfD6Hoecg8rQRvCR5VYrMnqzfhQYmAr3k" ]] && break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
wallets=$(cat $WEBPATH/data/wallets-g1-membres.txt 2>/dev/null)
|
||||||
|
[[ -z $wallets ]] && wallets=$(curl -s https://g1-stats.axiom-team.fr/data/wallets-g1-membres.txt)
|
||||||
|
work members && unset wallets
|
||||||
|
wallets=$(cat $WEBPATH/data/wallets-g1-simple.txt 2>/dev/null)
|
||||||
|
[[ -z $wallets ]] && wallets=$(curl -s https://g1-stats.axiom-team.fr/data/wallets-g1-simple.txt)
|
||||||
|
work && unset wallets
|
||||||
|
|
||||||
|
totalBalance=$(sort -nr <<<$totalBalance)
|
||||||
|
[[ ! -d $GPATH/db ]] && mkdir $GPATH/db
|
||||||
|
grep . <<<"$totalBalance" > $GPATH/db/wallets_balance.txt && rm /tmp/balance-g1.txt
|
||||||
|
|
||||||
|
# Construct HTML
|
||||||
|
cp $GPATH/tpl/css/wallets_balance.css $WEBPATH/css/
|
||||||
|
cp $GPATH/tpl/js/wallets_balance.js $WEBPATH/js/
|
||||||
|
cp $GPATH/tpl/wallets_balance.html $WEBPATH/data/wallets_balance.html
|
||||||
|
|
||||||
|
sort -Vr <<<"$htmlBloc" > /tmp/solde_g1_html.txt
|
||||||
|
printf '%s\n' '/_LINE/r /tmp/solde_g1_html.txt' 1 '/_LINE/d' w | ed $WEBPATH/data/wallets_balance.html > /dev/null
|
||||||
|
sed -i "0,/_DATE/s//$(date '+%d-%m-%Y')/" $WEBPATH/data/wallets_balance.html
|
||||||
|
rm /tmp/solde_g1_html.txt
|
|
@ -4,60 +4,9 @@
|
||||||
GPATH="$( cd "$(dirname "$0")" ; pwd -P )/.."
|
GPATH="$( cd "$(dirname "$0")" ; pwd -P )/.."
|
||||||
[[ ! -f $GPATH/.env ]] && cp $GPATH/.env.example $GPATH/.env
|
[[ ! -f $GPATH/.env ]] && cp $GPATH/.env.example $GPATH/.env
|
||||||
source $GPATH/.env
|
source $GPATH/.env
|
||||||
node=$(cut -d '/' -f3 <<<"$DUNITER")
|
|
||||||
|
|
||||||
#Check if Jaklis is installed
|
$JAKLIS listWallets > $WEBPATH/data/forbes.json
|
||||||
[[ -z $JAKLIS ]] && JAKLIS=$(which silkaj)
|
|
||||||
[[ -z $JAKLIS ]] && echo "Erreur: Vous devez installer Jaklis." && exit 1
|
|
||||||
|
|
||||||
work() {
|
date=$(date -d '+1 minute' +"%d/%m/%Y à %H:%M")
|
||||||
for i in $wallets; do
|
|
||||||
exec() {
|
|
||||||
jsonResult=$($JAKLIS idBalance -p $i 2>/dev/null)
|
|
||||||
}
|
|
||||||
exec
|
|
||||||
while [[ $? == 1 ]]; do echo "Erreur $k: $i"; ((k++)); exec; done
|
|
||||||
unset k
|
|
||||||
|
|
||||||
balance=$(echo "$jsonResult" | jq -r '.balance')
|
sed -i "/<div id=\"dataDate\">/!b;n;cCes données ont été actualisées le $date" $WEBPATH/data/search.html
|
||||||
username=$(echo "$jsonResult" | jq -r '.username')
|
|
||||||
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
|
|
||||||
|
|
||||||
if [[ $1 == "members" ]]; then
|
|
||||||
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td><b>$username</b></td></tr>"
|
|
||||||
unset username
|
|
||||||
else
|
|
||||||
htmlBloc="$htmlBloc"$'\n'"<tr><td>$balance</td><td>$i</td><td>$username</td></tr>"
|
|
||||||
fi
|
|
||||||
unset balance
|
|
||||||
|
|
||||||
echo "$formatedBalance" | tee -a /tmp/balance-g1.txt
|
|
||||||
|
|
||||||
totalBalance="$totalBalance"$'\n'"$formatedBalance"
|
|
||||||
|
|
||||||
# For tests only
|
|
||||||
# [[ $i == "13fn6X3XWVgshHTgS8beZMo9XiyScx6MB6yPsBB5ZBia" ]] && break
|
|
||||||
# [[ $i == "12JDJibbgZPRfD6Hoecg8rQRvCR5VYrMnqzfhQYmAr3k" ]] && break
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
wallets=$(cat $WEBPATH/data/wallets-g1-membres.txt 2>/dev/null)
|
|
||||||
[[ -z $wallets ]] && wallets=$(curl -s https://g1-stats.axiom-team.fr/data/wallets-g1-membres.txt)
|
|
||||||
work members && unset wallets
|
|
||||||
wallets=$(cat $WEBPATH/data/wallets-g1-simple.txt 2>/dev/null)
|
|
||||||
[[ -z $wallets ]] && wallets=$(curl -s https://g1-stats.axiom-team.fr/data/wallets-g1-simple.txt)
|
|
||||||
work && unset wallets
|
|
||||||
|
|
||||||
totalBalance=$(sort -nr <<<$totalBalance)
|
|
||||||
[[ ! -d $GPATH/db ]] && mkdir $GPATH/db
|
|
||||||
grep . <<<"$totalBalance" > $GPATH/db/wallets_balance.txt && rm /tmp/balance-g1.txt
|
|
||||||
|
|
||||||
# Construct HTML
|
|
||||||
cp $GPATH/tpl/css/wallets_balance.css $WEBPATH/css/
|
|
||||||
cp $GPATH/tpl/js/wallets_balance.js $WEBPATH/js/
|
|
||||||
cp $GPATH/tpl/wallets_balance.html $WEBPATH/data/wallets_balance.html
|
|
||||||
|
|
||||||
sort -Vr <<<"$htmlBloc" > /tmp/solde_g1_html.txt
|
|
||||||
printf '%s\n' '/_LINE/r /tmp/solde_g1_html.txt' 1 '/_LINE/d' w | ed $WEBPATH/data/wallets_balance.html > /dev/null
|
|
||||||
sed -i "0,/_DATE/s//$(date '+%d-%m-%Y')/" $WEBPATH/data/wallets_balance.html
|
|
||||||
rm /tmp/solde_g1_html.txt
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,43 @@
|
||||||
body {
|
body {
|
||||||
background-color: #c4a787;
|
background-color: #c4a787 !important;
|
||||||
margin-top: 10px;
|
margin-top: 10px !important;
|
||||||
margin-left: 20px;
|
margin-left: 20px !important;
|
||||||
font-family: "Gill Sans", sans-serif;
|
margin-right: 20px !important;
|
||||||
|
font-family: "Gill Sans", sans-serif !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-toolbar .bs-bars, .bootstrap-table .fixed-table-toolbar .columns, .bootstrap-table .fixed-table-toolbar .search {
|
||||||
|
float: inherit !important;
|
||||||
|
text-align: center;
|
||||||
|
display:flex;
|
||||||
|
justify-content:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
height: calc(1.5em + .75rem + 20px) !important;
|
||||||
|
width: 500px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||||
|
height: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container {
|
||||||
|
background-color: #DFCFBE;
|
||||||
|
border-collapse: collapse !important; /* Collapse borders */
|
||||||
|
border: 1px solid #ddd !important; /* Add a grey border */
|
||||||
|
font-size: 16px !important; /* Increase font-size */
|
||||||
|
}
|
||||||
|
|
||||||
|
.bootstrap-table .fixed-table-container th {
|
||||||
|
background-color: #B69776;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dataDate {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);;
|
||||||
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
|
|
|
@ -13,20 +13,21 @@
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<center><h1>Ḡ1 Stats</h1>
|
<center><h1>Ḡ1 Stats</h1>
|
||||||
| <a href="/data/daily.json">Voir le fichier JSON</a>
|
| <a href="/data/daily.json">Voir le JSON g1stats</a>
|
||||||
|
| <a href="/data/search.html">Recherche</a>
|
||||||
| <a href="/data/wallets-g1.txt">Liste de tous les wallets</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-membres.txt">Liste des wallets membres</a>
|
||||||
| <a href="/data/wallets-g1-simple.txt">Liste des simples portefeuilles</a>
|
| <a href="/data/wallets-g1-simple.txt">Liste des simples portefeuilles</a>
|
||||||
| <a href="/data/wallets_balance.html">Classement FORBES</a> |
|
| <a href="/data/geoloc-members.json">Voir le JSON profiles membres</a> |
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="mainbloc">
|
<div id="mainbloc">
|
||||||
<pre>
|
<pre>
|
||||||
Date: <b>_day - _heure</b>
|
Date: <b>_day - _heure</b>
|
||||||
Noeud scanné: <b>https://duniter-g1.p2p.legal</b>
|
Noeud scanné: <b>https://g1v1.p2p.legal</b>
|
||||||
---
|
---
|
||||||
Nombre total de wallet: <b>_nbrTotalWallets</b>
|
Nombre total de portefeuille: <b>_nbrTotalWallets</b>
|
||||||
Nombre de membres: <b>_nbrMembers</b> (_pourcentMbrs%)
|
Nombre de membres: <b>_nbrMembers</b> (_pourcentMbrs%)
|
||||||
Nombre de simple portefeuille: <b>_nbrSimpleWallets</b> (_pourcentWallets%)
|
Nombre de simple portefeuille: <b>_nbrSimpleWallets</b> (_pourcentWallets%)
|
||||||
---
|
---
|
||||||
|
@ -40,20 +41,17 @@ Soldes membres: <b>_soldeM Ḡ1</b> (sans les DU)
|
||||||
---
|
---
|
||||||
Masse monétaire: <b>_monetaryMass Ḡ1</b>
|
Masse monétaire: <b>_monetaryMass Ḡ1</b>
|
||||||
|
|
||||||
---
|
|
||||||
<h3>Analyse rapide</h3>
|
|
||||||
<b>_sleepyG1%</b> des Ḡ1 n'ont jamais été utilisés.
|
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="charts">
|
<div id="charts">
|
||||||
<center><h2 id="titleRW">Ḡ1 reçus sur les wallets</h2></center>
|
<center><h2 id="titleRW">Ḡ1 reçus sur les portefeuilles</h2></center>
|
||||||
<canvas id="chartRW" width="1600" height="500"></canvas>
|
<canvas id="chartRW" width="1600" height="500"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<div id="charts">
|
<div id="charts">
|
||||||
<center><h2 id="titleNBRW">Nombre de wallets</h2></center>
|
<center><h2 id="titleNBRW">Nombre de portefeuilles</h2></center>
|
||||||
<canvas id="chartNBRW" width="1600" height="500"></canvas>
|
<canvas id="chartNBRW" width="1600" height="500"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
|
|
|
@ -23,19 +23,11 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
labels: date,
|
labels: date,
|
||||||
datasets: [{
|
datasets: [
|
||||||
label: 'Ḡ1 reçus sur les simples portefeuilles',
|
|
||||||
data: rwallets,
|
|
||||||
backgroundColor: 'rgba(0, 119, 204, 0.3)',
|
{
|
||||||
pointBorderWidth: 1,
|
label: 'Portefeuilles membres',
|
||||||
pointHoverRadius: 6,
|
|
||||||
pointHoverBackgroundColor: "beige",
|
|
||||||
pointHoverBorderColor: "brown",
|
|
||||||
pointHoverBorderWidth: 2,
|
|
||||||
pointRadius: 1,
|
|
||||||
pointHitRadius: 4
|
|
||||||
}, {
|
|
||||||
label: 'Ḡ1 reçus sur les portefeuilles membres',
|
|
||||||
data: rmembers,
|
data: rmembers,
|
||||||
backgroundColor: 'rgba(0, 178, 0, 0.3)',
|
backgroundColor: 'rgba(0, 178, 0, 0.3)',
|
||||||
pointBorderWidth: 1,
|
pointBorderWidth: 1,
|
||||||
|
@ -45,11 +37,45 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
|
||||||
pointHoverBorderWidth: 2,
|
pointHoverBorderWidth: 2,
|
||||||
pointRadius: 1,
|
pointRadius: 1,
|
||||||
pointHitRadius: 4
|
pointHitRadius: 4
|
||||||
}]
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
label: 'Simples portefeuilles',
|
||||||
|
data: rwallets,
|
||||||
|
backgroundColor: 'rgba(0, 119, 204, 0.3)',
|
||||||
|
pointBorderWidth: 1,
|
||||||
|
pointHoverRadius: 6,
|
||||||
|
pointHoverBackgroundColor: "beige",
|
||||||
|
pointHoverBorderColor: "brown",
|
||||||
|
pointHoverBorderWidth: 2,
|
||||||
|
pointRadius: 1,
|
||||||
|
pointHitRadius: 4
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
responsive: true
|
responsive: true,
|
||||||
|
|
||||||
|
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}],
|
||||||
|
yAxes: [
|
||||||
|
{
|
||||||
|
id: 'y-axis',
|
||||||
|
stacked: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var myChartRW = new Chart(ctx, config);
|
var myChartRW = new Chart(ctx, config);
|
||||||
|
@ -61,10 +87,11 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
labels: date,
|
labels: date,
|
||||||
datasets: [{
|
datasets: [
|
||||||
label: 'Nombre de simple portefeuilles',
|
{
|
||||||
data: nbrwallets,
|
label: 'Portefeuilles membres',
|
||||||
backgroundColor: 'rgba(0, 119, 204, 0.3)',
|
data: nbrmembers,
|
||||||
|
backgroundColor: 'rgba(0, 178, 0, 0.3)',
|
||||||
pointBorderWidth: 1,
|
pointBorderWidth: 1,
|
||||||
pointHoverRadius: 6,
|
pointHoverRadius: 6,
|
||||||
pointHoverBackgroundColor: "beige",
|
pointHoverBackgroundColor: "beige",
|
||||||
|
@ -72,10 +99,12 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
|
||||||
pointHoverBorderWidth: 2,
|
pointHoverBorderWidth: 2,
|
||||||
pointRadius: 1,
|
pointRadius: 1,
|
||||||
pointHitRadius: 4
|
pointHitRadius: 4
|
||||||
}, {
|
},
|
||||||
label: 'Nombre de portefeuilles membres',
|
|
||||||
data: nbrmembers,
|
{
|
||||||
backgroundColor: 'rgba(0, 178, 0, 0.3)',
|
label: 'Simples portefeuilles',
|
||||||
|
data: nbrwallets,
|
||||||
|
backgroundColor: 'rgba(0, 119, 204, 0.3)',
|
||||||
pointBorderWidth: 1,
|
pointBorderWidth: 1,
|
||||||
pointHoverRadius: 6,
|
pointHoverRadius: 6,
|
||||||
pointHoverBackgroundColor: "beige",
|
pointHoverBackgroundColor: "beige",
|
||||||
|
@ -87,7 +116,21 @@ var jsonfileRW = $.getJSON( "../data/cum-daily.json", function(data) {
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
maintainAspectRatio: true,
|
maintainAspectRatio: true,
|
||||||
responsive: true
|
responsive: true,
|
||||||
|
|
||||||
|
scales: {
|
||||||
|
xAxes: [{
|
||||||
|
stacked: true
|
||||||
|
}],
|
||||||
|
yAxes: [
|
||||||
|
{
|
||||||
|
id: 'y-axis',
|
||||||
|
stacked: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,39 @@
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="../css/wallets_balance.css">
|
||||||
|
<link rel="stylesheet" href="../css/src/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="../css/src/bootstrap-table.min.css">
|
||||||
|
|
||||||
|
<script src="../js/src/jquery.min.js"></script>
|
||||||
|
<script src="../js/src/popper.min.js"></script>
|
||||||
|
<script src="../js/src/bootstrap.min.js"></script>
|
||||||
|
<script src="../js/src/bootstrap-table.min.js"></script>
|
||||||
|
<script src="../js/src/bootstrap-table-fr-FR.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table id="walletsTable" data-toggle="table" data-locale="fr-FR" data-pagination="true" data-page-size='10' data-page-list="[10, 25, 50, 100, 500, all]" data-search="true" data-url="forbes.json">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-sortable="true" data-field="pubkey">Clé publique</th>
|
||||||
|
<th data-sortable="true" data-field="id.username">Pseudo</th>
|
||||||
|
<th data-sortable="true" data-field="id.isMember">Membre</th>
|
||||||
|
<th data-sortable="true" data-field="balance">Solde (Ğ1)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<center>
|
||||||
|
<div id="dataDate">
|
||||||
|
Ces données ont été actualisées le 18/10/2021 à 06:16
|
||||||
|
</div>
|
||||||
|
</center>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in New Issue