[AWS] A new version of the AWS Status page
Thomas Løcke
thomas.granvej6 at gmail.com
Thu Apr 29 23:49:42 CEST 2010
I wanted a more complete status page for my future AWS applications,
so I asked my wife to come up with something. This is the result:
http://ada-dk.org/temp/status.html
I told her to avoid graphics and that all CSS had to be embedded in
the XHTML. Oh, and the markup of course had to validate:
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fada-dk.org%2Ftemp%2Fstatus.html
We think the result came out pretty good, so we assigned copyright to
AdaCore, in case you guys want to use the new design.
You might've noticed there's a bit more information on this page,
compared to the original status page. I wanted as many of the
configuration settings to be available on the status page, so a few
changes to aws-server-status.adb was necessary to make it happen. I
will of course add both the status page template file and the
aws-server-status changes to my Git repo later today. I will probably
also add the new templates_parser tags to this section of the AWS
manual: http://www.adacore.com/wp-content/files/auto_update/aws-docs/aws.html#Status-page
Another feature of the page is a default limit on the amount of
sessions that are being showed (I have mine set at 20). I'll mostly
use the sessions list for debugging purposes during development, so
IMHO it's not necessary to output all sessions per default. The amount
of sessions to print to screen is set at the top of the template using
a regular @@SET@@ constant. The same goes for all the colors used on
the page, so switching to another color scheme is very simple.
Oh, and the Reuse_Address warning is shown because I'm running this
test AWS app with Reuse_Address True. The warning is of course turned
off when Reuse_Address is False. The warning is just a handy way of
reminding myself to turn it off when an application goes live. :o)
Another change is that all dates fetched by aws-server-status are now
in the YYYY-MM-DD HH:MM:SS format, so they can be manipulated using
the templates_parser FORMAT_DATE filter. As you can see, I prefer my
dates in the DD-MM-YY HH:MM:SS format, but I couldn't format the dates
from the old aws-server-status because they weren't in the proper
format. As the templates_parser manual states:
"The date must be in the ISO format (YYYY-MM-DD) eventually
followed by a space and the time with the format HH:MM:SS. If the date
is not given in the right format it returns the date as-is."
We've included some examples in the template file, so it's fairly
simple to switch to another date format.
The page has been checked in Firefox 2.x/3.6x, Opera 9.5x/10.5x,
Safari 4.x, IE 7/8, Konqueror, Lynx and the latest Chrome.
Regards,
Thomas Løcke
ps. Here's the current status page, for those who can't remember how
it looks: http://ada-dk.org/temp/status_old.html
More information about the AWS
mailing list