Merge remote-tracking branch 'origin/master' into prod
* origin/master: Only show new medal requirements remove failed captures (avoids loop when it's the newest file) Add / Update copyright notices Use rrdcreate() everywhere
This commit is contained in:
commit
5a14e0a099
2
add
2
add
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014 Vincent Riquer
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
|
||||
44
add.html
44
add.html
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014 Vincent Riquer
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@ -42,48 +42,10 @@ cat <<-EOHTML
|
||||
EOHTML
|
||||
if ! [ -w "$rrdfile" ]
|
||||
then
|
||||
rrdtool create ingress.rrd -s $((60*60)) \
|
||||
DS:AP:GAUGE:$((2*24*60*60)):0:NaN \
|
||||
DS:Explorer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Seer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:XM:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Hacker:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Builder:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Connector:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Mind_Controller:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:MU:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Longest_Link:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Largest_Field:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Recharger:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Liberator:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Pioneer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Purifier:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Neutralized:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Links_Destroyed:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Fields_Destroyed:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Walked:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Guardian:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Link_Maintained:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Link_Length_x_Days:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Field_Held:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Field_x_Days:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Mercenary:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Engineer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Recruiter:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Translator:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Hackaton:GAUGE:$((48*60*60)):0:NaN \
|
||||
RRA:HWPREDICT:8760:8e-1:8e-1:$((24)) \
|
||||
RRA:AVERAGE:99e-2:1:$((24*15)) \
|
||||
RRA:MAX:99e-2:1:$((24*15)) \
|
||||
RRA:AVERAGE:99e-2:4:$((24*180)) \
|
||||
RRA:MAX:99e-2:4:$((24*180)) \
|
||||
RRA:AVERAGE:99e-2:24:$(((4*365)+1)) \
|
||||
RRA:MAX:99e-2:24:$(((4*365)+1)) \
|
||||
RRA:AVERAGE:99e-2:$((24*30)):$(((32*365)+8)) \
|
||||
RRA:MAX:99e-2:$((24*30)):$(((32*365)+8)) \
|
||||
|| {
|
||||
rrdcreate || {
|
||||
cat <<-EOHTML
|
||||
<h1 style="color:red">Cannot create $rrdfile</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOHTML
|
||||
|
||||
43
import
43
import
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014 Vincent Riquer
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@ -101,46 +101,7 @@ else
|
||||
EOHTML
|
||||
if ! [ -w "$rrdfile" ]
|
||||
then
|
||||
rrdtool create "$rrdfile" -s $((60*60)) \
|
||||
DS:AP:GAUGE:$((2*24*60*60)):0:NaN \
|
||||
DS:Explorer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Seer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:XM:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Hacker:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Builder:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Connector:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Mind_Controller:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:MU:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Longest_Link:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Largest_Field:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Recharger:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Liberator:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Pioneer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Purifier:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Neutralized:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Links_Destroyed:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Fields_Destroyed:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Walked:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Guardian:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Link_Maintained:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Link_Length_x_Days:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Field_Held:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Field_x_Days:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Mercenary:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Engineer:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Recruiter:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Translator:GAUGE:$((48*60*60)):0:NaN \
|
||||
DS:Hackaton:GAUGE:$((48*60*60)):0:NaN \
|
||||
RRA:HWPREDICT:8760:8e-1:8e-1:$((24)) \
|
||||
RRA:AVERAGE:99e-2:1:$((24*15)) \
|
||||
RRA:MAX:99e-2:1:$((24*15)) \
|
||||
RRA:AVERAGE:99e-2:4:$((24*180)) \
|
||||
RRA:MAX:99e-2:4:$((24*180)) \
|
||||
RRA:AVERAGE:99e-2:24:$(((4*365)+1)) \
|
||||
RRA:MAX:99e-2:24:$(((4*365)+1)) \
|
||||
RRA:AVERAGE:99e-2:$((24*30)):$(((32*365)+8)) \
|
||||
RRA:MAX:99e-2:$((24*30)):$(((32*365)+8)) \
|
||||
|| {
|
||||
rrdcreate || {
|
||||
cat <<-EOHTML
|
||||
<h1 style="color:red">Cannot create $rrdfile</h1>
|
||||
</body>
|
||||
|
||||
46
index
46
index
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014 Vincent Riquer
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@ -174,8 +174,12 @@ then
|
||||
&& maxtimestamp=$timestamp
|
||||
for stat in ${nextsilver[timestamp]}
|
||||
do
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} silver)" )
|
||||
if ! (( shown["$stat silver"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat silver"]=1
|
||||
fi
|
||||
(( ++count == lvlsilver[level] - silvercount )) && break 2
|
||||
done
|
||||
fi
|
||||
@ -184,8 +188,12 @@ then
|
||||
do
|
||||
(( count >= lvlsilver[level] - silvercount )) && break 1
|
||||
(( count < lvlsilver[level] - silvercount )) && never=1
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} silver)" )
|
||||
if ! (( shown["$stat silver"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat silver"]=1
|
||||
fi
|
||||
(( count++ ))
|
||||
done
|
||||
tableline+=( '</td>' )
|
||||
@ -205,8 +213,12 @@ then
|
||||
&& maxtimestamp=$timestamp
|
||||
for stat in ${nextgold[timestamp]}
|
||||
do
|
||||
if ! (( shown["$stat gold"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat gold"]=1
|
||||
fi
|
||||
(( ++count == lvlgold[level] - goldcount )) && break 2
|
||||
done
|
||||
fi
|
||||
@ -215,8 +227,12 @@ then
|
||||
do
|
||||
(( count >= lvlgold[level] - goldcount )) && break 1
|
||||
(( count < lvlgold[level] - goldcount )) && never=1
|
||||
if ! (( shown["$stat gold"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat gold"]=1
|
||||
fi
|
||||
(( count++ ))
|
||||
done
|
||||
tableline+=( '</td>' )
|
||||
@ -236,8 +252,12 @@ then
|
||||
&& maxtimestamp=$timestamp
|
||||
for stat in ${nextplatinum[timestamp]}
|
||||
do
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} platinum)" )
|
||||
if ! (( shown["$stat platinum"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat platinum"]=1
|
||||
fi
|
||||
(( ++count == lvlplatinum[level] - platinumcount )) && break 2
|
||||
done
|
||||
fi
|
||||
@ -246,8 +266,12 @@ then
|
||||
do
|
||||
(( count >= lvlplatinum[level] - platinumcount )) && break 1
|
||||
(( count < lvlplatinum[level] - platinumcount )) && never=1
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} platinum)" )
|
||||
if ! (( shown["$stat platinum"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat platinum"]=1
|
||||
fi
|
||||
(( count++ ))
|
||||
done
|
||||
tableline+=( '</td>' )
|
||||
@ -267,8 +291,12 @@ then
|
||||
&& maxtimestamp=$timestamp
|
||||
for stat in ${nextblack[timestamp]}
|
||||
do
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} black)" )
|
||||
if ! (( shown["$stat black"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat black"]=1
|
||||
fi
|
||||
(( ++count == lvlblack[level] - blackcount )) && break 2
|
||||
done
|
||||
fi
|
||||
@ -277,8 +305,12 @@ then
|
||||
do
|
||||
(( count >= lvlblack[level] - blackcount )) && break 1
|
||||
(( count < lvlblack[level] - blackcount )) && never=1
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} black)" )
|
||||
if ! (( shown["$stat black"] ))
|
||||
then
|
||||
tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]:-0} gold)" )
|
||||
tableline+=( '<br />' )
|
||||
shown["$stat black"]=1
|
||||
fi
|
||||
(( count++ ))
|
||||
done
|
||||
tableline+=( '</td>' )
|
||||
|
||||
17
ingress.xml
17
ingress.xml
@ -1,5 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
|
||||
<!--
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!-- Round Robin Database Dump -->
|
||||
<rrd>
|
||||
<version>0003</version>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
* Copyright (C) 2014 Vincent Riquer
|
||||
* Copyright (C) 2014-2015 Vincent Riquer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
get_current_level() {
|
||||
for level in {1..16}
|
||||
do
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
get_next_level() {
|
||||
local level
|
||||
next=()
|
||||
|
||||
17
lib/globals
17
lib/globals
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
declare -A \
|
||||
last \
|
||||
nosilver \
|
||||
@ -17,6 +33,7 @@ declare -A \
|
||||
hasplatinum \
|
||||
hasblack \
|
||||
first \
|
||||
shown \
|
||||
|
||||
declare -a \
|
||||
bronzes \
|
||||
|
||||
@ -44,6 +44,8 @@ image() {
|
||||
case "$line" in
|
||||
'Error, please try again.')
|
||||
# Ingress failed when generating image, ignore file.
|
||||
echo $'\tFailed capture, file removed.'
|
||||
rm "$1"
|
||||
return 3
|
||||
;;
|
||||
#14,522,411 AP 144mm AP
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import_images() {
|
||||
local starttime=$(date +%s) imagetime timestamp elapsed lasttime now
|
||||
exec >> images.log
|
||||
|
||||
16
lib/medals
16
lib/medals
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
medals() {
|
||||
local \
|
||||
stat \
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
print_medal() {
|
||||
local \
|
||||
timestamp=$1 \
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
read_query_string() {
|
||||
local \
|
||||
exprgraph \
|
||||
|
||||
16
lib/readlast
16
lib/readlast
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
readlast() {
|
||||
local \
|
||||
index \
|
||||
|
||||
16
lib/readold
16
lib/readold
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
readold() {
|
||||
local when=$1 \
|
||||
line \
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
rrdcreate() {
|
||||
rrdtool restore ingress.xml "$rrdfile"
|
||||
}
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
send_headers() {
|
||||
local timestamp do_exit header thisdate expiredate
|
||||
read timestamp < <(stat -c %Y $0 settings "$rrdfile" lib/* .importing 2>/dev/null|sort -r)
|
||||
|
||||
@ -1,5 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
show_current_level() {
|
||||
cat <<-EOHTML
|
||||
<table class="curlevel" style="width:$(( graph_width + 97 ))px">
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
22
settings
22
settings
@ -1,3 +1,19 @@
|
||||
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
||||
# Copyright (C) 2014-2015 Vincent Riquer
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Path to your fastcgi_cache (optional).
|
||||
CACHE_DIR=/web/ingress-stats.riquer.fr/cache/
|
||||
|
||||
@ -224,3 +240,9 @@ silver["Translator"]=2000
|
||||
gold["Translator"]=6000
|
||||
platinum["Translator"]=20000
|
||||
black["Translator"]=50000
|
||||
|
||||
#bronze[""]=
|
||||
#silver[""]=
|
||||
#gold[""]=
|
||||
#platinum[""]=
|
||||
#black[""]=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user