Commit 8112dd45 authored by Vinicius Ruoso's avatar Vinicius Ruoso

Added necessary html code to generate the new style SDI pages.

The table attributes variable has been changed to remove the html
border. The javascript paint function do the job better.

The starttable function call has been changed to accept a Title
argument, that will be atached to the table top bar.

The html code inside starttable() is not the best way to write,
but it's easier to maintain, as we can't wrap lines due to html
specific issues.
Signed-off-by: default avatarVinicius Ruoso <>
parent ad9ddd97
......@@ -31,7 +31,7 @@ fi
: ${TYPENAME:=Class}
: ${WWWDIR:=$PREFIX/www}
: ${DATADIR:=$PREFIX/coleta}
: ${TABLEATTRIBUTES:="border=\"1\""}
: ${TABLEATTRIBUTES:="border=\"0\""}
: ${HISTORY:=true}
......@@ -69,9 +69,18 @@ function generatecolumnnames()
function starttable()
echo "<div id=\"${TID}_div\">"
echo "<span id=\"${TID}_cols\"></span>"
echo "<table class=\"sortable\" id=\"${TID}\" $TABLEATTRIBUTES>"
echo "<div class=\"table_bar\" id=\"${TID}_bar\">
<h3><a href=\"javascript:table_expand('${TID}');\" id=\"${TID}_expand\">
<img src=\"img/expandUP.jpg\" /></a> $1</h3>
<div class=\"bar_right\">
<a href=\"#\" onmouseover=\"show_menu('${TID}_cols');\">
Selecionar colunas <img src=\"img/columns.jpg\" /></a>
<div class=\"hide\" id=\"${TID}_cols\" onmouseout=\"hide_menu(event, this);\">ID,Cidade,Escola,Status,Uptime</div>
<div id=\"${TID}_div\">
<div id=\"${TID}_load\" class=\"loading\"></div>
<table class=\"sortable\" style=\"display: none;\" id=\"${TID}\" $TABLEATTRIBUTES>"
printf "<tr>$COLUMNNAMES</tr>\n"
......@@ -82,8 +91,8 @@ function generate()
exec > $TMP
cat $PREFIX/html/header.html
echo "<h1>$TYPENAME: $(basename $1|tr '_' ' ')</h1>"
TITLE="$TYPENAME: $(basename $1|tr '_' ' ')"
starttable "${TITLE}"
while read HOSTLINE; do
printf "<tr>"
for COLUMN in columns/*; do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment