Commit ba60e6ea authored by Alain O' Miniussi's avatar Alain O' Miniussi

Add time range

parent 9540f6ee
......@@ -56,6 +56,16 @@ labs=$(sacctmgr show account WithAssoc format=Account,ParentName Parent=root -P
rm -rf $odir
mkdir $odir
(
echo -n "from $(date -d $(echo $sdate | sed -e 's/\./\//g') +"%d %B %Y")"
if [ -z "$edate" ]
then
echo
else
echo -n " to $(date -d $(echo $edate | sed -e 's/\./\//g') +"%d %B %Y")"
fi
) > $odir/_period
for lab in $labs
do
[ -z "$verbose" ] || echo "Processing lab $lab."
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>TEST</title>
<title>CPU/TEAMS</title>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
......@@ -58,10 +58,10 @@ Highcharts.chart('container', {
type: 'pie'
},
title: {
text: 'Labs/Teams CPU Usage, January, 2018'
text: 'Labs/Teams CPU Usage'
},
subtitle: {
text: 'Some subtitle'
text: timeRange
},
plotOptions: {
pie: {
......
......@@ -28,8 +28,9 @@ then
exit -1
fi
echo "var timeRange = '$(cat $idir/_period)';"
echo "var colors = Highcharts.getOptions().colors;"
units=$(ls $idir | sort)
units=$(ls $idir | egrep -v "^_" | sort)
echo "var units = ["
for unit in $units
do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment