#!/usr/bin/perl # Show server or domain information use strict; use warnings; require 'old-blue-theme/blue-theme-lib.pl'; &ReadParse(); &load_theme_library(); our ($current_theme, %gconfig); our %text = &load_language($current_theme); my $bar_width = 300; # Get system info to show my @info = &list_combined_system_info(); my ($redir) = grep { $_->{'type'} eq 'redirect' } @info; if ($redir) { &redirect($redir->{'url'}); return; } my $prehead = defined(&WebminCore::theme_prehead) ? &capture_function_output(\&WebminCore::theme_prehead) : ""; &popup_header(undef, $prehead); print "

\n";
}
# Show notifications first
@info = sort { ($b->{'type'} eq 'warning') <=> ($a->{'type'} eq 'warning') }
@info;
foreach my $info (@info) {
if ($info->{'type'} eq 'warning') {
# An alert message
print &ui_alert_box($info->{'warning'},
$info->{'level'} || 'warn');
}
else {
my $open = defined($info->{'open'}) ? $info->{'open'} : 1;
print &ui_hidden_table_start($info->{'desc'}, "width=600", 2,
$info->{'module'}.$info->{'id'},
$open);
if ($info->{'type'} eq 'table') {
# A table of various labels and values
if ($info->{'header'}) {
print &ui_table_row(
undef, $info->{'header'}, 4);
}
foreach my $t (@{$info->{'table'}}) {
my $chart = "";
if ($t->{'chart'}) {
$chart = &make_bar_chart(
$t->{'chart'});
$chart = "
".$chart;
}
print &ui_table_row($t->{'desc'},
$t->{'value'}.$chart);
}
}
elsif ($info->{'type'} eq 'chart') {
# A table of graphs
my $ctable;
if ($info->{'header'}) {
$ctable .= $info->{'header'}."
\n";
}
$ctable .= &ui_columns_start($info->{'titles'});
foreach my $t (@{$info->{'chart'}}) {
$ctable .= &ui_columns_row([
$t->{'desc'},
&make_bar_chart($t->{'chart'}),
$t->{'value'},
]);
}
$ctable .= &ui_columns_end();
print &ui_table_row(undef, $ctable, 2);
}
elsif ($info->{'type'} eq 'html') {
# A chunk of HTML
print &ui_table_row(undef, $info->{'html'}, 2);
}
print &ui_hidden_table_end();
print "
\n"; } } print "