View previous topic :: View next topic |
Author |
Message |
ChristianD
Joined: 06 Aug 2003 Posts: 18
|
Posted: Tue May 25, 2004 5:28 am Post subject: SLA type report |
|
|
Hi,
i created some scripts for my own to do some sla reporting with variables:
I use 98% as a key to make the item red when its below.
This percentage could also be a CommentLine? variable to make it more scriptable.
I hope someone could also make use of it.
Sincere,
Christian
Custom Report:
Test Items:
<script type="text/vbscript">
if (%AliveRatio%>98 ) then
document.write("<input type=button class=Good value=""%TestName% (%AliveRatio%%)"" onclick=""showinfo('\n%TestName% \n%CommentLine2% \n%CommentLine3% \n%CommentLine4% \n%CommentLine5% \n%CommentLine6% \nAverage Reply: %AverageReply%')"">")
Else
document.write("<input type=button class=Bad value=""%TestName% (%AliveRatio%%)"" onclick=""showinfo('\n%TestName% \n%CommentLine2% \n%CommentLine3% \n%CommentLine4% \n%CommentLine5% \n%CommentLine6% \nAverage Reply: %AverageReply%')"">")
end if
</script>
Folder Summary:
<HR>
<script type="text/vbscript">
If (%FolderCurrent_TotalTests%>0) then
If (cint(%FolderAverage_AliveRatio%+1-1) >=98 ) then
Document.write("<font color=""green""><b>Aantal tests: %FolderCurrent_TotalTests% - Uptime: %FolderAverage_AliveRatio%% - Unknown time: %FolderAverage_UnknownRatio%% - Downtime: %FolderAverage_DeadRatio%%</b></font>")
Else
Document.write("<font color=""red""><b>Aantal tests: %FolderCurrent_TotalTests% - Uptime: %FolderAverage_AliveRatio%% - Unknown time: %FolderAverage_UnknownRatio%% - Downtime: %FolderAverage_DeadRatio%%</4></font>")
End if
End if
</script> |
|
Back to top |
|
|
ericm
Joined: 10 Feb 2004 Posts: 40
|
Posted: Mon Jun 07, 2004 9:32 am Post subject: Loading Scripts |
|
|
Dumb ?
how do I load this? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Mon Jun 07, 2004 1:42 pm Post subject: |
|
|
- use menu "Profiles"->"Report profiles" to open Report Profiles dialog.
- click "New" button to create new report profile
- choose "Custom HTML" as report type
- click on small button beside "report type" combo to setup profile
- copy & paste code into appropriate sections ("Folder Summary" into "Folder Summary" section; "Test items" into "Test items" sections)
Regards
Alex |
|
Back to top |
|
|
|