- unless ($opts{tiny}) {
- display img {src => "plotfs.cgi?$parms", class => 'chart'};
- } else {
- display img {src => "plotfs.cgi?$parms", border => 0};
- } # unless
+ my %filesystem = $clearadm->GetFilesystem($opts{system}, $opts{filesystem});
+
+ # We can use the cached version only if the opts are set to default
+ if ($opts{scaling} eq 'Day' and $opts{points} == 7) {
+ my $data = $opts{tiny} ? $filesystem{fssmall} : $filesystem{fslarge};
+
+ display img {src => "data:image/png;base64,$data"};
+ } else {
+ unless ($opts{tiny}) {
+ display img {src => "plotfs.cgi?$parms", class => 'chart'};
+ } else {
+ display img {src => "plotfs.cgi?$parms", border => 0};
+ } # unless
+ } # if
+ } elsif ($opts{type} eq 'vob' or $opts{type} eq 'view') {
+ my (%vob, %view);
+
+ %vob = $clearadm->GetVob($opts{tag}, $opts{region}) if $opts{type} eq 'vob';
+ %view = $clearadm->GetView($opts{tag}, $opts{region}) if $opts{type} eq 'view';
+ # We can use the cached version only if the opts are set to default
+ if ($opts{scaling} eq 'Day' and $opts{points} == 7) {
+ my $storageType = $opts{tiny} ? "$opts{storage}small" : "$opts{storage}large";
+ my $data = $opts{type} eq 'vob' ? $vob{$storageType} : $view{$storageType};
+
+ display img {src => "data:image/png;base64,$data"};
+ } else {
+ unless ($opts{tiny}) {
+ display img {src => "plotstorage.cgi?$parms", class => 'chart'};
+ } else {
+ display img {src => "plotstorage.cgi?$parms", border => 0};
+ } # unless
+ } # if