package DerivedInfo;
our $VERSION = "0.0.0";
use strict;
sub process_configuration
{
my (%args) = @_;
my ($node, $node_info, $command, $configuration_data,
$derived, $alerts, $conditions, $logger, $opconfig)
= @args{qw(node node_info command configuration_data
derived_info alerts conditions logger opconfig)};
# ...insert logic that derives knowledge from the context
return { success => 1,
derived_info => {
some_reportable_thing =>
{
type => "table",
title => "Reported by ".__PACKAGE__,
labels => [ 'one col', 'another col', ],
rows => [ [ 'maybe key', 'maybe value', ],
[ 'maybe key2', 'maybe value', ],
[ 'last row', 'last value', ],
],
},
my_filtered_table => {
type => 'table',
labels => [ 'first col', 'second', undef, 'and at long last' ],
rows => [
[ 'note that', 'there is', 'a gap', 'something that you were not meant to see' ],
[ 1, 2, 3, 4, ],
],
},
ours_but_not_displayed =>
{
doesnt_display => "whatever",
stored => [ 4, 7, 29 ],
deep_is_ok => { other => { thing => [ 1..10 ], } },
},
},
};
}
1; |