Report showing tests less than 99% OK

Exchange HTML report templates between users.
Post Reply
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Report showing tests less than 99% OK

Post by thomasschmeidl »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: Report showing tests less than 99% OK

Post by KS-Soft Europe »

thomasschmeidl 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 may use Custom HTML Reports: http://www.ks-soft.net/hostmon.eng/mfra ... CustomHTML

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>
Regards,
Max
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I am sorry, probably, would be better to use following script:

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>
Regards,
Max
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Post by thomasschmeidl »

THanx

Thomas
thomasschmeidl
Posts: 166
Joined: Sat Apr 15, 2006 2:14 pm
Location: Germany, Bavaria

Post by thomasschmeidl »

I see, it's much easier now using the views introduced in 6.70

Great feature!
johnm
Posts: 117
Joined: Fri Apr 01, 2005 9:49 pm

Post by johnm »

thomasschmeidl, not sure I follow. Why do you say it is easier, can you expand on this?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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
johnm
Posts: 117
Joined: Fri Apr 01, 2005 9:49 pm

Post by johnm »

ah, good point. I didn't see the "Generate" button. If it was any larger it would be a window.

Thanks :)
Post Reply