1 <% include( '/elements/header.html', 'Cacti Graphs' ) %>
5 <FORM NAME="CactiGraphForm" ID="CactiGraphForm" style="margin-top: 0">
6 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
8 <% include( '/elements/progress-init.html',
11 $p.'misc/process/cacti_graphs.cgi',
12 { url => 'javascript:window.location.replace("'.popurl(2).'misc/cacti_graphs.html?svcnum='.$svcnum.'")' },
15 note we use window.location.replace for the callback url above
16 so that this page gets removed from browser history after processing
17 so that process() doesn't get triggered by the back button
19 <P>Loading graphs, please wait...</P>
20 <SCRIPT TYPE="text/javascript">
26 <P><% emt($error) %></P>
27 <FORM NAME="CactiGraphForm" ID="CactiGraphForm" style="margin-top: 0">
28 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
29 <INPUT TYPE="hidden" NAME="load" VALUE="1">
30 <INPUT TYPE="submit" VALUE="Reload Graphs">
40 use File::Slurp qw( slurp );
43 unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
45 my $svcnum = $cgi->param('svcnum') or die 'Illegal svcnum';
46 my $load = $cgi->param('load');
47 my $graphnum = $cgi->param('graphnum') || '';
52 'table' => 'cacti_page',
53 'hashref' => { 'svcnum' => $svcnum, 'graphnum' => $graphnum },
56 $content = $page->content;
58 $error = 'No graphs found in import cache. Click below to retry import.';