pari: branch aadk r1038 - in /branches/aadk/config: cfgbasic.html
home.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Jun 4 17:31:53 MST 2007
Author: pari
Date: Mon Jun 4 19:31:52 2007
New Revision: 1038
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1038
Log:
adding stuff lost in merge 1029
Modified:
branches/aadk/config/cfgbasic.html
branches/aadk/config/home.html
Modified: branches/aadk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cfgbasic.html?view=diff&rev=1038&r1=1037&r2=1038
==============================================================================
--- branches/aadk/config/cfgbasic.html (original)
+++ branches/aadk/config/cfgbasic.html Mon Jun 4 19:31:52 2007
@@ -33,7 +33,7 @@
var asterisk_guitools_inextconf = 0;
eventeater.pingstatus = false;
var keepPinging;
-
+var CF_status = 0;
function fit_toScreen(){
var t = ASTGUI.displayHeight();
@@ -165,6 +165,7 @@
newpanel( ["Service Providers", "trunks.html", "Service Providers are outbound lines used to allow the system to make calls to the real world. Trunks can be VoIP lines or traditional telephony lines."]);
newpanel( ["Calling Rules", "numberplan.html", "The Calling Rules define dialing permissions and least cost routing rules."]);
newpanel( ["Incoming Calls", "incoming.html", "Define how your incoming calls should be handled & configure DID (Direct inward Dialing)"]);
+ newpanel( ["Networking", "networking.html", "Configures networking parameters"]);
newpanel( ["Voice Menus", "menus.html", "Menus allow for more efficient routing of calls from incoming callers. Also known as IVR (Interactive Voice Response) menus or Digital Receptionist"]);
newpanel( ["Time Based Rules", "timerules.html", "define call routing rules based on date and time"]);
newpanel( ["Ring Groups", "ringgroups.html", "define RingGroups to dial more than one extension"]);
@@ -175,6 +176,7 @@
newpanel( ["File Editor", "feditor.html", "Edit Asterisk Config Files"]);
newpanel( ["Asterisk CLI", "cli.html", "Asterisk Command Line Interface"]);
newpanel( ["Backup", "backup.html", "Backup Management."]);
+ newpanel( ["Update", "flashupdate.html", "Update Firmware installed on the appliance."]);
newpanel( ["Options", "localexts.html", "Admin Settings"]);
return panels;
}
@@ -234,9 +236,9 @@
}
}
-function Logoff() {
- if(!confirm("Are you sure ?")){ return true; }
- makerequest("","","action=logoff", function(t){ window.location.href=window.location.href; } );
+function Logoff(){
+ var out = function(){ makerequest("","","action=logoff", function(t){ window.location.href=window.location.href; } ); };
+ if (confirm("Save Changes before logout ?")) { parent.astmanEngine.run_tool("/bin/save_config", out ); }else{ out();}
}
function system_link(){
Modified: branches/aadk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/home.html?view=diff&rev=1038&r1=1037&r2=1038
==============================================================================
--- branches/aadk/config/home.html (original)
+++ branches/aadk/config/home.html Mon Jun 4 19:31:52 2007
@@ -26,6 +26,25 @@
var asterisk_guitools = parent.asterisk_guitools;
var asterisk_rawmanPath = parent.asterisk_rawmanPath;
+function showdiv_statusmessage(){
+ var h= document.createElement("div");
+ h.setAttribute("id","status_message");
+ var _hs = h.style;
+ _hs.display="none";
+ _hs.position="absolute";
+ _hs.left= 170;
+ _hs.top= 190;
+ _hs.width= 350;
+ _hs.height= 115;
+ _hs.backgroundColor= "#F4EFE5";
+ _hs.borderWidth= "1px";
+ _hs.borderColor= "#7E5538";
+ _hs.borderStyle= "solid";
+ h.innerHTML = "<BR><BR><TABLE border=0 cellpadding=0 cellspacing=3 align=\"center\"> <TR> <TD><img src=\"images/loading.gif\"></TD> <TD valign=\"middle\" align=\"center\"> <div id=\"message_text\"></div></TD> </TR> </TABLE> ";
+ document.body.appendChild(h);
+}
+
+
function updateButtons(){
var f = parent.loggedon;
_$('username').disabled = (f)?1:0;
@@ -36,6 +55,7 @@
}
function localinit() {
+ showdiv_statusmessage();
top.document.title = "Asterisk GUI (Beta) -- Home";
var tmp;
var opt = {
@@ -140,6 +160,7 @@
parent.gui_feedback("Login Successful",'blue',6000);
_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
//parent.astmanEngine.pollEvents();
+ setTimeout( gui_sysinfo_mount, 100);
loggedOn();
}else if( msgs[0].headers['message'] == "Authentication failed" ){
parent.gui_feedback("Invalid Username/Password",'default',6000);
@@ -190,6 +211,71 @@
}
+
+
+
+function flipbuttons(r){
+ _$('reboot').disabled = r;
+ _$('factorydefault').disabled = r;
+ _$('reloadconfig').disabled = r;
+ _$('saveconfig').disabled = r;
+}
+
+function doSaveConfig() {
+ var doSaveConfig2 = function(){
+ parent.gui_feedback("Configuration Saved !!",'blue');
+ _$('status_message').style.display ="none" ;
+ alert("Configuration Saved");
+ flipbuttons(false);
+ }
+
+ flipbuttons(true);
+ _$('message_text').innerHTML ="Saving Changes...";
+ _$('status_message').style.display ="" ;
+ parent.astmanEngine.run_tool("/bin/save_config",onSuccess = function() {
+ parent.gui_feedback("Please wait while saving Configuration !!",'green');
+ setTimeout( doSaveConfig2, 3000 );
+ });
+}
+
+function doReboot() {
+ if (confirm("Are you sure you want to reboot the appliance?")) {
+ parent.gui_feedback("Rebooting!","blue","40000");
+ parent.astmanEngine.run_tool("/bin/reboot",onSuccess = function() { } );
+ }
+}
+
+function doFactoryDefault() {
+ if (confirm("Are you sure you want to reset to factory defaults?")) {
+ flipbuttons(true);
+ _$('message_text').innerHTML ="Resetting to factory defaults...";
+ _$('status_message').style.display ="" ;
+ parent.astmanEngine.run_tool("/bin/reset_config",onSuccess = function() { _$('status_message').style.display ="none" ; alert("Please reboot to apply factory defaults!"); flipbuttons(false);} );
+ }
+}
+
+
+function gui_sysinfo_mount(){
+ _$('message_text').innerHTML = " Checking for Compact Flash ";
+ _$('status_message').style.display ="" ;
+ parent.astmanEngine.run_tool(parent.asterisk_guiSysInfo , callback = function() {
+ var opt = { method: 'get', asynchronous: true,
+ onComplete: function(originalRequest){
+ _$('status_message').style.display ="none" ;
+ _$('sysinfohtml').innerHTML = originalRequest.responseText;
+ if( $('cf_status').innerHTML == "1"){
+ parent.CF_status = 1;
+ parent.gui_feedback("found Compact Flash ","green");
+ }else{
+ parent.gui_feedback("did not find any Compact Flash mounted");
+ }
+ },
+ onFailure: function(t) { alert("Config Error: " + t.status + ": " + t.statusText); }
+ };
+ opt.parameters="";
+ var tmp = new Ajax.Request( parent.asterisk_guiSysInfo_output, opt);
+ });
+}
</script>
<body id="foo" onload="localinit()" topmargin=0 bgcolor="EFEFEF">
<div class="mainscreenTitleBar">
@@ -219,9 +305,19 @@
<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()" class="input">
</td>
</tr>
+ <tr><td align='center' colspan='2'><BR>
+ <input type="submit" id="saveconfig" value="Save Configuration" disabled=1 onClick="doSaveConfig()">
+
+ <input type="submit" id="factorydefault" value="Factory Defaults" disabled=1 onClick="doFactoryDefault()">
+
+ <input type="submit" id="reboot" value="Reboot" disabled=1 onClick="doReboot()">
+ </td>
+ </tr>
+
</table>
</td>
</tr>
</table>
</div>
+<div id="sysinfohtml" style="display:none"></div>
</body>
More information about the asterisk-gui-commits
mailing list