[% PROCESS 'html-incblocks.txt' %]
[% INCLUDE setdate %]
[% parentComment = nodeParam(parent(token),'comment') %]
[% IF parentComment;
INCLUDE htmlstart title='Graphs for ' _ xmlnorm(parentComment) printpath=1;
ELSE;
INCLUDE htmlstart title='Graphs for ' _ path(token) printpath=1;
END;
%]
[% INCLUDE variables %]
[% xmlnorm(nodeParam(token,'comment')) %]
[% INCLUDE legend %]
[% monitors = nodeParam(token,'monitor');
IF monitors != '';
moncount = monitors.split(',').size %]
Monitor[% (moncount > 1) ? 's' : '' %]:
[% (moncount > 1) ? moncount : '' %]
[% FOREACH monitor = monitors.split(',');
mondesc = param(monitor, 'comment') %]
[% monitor %]
[% IF mondesc; %]([% mondesc %])[% END %]
[% END %]
[% END %]
[% IF nodeParam(token, 'ds-type') != 'rrd-multigraph' %]
[% dayValues = rrprint(token, 'rrd-print-daily') %]
[% lastValue = rrprint(token, 'rrd-print-last') %]
Min: [% scale('%.1f', dayValues.0) %],
Avg: [% scale('%.1f', dayValues.1) %],
Max: [% scale('%.1f', dayValues.2) %],
Last: [% scale('%.1f', lastValue) %]
[% END %]
[%
graphvars = [];
graphviews = nodeParam(token,'rrgraph-views').split(',');
dayView = graphviews.1;
weekView = graphviews.2;
monthView = graphviews.3;
yearView = graphviews.4;
IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and
( param(view, 'rrd-hwpredict') == 'disabled' or variables.NOHW );
graphvars = ['NOHW', 1];
END;
%]
Last day graph
[% INCLUDE rrgraph view=dayView vars=graphvars %]
Last week graph
[% INCLUDE rrgraph view=weekView vars=graphvars %]
[% longterm = param(view, 'longterm') %]
[% IF longterm %]
Last month graph
[% INCLUDE rrgraph view=monthView %]
Last year graph
[% INCLUDE rrgraph view=yearView %]
[% END %]
[%
IF longterm;
hwview='longterm-rrd-html';
termview='default-rrd-html';
ELSE;
hwview='default-rrd-html';
termview='longterm-rrd-html';
END;
hwvars = [];
termvars = [];
IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and
param(view, 'rrd-hwpredict') != 'disabled';
IF not variables.NOHW;
hwaction = 'Disable';
hwvars = ['NOHW', 1];
termvars = ['NOHW', ''];
ELSE;
hwaction = 'Enable';
hwvars = ['NOHW', ''];
termvars = ['NOHW', 1];
END;
INCLUDE shortcut url=url(token, hwview, hwvars)
text=hwaction _ " Holt-Winters"
title="Switch Holt-Winters prediction boundaries";
ELSE;
IF longterm;
termview='default-rrd-html';
ELSE;
termview='longterm-rrd-html';
END;
END;
IF longterm;
termstr='Short';
sctitle="View last day and last week graphs";
ELSE;
termstr='Long';
sctitle="View last day, week, month, and year graphs";
END;
INCLUDE shortcut url=url(token, termview, termvars)
text=termstr _ "term view"
title=sctitle;
INCLUDE shortcut url=plainURL _ 'explain-rrdgraph.html'
text='Explain graph'
title='Describe graph elements and values'
newwindow=1;
%]
[% INCLUDE bottomline %]
[% INCLUDE htmlend %]