[%#
$Id: html-incblocks.txt,v 1.4 2010-12-29 03:12:19 ivan Exp $
All BLOCK statements are defined here
%]
[%# ########### Initialize globals ################ %]
[% global.setDateDialog = 0; %]
[%# ########### Print the starting HTML blahblah ################ %]
[% BLOCK htmlstart;
IF ! contentClass; contentClass="Content"; END %]
[% freesideHeader(title, style('stylesheet')) %]
[% global.contentFinished = 0 %]
[% IF global.printError %]
[% global.printError %]
[% global.printError = '' %]
[% END %]
[% END %]
[%# ########### Print the legend ################ %]
[% BLOCK legend %]
[% legend = nodeParam(token, 'legend') %]
[% IF legend.length > 0 %]
[% FOREACH legpairstring = legend.split(';') %]
[% SET legpair = legpairstring.split(':') %]
[% xmlnorm(legpair.0) %]:
[% xmlnorm(legpair.1) %]
[% END %]
[% END %]
[% END %]
[%# ########### Print the TZ and NOW variables ################ %]
[% BLOCK variables %]
[% IF variables.TZ or variables.NOW %]
[% IF variables.TZ %]
Timezone:
[% variables.TZ %].
[% END %]
[% IF variables.NOW %]
Report date:
[% variables.NOW %].
[% END %]
[% END %]
[% END %]
[%# ########### Print the current tree name ################ %]
[% BLOCK treename %]
[% treeName %]
[% END %]
[%# ########### Print the shortcut ################ %]
[% BLOCK shortcut %]
[ [%text%] ]
[% END %]
[%# ########### Print the Help shortcut ################ %]
[% BLOCK helpshortcut;
IF nodeParam(token, 'help-text', 1);
INCLUDE shortcut
url="javascript:helpwindow()"
text="Help"
title="Open a help window for this page";
END;
END %]
[%# ########### Print the common bottomline ################ %]
[% BLOCK bottomline %]
[% global.contentFinished = 1 %]
[% END %]
[%# ########### Print the Tokensets bottomline ################ %]
[% BLOCK tsetbottomline %]
[% global.contentFinished = 1 %]
[% END %]
[%# ########### Print the ending HTML blahblah ################ %]
[% BLOCK htmlend %]
[% IF ! global.contentFinished %][% END %]
[% freesideFooter %]
[% END %]
[%# ######## Print the RRD graph image ####### %]
[% BLOCK rrgraph %]
[% IF not urltoken; urltoken = token; END %]
[% hidden ? '
':'' %]
[%IF comment%][%xmlnorm(comment)%]
[%END%]
[% hidden ? '':'' %]
[%
shortView = nodeParam(token,'rrgraph-views').split(',').0;
shortvars = [];
IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and
param(view, 'rrd-hwpredict') != 'disabled';
global.hwpredict = 1;
IF variables.NOHW;
shortvars = ['NOHW', 1];
ELSE;
shortvars = ['NOHW', ''];
END;
END
%]
[% END %]
[% END %]
[%# ######## Print the overview shortcuts ####### %]
[% BLOCK overviewShortcuts %]
[%
IF nodeParam(token, 'has-overview-shortcuts', 1) == 'yes';
FOREACH ovs = nodeParam(token,'overview-shortcuts').split('\s*,\s*');
p1 = 'overview-shortcut-text-' _ ovs;
p2 = 'overview-shortcut-title-' _ ovs;
INCLUDE shortcut
url=url(token, 'overview-subleaves-html', 'OVS', ovs)
text=nodeParam(token, p1, 1)
title=nodeParam(token, p2, 1);
END;
END %]
[% END %]
[%# ######## Set the date variable ####### %]
[% BLOCK setdate %]
[% IF variables.SETDATE == 1;
thedate = verifyDate( variables.SETDATEV );
IF thedate.length == 0;
global.printError = 'Incorrect date format';
clearVar('SETDATE');
ELSE;
variables.NOW = thedate;
END;
ELSE;
clearVar('NOW');
clearVar('SETDATE');
clearVar('SETDATEV');
END;
global.setDateDialog = 1;
%]
[% END %]
[%# ######## Print the date selection elements ####### %]
[% BLOCK enterdate %]