McDarren has asked for the wisdom of the Perl Monks concerning the following question:
More than once in the past, I have found myself having to dynamically generate (near) real-time summaries of random data in HTML table form. Up until now, I've been hand-rolling my own solutions. But I've found myself re-using a lot of code and I'm wondering if there may already be a module that does most of what I need. I'll admit up-front that I've only had a cursory look through CPAN. Modules such as HTML::Table, HTML::Table::Compiler and HTML::QuickTable caught my eye, but I'm not sure that any of them are quite right.
Generally, I will be working with two (or more) distinct (but related) datasets. One will be a bunch of metadata - for example a list of hosts and associated properties (ip address, location name, country, etc). This data would normally come from a database.
The second set will be real-time data collected from these hosts. This data would typically be a result of parsing a number of logfiles.
A good example of this was MRTG data collected from several hosts. In this case, I needed to present a summary table listing all hosts and associated data, and then allow several user-defined actions - such as sorting/filtering and displaying/not displaying optional fields.
As I said, I already have my own hand-rolled solution for this, but every time I "re-use" it I inwardly cringe a little and can't help feeling that I keep re-inventing the wheel.
I guess what I am looking for is a general framework whereby I can arbitrarily define:
- one or more datasets
- several fields and associated properties, eg. source, datatype (for sorting), display order, field alignment, hyperlink URL, etc, etc..
- other "general" properties, such as shading colour for alternate rows
So my question is: Is there a module available that would provide a good generic framework to meet the needs I've outlined above?
(If there isn't, perhaps I'll take what I've already done and have a go at turning it into a module, because (at least for me) I believe it could be quite useful)
Thanks,
Darren :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Creating dynamic HTML tables based on user-actions
by merlyn (Sage) on Feb 14, 2006 at 13:40 UTC | |
by bart (Canon) on Feb 14, 2006 at 23:17 UTC | |
Re: Creating dynamic HTML tables based on user-actions
by santonegro (Scribe) on Feb 17, 2006 at 22:43 UTC |