pari: trunk r923 - in /trunk/config: cfgbasic.html sysinfo.html syslog.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon May 14 16:06:43 MST 2007


Author: pari
Date: Mon May 14 18:06:42 2007
New Revision: 923

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=923
Log:
Moved Asterisk Logs info from System Info to advanced menu



Added:
    trunk/config/syslog.html
Modified:
    trunk/config/cfgbasic.html
    trunk/config/sysinfo.html

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?view=diff&rev=923&r1=922&r2=923
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Mon May 14 18:06:42 2007
@@ -354,11 +354,12 @@
 				<option value="cli.html">Asterisk CLI</option>
 				<option value="moh.html">Music on Hold</option>
 				<option value="timerules.html">Time Based Rules</option>
-				<option value="sip.html">SIP</option>
-				<option value="iax.html">IAX</option>
+				<option value="sip.html">Global SIP Settings</option>
+				<option value="iax.html">Global IAX Settings</option>
 			<!--	<option value="jabber.html">Jabber</option>
 				<option value="jingle.html">Jingle</option>
 				<option value="zapata.html">Zap Channel</option>	-->
+				<option value="syslog.html">Asterisk Logs</option>
 				<option value="options.html">Change Password</option>
 				<option value="TOSETUP">Setup Wizard</option>
 			</select>

Modified: trunk/config/sysinfo.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/sysinfo.html?view=diff&rev=923&r1=922&r2=923
==============================================================================
--- trunk/config/sysinfo.html (original)
+++ trunk/config/sysinfo.html Mon May 14 18:06:42 2007
@@ -27,38 +27,8 @@
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 var sysinfocallbacks = new Object;
-var tabs = new Array('tab1', 'tab2', 'tab3','tab4');
-var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div','today_log');
-
-function thisday_log(){
-	 _$('status_message').style.display = "" ;
-	var _ld = _$('log_day').value; 
-	if(  _ld < 10 ){ var space = "  "; }else{ var space = " ";  }
-	var tmp_command = "/bin/grep /var/log/asterisk/messages -e '" + _$('log_month').value + space + _ld 
-						+ " ' > /var/lib/asterisk/static-http/config/today_log.html" ;
-	parent.astmanEngine.run_tool( tmp_command , onSuccess = function() { _$('status_message').style.display='none'; load_todayslog(); } );
-}
-
-function 	load_todayslog(){
-	_$('status_message').style.display= "" ;	
-	
-	var opt = {
-		method: 'get',
-		asynchronous: true,
-		onComplete: function(originalRequest){
-			_$('status_message').style.display = 'none' ;
-			_$('todaylog').innerHTML = (originalRequest.responseText) ? "<PRE>"+originalRequest.responseText.escapeHTML() +"</PRE>" : "No log messages found on this Day" ;
-			
-		},
-		onFailure: function(t) {
-			_$('status_message').style.display = 'none' ;
-			gui_alert("Config Error: " + t.status + ": " + t.statusText);
-		}
-	};
-	opt.parameters="";
-	var tmp = new Ajax.Request("./today_log.html", opt);
-	return true;
-}
+var tabs = new Array('tab1', 'tab2', 'tab3');
+var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div');
 
 function show_window(x){
 	for(i=0; i < tabs.length ; i++){
@@ -76,9 +46,6 @@
 		break;
 		case 3:
 		var divs_toshow = new Array('df_div','memory_div');
-		break;
-		case 4:
-		var divs_toshow = new Array('today_log');
 		break;
 	}
 	
@@ -119,7 +86,6 @@
 			for(var i=0; i < divs_toshow.length; i++ ){ _$(divs_toshow[i]).style.display = ""; }
 
 			document.getElementById(tabs[0]).className = "tabselected";
-			load_todayslog();
 		},
 		onFailure: function(t) {
 			_$('status_message').style.display='none';
@@ -135,10 +101,7 @@
 function localajaxinit(){
 	setWindowTitle("System Info");
 	// call the tool (sysinfo)
-	var date = new Date() ; 
 	showdiv_statusmessage();
-	_$('log_month').selectedIndex = date.getMonth() ;
-	_$('log_day').selectedIndex = date.getDate()  - 1 ;
 	_$('status_message').style.display="block";
 	_$('message_text').innerHTML = "Loading system Information ...";
 	parent.loadscreen(this);
@@ -165,7 +128,6 @@
 		<a href="#" class="tab" onclick="return show_window(1);" id="tab1"  onmouseover="show_tooltip('en', 'sysinfo', 0);">General</a>&nbsp;&nbsp;
 		<a href="#" class="tab" onclick="return show_window(2);" id="tab2"  onmouseover="show_tooltip('en', 'sysinfo', 1);">ifconfig</a>&nbsp;&nbsp;
 		<a href="#" class="tab" onclick="return show_window(3);" id="tab3"  onmouseover="show_tooltip('en', 'sysinfo', 2);">Resources</a>&nbsp;&nbsp;
-		<a href="#" class="tab" onclick="return show_window(4);" id="tab4"  onmouseover="show_tooltip('en', 'sysinfo', 3);">Logs</a>&nbsp;&nbsp;
 		<div id="sysinfohtml" style="display:none"></div>
 
 		<div id="information" style=" border: solid 0px black; background: transparent; padding: 4px; height:440px; width:95%;">
@@ -194,29 +156,6 @@
 			<div id="memory_div" style="display:none;">
 					Memory Usage:<PRE><div id="memoryusage" style="font-family:courier; font-size:8.5pt;"></div></PRE>
 			</div>
-			<div id="today_log" style="display:none;">
-				Asterisk Log messages (today): 
-					<select id="log_month">
-					<option value="Jan">Jan</option>
-					<option value="Feb">Feb</option>
-					<option value="Mar">Mar</option>
-					<option value="Apr">Apr</option>
-					<option value="May">May</option>
-					<option value="Jun">Jun</option>
-					<option value="Jul">Jul</option>
-					<option value="Aug">Aug</option>
-					<option value="Sep">Sep</option>
-					<option value="Oct">Oct</option>
-					<option value="Nov">Nov</option>
-					<option value="Dec">Dec</option>
-					</select>
-					<select id="log_day">
-					<script> for(var i=1; i < 32; i++){ document.write( '<option value="' + i + '">' + i + '</option>' ); }</script>
-					</select>
-					<input type="button" value="Go" onclick="thisday_log();">
-
-				<div id="todaylog" style="font-family:courier; font-size:8.5pt; width:522px; height:405px; overflow :auto;"></div>
-			</div>
 		</div>
 	</td>
 	</tr>

Added: trunk/config/syslog.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/syslog.html?view=auto&rev=923
==============================================================================
--- trunk/config/syslog.html (added)
+++ trunk/config/syslog.html Mon May 14 18:06:42 2007
@@ -1,0 +1,122 @@
+<!--
+ * Asterisk-GUI	-	an Asterisk configuration interface
+ *
+ * Shows Asterisk Log messages
+ *
+ * Copyright (C) 2006-2007, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com>
+ * Pari Nannapaneni <pari at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.js"></script>
+<script src="scripts/astman.js"></script>
+<script src="scripts/tooltip.js"></script>
+<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
+<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<script>
+
+function thisday_log(){
+	 _$('status_message').style.display = "" ;
+	var _ld = _$('log_day').value; 
+	if(  _ld < 10 ){ var space = "  "; }else{ var space = " ";  }
+	var tmp_command = "/bin/grep /var/log/asterisk/messages -e '" + _$('log_month').value + space + _ld 
+						+ " ' > /var/lib/asterisk/static-http/config/today_log.html" ;
+	parent.astmanEngine.run_tool( tmp_command , onSuccess = function() { _$('status_message').style.display='none'; load_todayslog(); } );
+}
+
+function load_todayslog(){
+	_$('status_message').style.display= "" ;	
+	
+	var opt = {
+		method: 'get',
+		asynchronous: true,
+		onComplete: function(originalRequest){
+			_$('status_message').style.display = 'none' ;
+			_$('todaylog').innerHTML = (originalRequest.responseText) ? "<PRE>"+originalRequest.responseText.escapeHTML() +"</PRE>" : "No log messages found on this Day" ;
+			
+		},
+		onFailure: function(t) {
+			_$('status_message').style.display = 'none' ;
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
+		}
+	};
+	opt.parameters="";
+	var tmp = new Ajax.Request("./today_log.html", opt);
+	return true;
+}
+
+
+function localajaxinit(){
+	setWindowTitle("System Log");
+	// call the tool (sysinfo)
+	var date = new Date() ; 
+	showdiv_statusmessage();
+	_$('log_month').selectedIndex = date.getMonth() ;
+	_$('log_day').selectedIndex = date.getDate()  - 1 ;
+	_$('status_message').style.display="block";
+	_$('message_text').innerHTML = "Loading system Information ...";
+	parent.loadscreen(this);
+	load_todayslog();
+}
+
+function free_mem(){
+	if( navigator.userAgent.indexOf("MSIE") == -1 ){ return true; }
+	try{
+		purge( document.body );
+	} catch(e){ }
+}
+
+</script>
+<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF"  onunload="free_mem()">
+<div class="mainscreenTitleBar">
+	<span style="margin-left: 4px;font-weight:bold;">Asterisk Logs</span>
+	<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+</div>
+<div class="mainscreenContentBox" id="userscontent">
+<table class="mainscreenTable" align="center">
+	<tr valign="top" height="18">	
+	<td align="left">
+		<div id="information" style=" border: solid 0px black; background: transparent; padding: 4px; height:440px; width:95%;">
+			<BR>
+			<div id="today_log">
+				Asterisk Log messages : 
+					<select id="log_month">
+					<option value="Jan">Jan</option>
+					<option value="Feb">Feb</option>
+					<option value="Mar">Mar</option>
+					<option value="Apr">Apr</option>
+					<option value="May">May</option>
+					<option value="Jun">Jun</option>
+					<option value="Jul">Jul</option>
+					<option value="Aug">Aug</option>
+					<option value="Sep">Sep</option>
+					<option value="Oct">Oct</option>
+					<option value="Nov">Nov</option>
+					<option value="Dec">Dec</option>
+					</select>
+					<select id="log_day">
+					<script> for(var i=1; i < 32; i++){ document.write( '<option value="' + i + '">' + i + '</option>' ); }</script>
+					</select>
+					<input type="button" value="Go" onclick="thisday_log();">
+
+				<div id="todaylog" style="font-family:courier; font-size:8.5pt; width:522px; height:405px; overflow :auto;"></div>
+			</div>
+		</div>
+	</td>
+	</tr>
+	<tr><td></td></tr>
+</table>
+</div>
+</body>



More information about the asterisk-gui-commits mailing list