diff --git a/add.html b/add.html
index b9aa549..d2385d1 100755
--- a/add.html
+++ b/add.html
@@ -154,9 +154,10 @@ cat <<-EOHTML
EOHTML
-for indice in ${!uinames[@]}
+for indice in ${dsnames[@]}
do
- echo "- ${uinames[indice]}
"
+ [[ -z "${uinames[$indice]}" ]] && continue
+ echo "- ${uinames[$indice]}
"
done
cat <<-EOHTML
diff --git a/import b/import
index 8d498f8..ed44bb2 100755
--- a/import
+++ b/import
@@ -79,7 +79,7 @@ then
while read date hour data
do
data=$(date -d "$date $hour" +%s):${data// /:}
- rrdtool update "$rrdfile" -t $template "$data" 2>&1
+ rrdtool update "$rrdfile" -t $template "${data//:0/:U}" 2>&1
done <<<"${POST["data"]}"
if [ -n "$CACHE_DIR" ]
diff --git a/index b/index
index 7a40db2..c162e65 100755
--- a/index
+++ b/index
@@ -415,6 +415,7 @@ then
for stat in "${stats[@]}"
do
+ [[ -z "${uinames[$stat]}" ]] && continue
if [[ $stat == AP ]] || (( bronze["$stat"] ))
then
height=169
@@ -627,7 +628,7 @@ else
rrdtool graph - \
-a PNG \
-w $graph_width \
- -v $graph \
+ -v "${uinames[$graph]}" \
-s $start -e $end \
DEF:data=$rrdfile:$graph:AVERAGE:step=3600${datastart+:start=$datastart}${dataend+:end=$dataend} \
DEF:fail=$rrdfile:$graph:FAILURES \
diff --git a/lib/send_headers b/lib/send_headers
index e092b71..d55c80a 100644
--- a/lib/send_headers
+++ b/lib/send_headers
@@ -2,7 +2,7 @@
send_headers() {
local timestamp do_exit header thisdate expiredate
- read timestamp < <(stat -c %Y $0 "$rrdfile" lib/* |sort -r)
+ read timestamp < <(stat -c %Y $0 settings "$rrdfile" lib/* |sort -r)
thisdate=$(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d @$timestamp)
expiredate=$(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d '+1 minute')
if [[ $thisdate == $HTTP_IF_MODIFIED_SINCE ]]
diff --git a/settings b/settings
index 3353fbb..645c17d 100644
--- a/settings
+++ b/settings
@@ -39,36 +39,35 @@ start=$default_start
end=$default_end
prevperiod=$default_prevperiod
-uinames=(
- AP
- "Unique Portals Visited"
- "Portals Discovered"
- "XM Collected"
- "Distance Walked"
- "Resonators Deployed"
- "Links Created"
- "Control Fields Created"
- "Mind Units Captured"
- "Longest Link Ever Created"
- "Largest Control Field"
- "XM Recharged"
- "Portals Captured"
- "Unique Portals Captured"
- "Mods Deployed"
- "Resonators Destroyed"
- "Portals Neutralized"
- "Enemy Links Destroyed"
- "Enemy Control Fields Destroyed"
- "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
- "Glyph Hack Points"
- "Agents Recruited"
- "Consecutive Days Hacking"
+declare -A uinames=(
+ [AP]=AP
+ [Explorer]="Unique Portals Visited"
+ [Seer]="Portals Discovered"
+ [XM]="XM Collected"
+ [Walked]="Distance Walked"
+ [Builder]="Resonators Deployed"
+ [Connector]="Links Created"
+ [Mind_Controller]="Control Fields Created"
+ [MU]="Mind Units Captured"
+ [Longest_Link]="Longest Link Ever Created"
+ [Largest_Field]="Largest Control Field"
+ [Recharger]="XM Recharged"
+ [Liberator]="Portals Captured"
+ [Pioneer]="Unique Portals Captured"
+ [Engineer]="Mods Deployed"
+ [Purifier]="Resonators Destroyed"
+ [Neutralized]="Portals Neutralized"
+ [Links_Destroyed]="Enemy Links Destroyed"
+ [Fields_Destroyed]="Enemy Control Fields Destroyed"
+ [Guardian]="Max Time Portal Held"
+ [Link_Maintained]="Max Time Link Maintained"
+ [Link_Length_x_Days]="Max Link Length x Days"
+ [Field_Held]="Max Time Field Held"
+ [Field_x_Days]="Largest Field MUs x Days"
+ [Mercenary]="Unique missions completed"
+ [Hacker]=Hacks
+ [Translator]="Glyph Hack Points"
+ [Recruiter]="Agents Recruited"
)
dsnames=(
AP