<% include( '/elements/header.html', 'Cacti Graphs' ) %> % if ($load) {
<% include( '/elements/progress-init.html', 'CactiGraphForm', [ 'svcnum' ], $p.'misc/process/cacti_graphs.cgi', { url => 'javascript:window.location.replace("'.popurl(2).'misc/cacti_graphs.html?svcnum='.$svcnum.'")' }, ) %>

Loading graphs, please wait...

% } elsif ($error) {

<% emt($error) %>

% } else { <% $content %> % } <%init> use File::Slurp qw( slurp ); die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my $svcnum = $cgi->param('svcnum') or die 'Illegal svcnum'; my $load = $cgi->param('load'); my $graphnum = $cgi->param('graphnum') || ''; my ($content,$error); unless ($load) { my $page = qsearchs({ 'table' => 'cacti_page', 'hashref' => { 'svcnum' => $svcnum, 'graphnum' => $graphnum }, }); if ($page) { $content = $page->content; } else { $error = 'No graphs found in import cache. Click below to retry import.'; } }