pari: branch aadk r574 - /branches/aadk/config/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Apr 2 12:39:59 MST 2007
Author: pari
Date: Mon Apr 2 14:39:58 2007
New Revision: 574
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=574
Log:
Skeleton for 'Update appliance firmware from the GUI'
Added:
branches/aadk/config/flashupdate.html
Modified:
branches/aadk/config/cfgbasic.html
Modified: branches/aadk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cfgbasic.html?view=diff&rev=574&r1=573&r2=574
==============================================================================
--- branches/aadk/config/cfgbasic.html (original)
+++ branches/aadk/config/cfgbasic.html Mon Apr 2 14:39:58 2007
@@ -96,6 +96,8 @@
new PanelDef("sysinfo", "System Info", "accordion-icon.gif", "System Information."),
new PanelDef("backup", "Backup", "accordion-icon.gif", "Backup Management."),
+
+ new PanelDef("flashupdate", "Update", "accordion-icon.gif", "Update Firmware installed on the appliance"),
new PanelDef("localexts", "Options", "accordion-icon.gif", "Admin Settings")
Added: branches/aadk/config/flashupdate.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/flashupdate.html?view=auto&rev=574
==============================================================================
--- branches/aadk/config/flashupdate.html (added)
+++ branches/aadk/config/flashupdate.html Mon Apr 2 14:39:58 2007
@@ -1,0 +1,144 @@
+<!--
+ * Asterisk-GUI - an Asterisk configuration interface
+ *
+ * Manage network settings on the appliance
+ *
+ * Copyright (C) 2006-2007, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com>
+ * Pari Nannapaneni <pari at digium.com>
+ * Brandon Kruse <bkruse 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/astman.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 localajaxinit(){
+ _$('updatetype_http').checked = true;
+ switch_httptftp('h');
+ parent.loadscreen(this);
+}
+
+
+function switch_httptftp(a){
+ if(a=='h'){
+ _$('tr_1').style.display = "";
+ _$('tr_2').style.display = "none";
+ _$('tr_3').style.display = "none";
+ }
+ if(a=='t'){
+ _$('tr_1').style.display = "none";
+ _$('tr_2').style.display = "";
+ _$('tr_3').style.display = "";
+ }
+}
+
+function call_flashupdate(){
+ var h = _$('updatetype_http');
+ var hu = _$('httpurl');
+ var t = _$('updatetype_tftp');
+ var tu = _$('tftpurl');
+
+ if( h.checked && !hu.value.length ){
+ gui_alert("Please enter the url of the flash image");
+ return false;
+ }
+
+ if( t.checked && !tu.value.length ){
+ gui_alert("Please enter a TFTP server");
+ return false;
+ }
+
+ if( h.checked ){
+ parent.astmanEngine.run_tool("flashupdate " + hu.value , onSuccess = function() {
+ gui_alert("Please reboot system after 5 minutes");
+ }
+ );
+ return;
+ }
+
+
+ if( t.checked ){
+ if( _$('tftp_filename').value.length ){
+ var fname = " " + _$('tftp_filename').value ;
+ }else{
+ var fname = "" ;
+ }
+ parent.astmanEngine.run_tool("flashupdate tftp " + tu.value + fname, onSuccess = function() {
+ gui_alert("Please reboot system after 5 minutes");
+ }
+ );
+ return;
+ }
+}
+
+</script>
+<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF">
+<div class="mainscreenTitleBar">
+ <span style="margin-left: 4px;font-weight:bold;">Update Appliance Firmware</span>
+ <span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
+</div>
+<div class="mainscreenContentBox" id="mailboxcontent">
+<table class="mainscreenTable" align="center">
+<tr> <td valign="top" align="center">
+ <table width=510>
+ <tr>
+ <td align=left>
+ <BR>
+ <fieldset>
+ <legend><B> Download image from a : </B></legend>
+ <LABEL FOR="updatetype_http">
+ <input type=radio id="updatetype_http" name="updatetype" value="HTTP" onchange="switch_httptftp('h');"> HTTP URL
+ </LABEL>
+
+ <LABEL FOR="updatetype_tftp">
+ <input type=radio id="updatetype_tftp" name="updatetype" value="TFTP" onchange="switch_httptftp('t');"> TFTP Server
+ </LABEL>
+ </fieldset>
+ </td>
+ </tr>
+ <tr>
+ <td> <BR>
+ <fieldset>
+ <legend><B> Details : </B></legend>
+ <table>
+ <tr id="tr_1">
+ <td align=right>HTTP URL :</td>
+ <td> <input id="httpurl" size=35> </td>
+ </tr>
+ <tr id="tr_2">
+ <td align=right>TFTP Server :</td>
+ <td><input id="tftpurl" size=35></td>
+ </tr>
+ <tr id="tr_3">
+ <td align=right>File Name :</td>
+ <td><input id="tftp_filename" size=25></td>
+ </tr>
+ </table>
+ </fieldset>
+ </td>
+ </tr>
+ <tr> <td align=center>
+ <BR>
+ <input type="button" id="Update_Image" onclick="call_flashupdate();" value="Update">
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
+</div>
+</body>
More information about the asterisk-gui-commits
mailing list