play sound in hm web console

Need new test, action, option? Post request here.
Post Reply
rc
Posts: 100
Joined: Mon Aug 01, 2005 7:51 am

play sound in hm web console

Post by rc »

Hi Alex,

my wish for web console:

option to play repeatedly a little sound file when at least one bad, warning or unknown test isn't acknowledged. This option should be separately turn on/off for different status (for instance beside counter on top for Bad tests, warning and Unknown).

With best regards
Enrico
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Its not a problem to implement such option but probably this option is not good enough... What if you want to stop sound, then some other status changes status? I think Web Service should track all new bad items. Its more complicated, this task was delayed.

Regards
Alex
megasound

Thats easy ...look here

Post by megasound »

this is my header file
change the "towarn.wav" to your favorite wav file....
it also "refresh" every minute

goog luck with it...
megasound

Code: Select all

<HTML>

<HEAD>
<TITLE>Current Status</TITLE>

<META HTTP-EQUIV="Refresh" CONTENT="60; URL=">

<STYLE TYPE="text/css">
* {margin: 0; padding: 1px;}  
BODY { background-color: black; font-family: arial;  }

  H1, H2, H3, H4, H5, H6 { color: white; font:12px/12px; }
  TH { color: white; font:12px/12px; }
  TR { color: white; font:12px/12px; }
  TR.Foldertitle { color: #EAEA00; background-color: #008040; font:12px/12px arial; text-align: left;}
  TR.Good { color: white; background-color: #008040; font:12px/12px arial; text-align: center;}
  TR.Bad { color: white; background-color: red; font:12px/12px arial; font-weight: bold; text-align: right;}
  TR.Disabled { color: white; background-color: orange; font:12px/12px arial; text-align: center;}
  TR.OutOfSchedule { color: black; background-color: #C0C0C0; font:12px/12px arial; text-align: center;}
  TR.Unknown { color: black; background-color: #FFFF80; font:12px/12px arial; text-align: center;}
  A:visited 	{ color: #FFFFFF; text-decoration: none }
  A:link	{ color: #FFFFFF; text-decoration: none }
  A:hover	{ color: #DDB47E; text-decoration: none }
  A:active 	{ color: #DDB47E; text-decoration: none }

</STYLE>

</HEAD>

<BODY>

<SCRIPT LANGUAGE="vbscript">
If %BadTests% > 0 Then
	document.write("<bgsound src=./towarn.wav>")
end if
</SCRIPT>

<TABLE WIDTH="100%" cellpadding="0">

<SCRIPT LANGUAGE="vbscript">
If %BadTests% > 0 Then
document.write("<TR CLASS=""Bad""> !!! SERVICE DOWN - SEE BELOW </TR>")
end if
</SCRIPT>


<tr><td align="right" colspan="10"> 
Page generated: %DateTime% Services up: %GoodTests% down: %BadTests% Page refreshed: 
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth()+1;
var curr_year = d.getFullYear();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
if (curr_min < 10) curr_min = "0" + curr_min;
var curr_sec = d.getSeconds();
if (curr_sec < 10) curr_sec = "0" + curr_sec;
document.write(curr_date + "-" + curr_month + "-" + curr_year + " " + curr_hour + ":" + curr_min + ":" + curr_sec);
//-->
</SCRIPT> Page auto-refresh every 60 secs
</td></tr>

Post Reply