Add new stats and medals
This commit is contained in:
parent
6b0a4b570d
commit
92f7a17959
3
add
3
add
@ -77,11 +77,12 @@ data=N
|
||||
for dsname in "${dsnames[@]}"
|
||||
do
|
||||
data+=:${POST["$dsname"]:=U}
|
||||
template+="${template:+:}$dsname"
|
||||
echo "$dsname....${POST["$dsname"]}"
|
||||
done
|
||||
|
||||
echo ${POST["innovator"]} > .innovator
|
||||
rrdtool update ingress.rrd "$data"
|
||||
rrdtool update ingress.rrd -t $template "$data"
|
||||
|
||||
if [ -n "$CACHE_DIR" ]
|
||||
then
|
||||
|
||||
1
add.html
1
add.html
@ -68,6 +68,7 @@ then
|
||||
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 \
|
||||
RRA:HWPREDICT:8760:8e-1:8e-1:$((24)) \
|
||||
RRA:AVERAGE:99e-2:1:$((24*15)) \
|
||||
RRA:MAX:99e-2:1:$((24*15)) \
|
||||
|
||||
16
import
16
import
@ -24,12 +24,17 @@ do
|
||||
done
|
||||
read_query_string
|
||||
|
||||
template=AP:Explorer:Seer:XM:Walked:Builder:Connector:Mind_Controller:MU:Longest_Link:Largest_Field:Recharger:Liberator:Pioneer:Engineer:Purifier:Neutralized:Links_Destroyed:Fields_Destroyed:Guardian:Link_Maintained:Link_Length_x_Days:Field_Held:Field_x_Days:Mercenary:Hacker
|
||||
|
||||
if [[ $REQUEST_METHOD == POST ]]
|
||||
then
|
||||
cat <<-EOHead
|
||||
Content-type: text/plain
|
||||
Last-Modified: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
||||
Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
||||
|
||||
EOHead
|
||||
cat <<-EOHead >/dev/null
|
||||
refresh: 0,url=/cgi/$webuser/?start=${POST["start"]}&end=${POST["end"]}
|
||||
|
||||
EOHead
|
||||
@ -75,7 +80,7 @@ then
|
||||
while read date hour data
|
||||
do
|
||||
data=$(date -d "$date $hour" +%s):${data// /:}
|
||||
rrdtool update ingress.rrd "$data" 2>&1
|
||||
rrdtool update ingress.rrd -t $template "$data" 2>&1
|
||||
done <<<"${POST["data"]}"
|
||||
|
||||
if [ -n "$CACHE_DIR" ]
|
||||
@ -128,6 +133,7 @@ else
|
||||
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 \
|
||||
RRA:HWPREDICT:8760:8e-1:8e-1:$((24)) \
|
||||
RRA:AVERAGE:99e-2:1:$((24*15)) \
|
||||
RRA:MAX:99e-2:1:$((24*15)) \
|
||||
@ -152,12 +158,8 @@ else
|
||||
cat <<-EOHTML
|
||||
<div class="main">
|
||||
<p>Import data from e.g. https://www.agent-stats.com/ <br/>
|
||||
<small>Expected format: <tt>YYYY-MM-DD hh:mm:ss AP Explorer Seer XM Hacker
|
||||
Builder Connector Mind_Controller MU Longest_Link Largest_Field
|
||||
Recharger Liberator Pioneer Purifier Neutralized Links_Destroyed
|
||||
Fields_Destroyed Walked Guardian Link_Maintained
|
||||
Link_Length_x_Days Field_Held Field_x_Days
|
||||
Mercenary</tt></small></p>
|
||||
<small>Expected format: <tt>YYYY-MM-DD hh:mm:ss
|
||||
${template[@]//:/ }</tt></small></p>
|
||||
<form method="post" action="import">
|
||||
<input type="hidden" name="start" value="$start" />
|
||||
<input type="hidden" name="end" value="$end" />
|
||||
|
||||
@ -32,7 +32,7 @@ div.menu {
|
||||
|
||||
div.anchor {
|
||||
position: relative;
|
||||
top: -9.5em;
|
||||
top: -10.9em;
|
||||
}
|
||||
|
||||
table.menu {
|
||||
@ -62,12 +62,12 @@ td.submenu-inv {
|
||||
|
||||
div.main {
|
||||
position: absolute;
|
||||
top: 7.5em;
|
||||
top: 8.9em;
|
||||
}
|
||||
|
||||
div.maingraph {
|
||||
position: absolute;
|
||||
top: 9.3em;
|
||||
top: 10.5em;
|
||||
}
|
||||
|
||||
table.curlevel {
|
||||
|
||||
30
settings
30
settings
@ -40,7 +40,7 @@ uinames=(
|
||||
"Unique Portals Visited"
|
||||
"Portals Discovered"
|
||||
"XM Collected"
|
||||
Hacks
|
||||
"Distance Walked"
|
||||
"Resonators Deployed"
|
||||
"Links Created"
|
||||
"Control Fields Created"
|
||||
@ -50,24 +50,25 @@ uinames=(
|
||||
"XM Recharged"
|
||||
"Portals Captured"
|
||||
"Unique Portals Captured"
|
||||
"Mods Deployed"
|
||||
"Resonators Destroyed"
|
||||
"Portals Neutralized"
|
||||
"Enemy Links Destroyed"
|
||||
"Enemy Control Fields Destroyed"
|
||||
"Distance Walked"
|
||||
"Max Time Portal Held"
|
||||
"Max Time Link Maintained"
|
||||
"Max Link Length x Days"
|
||||
"Max Time Field Held"
|
||||
"Largest Field MUs x Days"
|
||||
"Unique missions completed"
|
||||
Hacks
|
||||
)
|
||||
dsnames=(
|
||||
AP
|
||||
Explorer
|
||||
Seer
|
||||
XM
|
||||
Hacker
|
||||
Walked
|
||||
Builder
|
||||
Connector
|
||||
Mind_Controller
|
||||
@ -77,17 +78,18 @@ dsnames=(
|
||||
Recharger
|
||||
Liberator
|
||||
Pioneer
|
||||
Engineer
|
||||
Purifier
|
||||
Neutralized
|
||||
Links_Destroyed
|
||||
Fields_Destroyed
|
||||
Walked
|
||||
Guardian
|
||||
Link_Maintained
|
||||
Link_Length_x_Days
|
||||
Field_Held
|
||||
Field_x_Days
|
||||
Mercenary
|
||||
Hacker
|
||||
)
|
||||
medals=(
|
||||
Explorer
|
||||
@ -101,6 +103,9 @@ medals=(
|
||||
Pioneer
|
||||
Purifier
|
||||
Guardian
|
||||
Mercenary
|
||||
Engineer
|
||||
Walked
|
||||
)
|
||||
|
||||
## (0) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||
@ -177,3 +182,20 @@ gold["Guardian"]=20
|
||||
platinum["Guardian"]=90
|
||||
black["Guardian"]=150
|
||||
|
||||
bronze["Engineer"]=150
|
||||
silver["Engineer"]=1500
|
||||
gold["Engineer"]=5000
|
||||
platinum["Engineer"]=20000
|
||||
black["Engineer"]=50000
|
||||
|
||||
bronze["Walked"]=10
|
||||
silver["Walked"]=100
|
||||
gold["Walked"]=300
|
||||
platinum["Walked"]=1000
|
||||
black["Walked"]=2500
|
||||
|
||||
bronze["Mercenary"]=5
|
||||
silver["Mercenary"]=25
|
||||
gold["Mercenary"]=100
|
||||
platinum["Mercenary"]=200
|
||||
black["Mercenary"]=500
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user