#!/bin/sh
#This script is created by ssparser automatically. The parser first created by MaoShouyan
printf "Content-type: text/html
Cache-Control: no-cache

"
echo -n "";
. ../common/common.sh 
myself="/cgi-bin/Maintain/`basename $0`"

echo -n "
<script type=\"text/javascript\" src=\"/img/common.js\"></script>
<script language=\"javascript\">
function onEditEvent(evt)
{
	window.location.href = \"/cgi-bin/Maintain/cfg_evtedit?evtype=\" + evt;
}
	
</script>
<body>
"; cgi_show_title "־-->¼־" 
echo -n "
<br>
<table width=900 border=0 cellspacing=1 cellpadding=1>
<tr id=tblhdr height=22>
	<td width=120 align=center>¼</td>
	<td width=100 align=center>־ʽ</td>
	<td width=160 align=center>շIP:˿</td>
        <td width=420 align=center>(Ѽ¼/¼ʧ/ѷ/ʧ)</td>
        <td width=*   align=center></td>
</tr>
";
tblid="row1"
${FLOWEYE} logger stat event_detail=1 | \
while read cfgevt evtype desc svrip svrport logtype sentok sentfail dropped written theothers;
do
	[ "${cfgevt}" != "evtcfg" ] && continue
	[ "${evtype}" = "appflow" -o "${evtype}" = "alg" ] && continue

echo -n "
	<tr id=${tblid}>
	<td align=center><a style=\"color:#0000ff\" href=\"javascript:onEditEvent('${evtype}')\">${desc}</a></td>
	"; [ "${logtype}" = "none" ] && logtype="¼" 
echo -n "
	<td align=center>${logtype}</td>
	<td align=center>${svrip}:${svrport}</td>
	<td align=center>${written}/${dropped}/${sentok}/${sentfail}</td>
	<td align=center><a style=\"color:#0000ff\" href=\"javascript:onEditEvent('${evtype}')\">༭</a></td>
	</tr>
";
	if [ "${tblid}" = "row1" ]; then
		tblid="row2"
	else
		tblid="row1"
	fi
done

echo -n "
</table>
</body>
</html>
";