Hi everybody,
which is the easiest way to define a report (in style of standard html report) that shows only tests with an %AliveRatio% <99%?
Cheers
Thomas
Report showing tests less than 99% OK
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Report showing tests less than 99% OK
You may use Custom HTML Reports: http://www.ks-soft.net/hostmon.eng/mfra ... CustomHTMLthomasschmeidl wrote:which is the easiest way to define a report (in style of standard html report) that shows only tests with an %AliveRatio% <99%?
You just should specify JavaScript inside the body of report that checks %AliveRatio% variable.
Test Items section should be like this:
Code: Select all
<SCRIPT type="text/javascript">
var test_alive_ratio = '%AliveRatio%';
if (test_alive_ratio < '99 %')
document.write('%TestName%, %Reply%, etc.<BR>');
</script>
Max
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
I am sorry, probably, would be better to use following script:
Regards,
Max
Code: Select all
<SCRIPT type="text/javascript">
var test_alive_ratio_str = '%AliveRatio%';
var test_alive_ratio = parseInt(test_alive_ratio_str.replace(' %',''));
if (test_alive_ratio < 99)
document.write('%TestName%, %Reply%, etc.<BR>');
</script>
Max
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
It is really easier to create such type of report, because version 6.70+ offers Views: http://www.ks-soft.net/hostmon.eng/mfra ... #ViewsList
You may create a View wich display test items that match some criteria ( http://www.ks-soft.net/hostmon.eng/mfra ... w_criteria ), like "Alive ratio > N%", "Reply > N", etc. and generate report for the view: http://www.ks-soft.net/hostmon.eng/mfra ... ew_reports
So, you do not need to use JavaScript and "Custom" report now.
Regards,
Max
You may create a View wich display test items that match some criteria ( http://www.ks-soft.net/hostmon.eng/mfra ... w_criteria ), like "Alive ratio > N%", "Reply > N", etc. and generate report for the view: http://www.ks-soft.net/hostmon.eng/mfra ... ew_reports
So, you do not need to use JavaScript and "Custom" report now.
Regards,
Max