+++ /dev/null
-from Components.Converter.Converter import Converter
-from Components.Element import cached
-
-class NetworkInfo(Converter, object):
- NAME = 0
- MAC = 1
- DHCP = 2
- IP = 3
- GATEWAY = 4
- NETMASK = 5
-
-
- def __init__(self, type):
- Converter.__init__(self, type)
- self.type = {
- "Name" : self.NAME,
- "Mac" : self.MAC,
- "Dhcp" : self.DHCP,
- "Ip" : self.IP,
- "Gateway" : self.GATEWAY,
- "Netmask" : self.NETMASK,
- }[type]
-
- @cached
- def getText(self):
- iface = self.source.interface
-
- if self.type is self.NAME:
- return iface.name
- elif self.type is self.MAC:
- return iface.mac
- elif self.type is self.DHCP:
- return iface.dhcp
- elif self.type is self.IP:
- return iface.ip
- elif self.type is self.GATEWAY:
- return iface.gateway
- elif self.type is self.NETMASK:
- return iface.netmask
- else:
- return _("N/A")
-
- text = property(getText)
-
request = google.gears.factory.create('beta.httprequest');
request.open('GET', url);
-// request.setRequestHeader('Pragma', 'no-cache');
-// request.setRequestHeader('Cache-Control', 'must-revalidate');
-// request.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00
-// GMT');
+ request.setRequestHeader('Pragma', 'no-cache');
+ request.setRequestHeader('Cache-Control', 'must-revalidate');
+ request.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT');
if( typeof(readyFunction) != "undefined" ){
request.onreadystatechange = function(){
}
}
-//About
+//Device Info
/*
* Handles an incoming request for /web/deviceinfo Parses the Data, and calls
* everything needed to render the Template using the parsed data and set the
* result into contentMain @param request - the XHR
*/
-function incomingAbout(request) {
+function incomingDeviceInfo(request) {
if(request.readyState == 4){
- debug("[incomingAbout] called");
+ debug("[incomingDeviceInfo] called");
var xml = getXML(request).getElementsByTagName("e2deviceinfo").item(0);
var info = {};
'model' : model
};
} catch (e) {
- debug("[incomingAbout] error parsing NIM data: " + e);
+ debug("[incomingDeviceInfo] error parsing NIM data: " + e);
}
}
'free' : free
};
} catch(e){
- debug("[incomingAbout] error parsing HDD data: " + e);
+ debug("[incomingDeviceInfo] error parsing HDD data: " + e);
}
}
'netmask' : netmask
};
} catch (e) {
- debug("[incomingAbout] error parsing NIC data: " + e);
+ debug("[incomingDeviceInfo] error parsing NIC data: " + e);
}
}
try{
info = {
- 'useGears' : gearsEnabled(),
'devicename' : xml.getElementsByTagName('e2devicename').item(0).firstChild.data,
'enigmaVersion': xml.getElementsByTagName('e2enigmaversion').item(0).firstChild.data,
'imageVersion': xml.getElementsByTagName('e2imageversion').item(0).firstChild.data,
'webifversion': xml.getElementsByTagName('e2webifversion').item(0).firstChild.data
};
} catch (e) {
- debug("[incomingAbout] About parsing Error" + e);
+ debug("[incomingDeviceInfo] parsing Error" + e);
}
var data = {
"nics" : nics,
"nims" : nims
};
- processTpl('tplAbout', data, 'contentMain');
+ processTpl('tplDeviceInfo', data, 'contentMain');
}
}
/*
- * Show About Information in contentMain
+ * Show Device Info Information in contentMain
*/
-function showAbout() {
- doRequest(url_deviceinfo, incomingAbout, false);
+function showDeviceInfo() {
+ doRequest(url_deviceinfo, incomingDeviceInfo, false);
}
-
+function showGears(){
+ data = { 'useGears' : gearsEnabled() };
+ processTpl('tplGears', data, 'contentMain');
+}
+
+
// Spezial functions, mostly for testing purpose
function openHiddenFunctions(){
openPopup("Extra Hidden Functions",tplExtraHiddenFunctions,300,100,920,0);
/*
* Opens the given Control
* @param control - Control Page as String
- * Possible Values: power, about, message, screenshot, videoshot, osdshot
+ * Possible Values: power, extras, message, screenshot, videoshot, osdshot
*/
function loadControl(control){
switch(control){
}
}
-function reloadAbout(){
- reloadContentDynamic(showAbout, 'About');
+
+function loadDeviceInfo(){
+ loadContentDynamic(showDeviceInfo, 'Device Information');
+}
+
+function loadAbout(){
+ loadContentStatic('tplAbout', 'About');
}
+function loadGearsInfo(){
+ loadContentDynamic(showGears, 'Google Gears');
+}
+
+function reloadGearsInfo(){
+ loadContentDynamic(showGears, 'Google Gears');
+}
+
+
/*
* Switches Navigation Modes
* @param mode - The Navigation Mode you want to switch to
reloadNav('tplNavBoxControl', 'BoxControl');
break;
- case "About":
- loadContentDynamic(showAbout, 'About');
+ case "Extras":
+ reloadNav('tplNavExtras', 'Extras');
break;
-
+
default:
break;
}
<li><a href="#" onClick="switchMode('Timer')">Timer</a></li>
<!-- <li><a href="#" onClick="switchMode('MediaPlayer')">MediaPlayer</a></li> -->
<li><a href="#" onClick="switchMode('BoxControl')">BoxControl</a></li>
- <li><a href="#" onClick="switchMode('About')">About</a></li>
+ <li><a href="#" onClick="switchMode('Extras')">Extras</a></li>
<li>
<a href="#" onClick="openWebTV();">
WebTV
* About
******************/
+ #about{
+ font-size: 12px;
+ text-align: center;
+ }
+
+ #about h1{
+ font-size: 14px;
+ }
+
+ #about a, #about a:hover, #about a:visited{
+ text-decoration: underline;
+ }
+
.aboutHeader {
width:100%;
color:#FFF;
border: 1px solid #CCC;
width: 100%;
margin: 0px;
- padding: 0px;
+ padding: 0px;
}
.about td{
<!-- tplAbout -->
- <table id="contentTable">
- <tr>
- <td>
- <table cellspacing="0" cellpadding="0" class="aboutSection">
- <tr>
- <td class="aboutSectionLeft">
- <table class="fullwidth">
- <tr>
- <td class="fullwidth">
- <table cellspacing="0" class="about">
- <tr>
- <th colspan="2" class="aboutHeader">Device- & Versioninformation</th>
- </tr>
- <tr>
- <td class="aboutElementLeft">Devicename:</td>
- <td class="aboutElementRight">${info.devicename}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Enigma Version:</td>
- <td class="aboutElementRight">${info.enigmaVersion}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Image Version:</td>
- <td class="aboutElementRight">${info.imageVersion}</td>
- </tr>
-
- <tr>
- <td class="aboutElementLeft">Frontprozessor Version:</td>
- <td class="aboutElementRight">${info.fpVersion}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Webinterface Version:</td>
- <td class="aboutElementRight">${info.webifversion}</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="fullwidth">
- <table cellspacing="0" class="about">
- <tr>
- <th colspan="2" class="aboutHeader">Tuners</th>
- </tr>
- {for nim in nims}
- <tr>
- <td class="aboutElementLeft">${nim.name}:</td>
- <td class="aboutElementRight">${nim.model}</td>
- </tr>
- {/for}
- </table>
- </td>
- </tr>
- {for hdd in hdds}
- <tr>
- <td class="fullwidth">
- <table cellspacing="0" class="about">
- <tr>
- <th colspan="2" class="aboutHeader">Harddisk (${hdd.model})</th>
- </tr>
- <tr>
- <td class="aboutElementLeft">Capacity:</td>
- <td class="aboutElementRight">${hdd.capacity}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Free:</td>
- <td class="aboutElementRight">${hdd.free}</td>
- </tr>
- </table>
- </td>
- </tr>
- {/for}
- {for nic in nics}
- <tr>
- <td class="fullwidth">
- <table cellspacing="0" class="about">
- <tr>
- <th colspan="2" class="aboutHeader">Network Interface (${nic.name})</th>
- </tr>
- <tr>
- <td class="aboutElementLeft">Mac Address:</td>
- <td class="aboutElementRight">${nic.mac}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">DHCP enabled:</td>
- <td class="aboutElementRight">${nic.dhcp}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">IP:</td>
- <td class="aboutElementRight">${nic.ip}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Netmask:</td>
- <td class="aboutElementRight">${nic.netmask}</td>
- </tr>
- <tr>
- <td class="aboutElementLeft">Gateway:</td>
- <td class="aboutElementRight">${nic.gateway}</td>
- </tr>
- </table>
- </td>
- </tr>
- {/for}
- </table>
- </td>
- <td class="aboutSectionRight">
- <table class="fullwidth">
- <tr>
- <td class="fullwidth">
- <table cellspacing="0" class="about">
- <tr>
- <th colspan="2" class="aboutHeader">Gears Support</th>
- </tr>
- <tr>
- <td colspan="2">
- <p>
- Enigma2 WebControl supports (Google) Gears to minimize the load caused on your Dreambox.
- </p>
- <p>
- It uses the LocalServer of Gears to store all static content on your Computer instead of loading it from your Dreambox all the time.
- Enabling Gears can speed up enigma2 WebControl quite a lot (the less power your Box has the more you will profit).
- </p>
- <p>
- To install Gears please go to <a style="text-decoration: underline" href="http://gears.google.com/" target="_blank">gears.google.com</a>.
- </p>
- <p>
- For technical information about Gears please read the API Doc at <a style="text-decoration: underline" href="http://code.google.com/intl/de-DE/apis/gears/" target="_blank">code.google.com/intl/de-DE/apis/gears/</a>
- </p>
- </td>
- </tr>
- <tr>
- <td class="aboutElementLeft">
- {if info.useGears}
- <button onClick="disableGears(reloadAbout)">Disable Gears</button>
- {else}
- <button onClick="enableGears(reloadAbout)">Enable Gears</button>
- {/if}
- </td>
- <td class="aboutElementRight">
- <div id="gearsProcess"></div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </tr>
- </td>
- </table>
+ <div id="about">
+ <h1>Authors</h1>
+ <div>
+ _3c5x9<br/>
+ jjbig<br/>
+ reichi<br/>
+ tmbinc<br/>
+ ... and many contributors
+ </div>
+ <hr>
+ <h1>Javascript Libraries</h1>
+ <div>
+ <a href="http://www.prototypejs.org" target="_blank">www.prototypejs.org</a><br />
+ <a href="http://script.aculo.us/" target="_blank">script.aculo.us/</a><br />
+ <a href="http://www.ruzee.com/blog/shadedborder" target="_blank">www.ruzee.com/blog/shadedborder/</a><br />
+ <a href="http://code.google.com/p/trimpath/wiki/JavaScriptTemplates" target="_blank">code.google.com/p/trimpath/wiki/JavaScriptTemplates</a><br />
+ <a href="http://gears.google.com" target="_blank">gears.google.com</a>
+ </div>
+ <hr>
+ <div>
+ <h1>LICENSE</h1>
+<pre>
+All Files of this Software are licensed under the Creative Commons
+Attribution-NonCommercial-ShareAlike 3.0 Unported
+License if not stated otherwise in a files head. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative
+Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+
+Alternatively, this plugin may be distributed and executed on hardware which
+is licensed by Dream Multimedia GmbH.
+
+This plugin is NOT free software. It is open source, you are allowed to
+modify it (if you keep the license), but it may not be commercially
+distributed other than under the conditions noted above.
+<pre>
<!-- /tplAbout -->
--- /dev/null
+
+<!-- tplDeviceInfo -->
+ <table id="contentTable">
+ <tr>
+ <td>
+ <table class="fullwidth">
+ <tr>
+ <td class="fullwidth">
+ <table cellspacing="0" class="about">
+ <tr>
+ <th colspan="2" class="aboutHeader">Device- & Versioninformation</th>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Devicename:</td>
+ <td class="aboutElementRight">${info.devicename}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Enigma Version:</td>
+ <td class="aboutElementRight">${info.enigmaVersion}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Image Version:</td>
+ <td class="aboutElementRight">${info.imageVersion}</td>
+ </tr>
+
+ <tr>
+ <td class="aboutElementLeft">Frontprozessor Version:</td>
+ <td class="aboutElementRight">${info.fpVersion}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Webinterface Version:</td>
+ <td class="aboutElementRight">${info.webifversion}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="fullwidth">
+ <table cellspacing="0" class="about">
+ <tr>
+ <th colspan="2" class="aboutHeader">Tuners</th>
+ </tr>
+ {for nim in nims}
+ <tr>
+ <td class="aboutElementLeft">${nim.name}:</td>
+ <td class="aboutElementRight">${nim.model}</td>
+ </tr>
+ {/for}
+ </table>
+ </td>
+ </tr>
+ {for hdd in hdds}
+ <tr>
+ <td class="fullwidth">
+ <table cellspacing="0" class="about">
+ <tr>
+ <th colspan="2" class="aboutHeader">Harddisk (${hdd.model})</th>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Capacity:</td>
+ <td class="aboutElementRight">${hdd.capacity}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Free:</td>
+ <td class="aboutElementRight">${hdd.free}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ {/for}
+ {for nic in nics}
+ <tr>
+ <td class="fullwidth">
+ <table cellspacing="0" class="about">
+ <tr>
+ <th colspan="2" class="aboutHeader">Network Interface (${nic.name})</th>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Mac Address:</td>
+ <td class="aboutElementRight">${nic.mac}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">DHCP enabled:</td>
+ <td class="aboutElementRight">${nic.dhcp}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">IP:</td>
+ <td class="aboutElementRight">${nic.ip}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Netmask:</td>
+ <td class="aboutElementRight">${nic.netmask}</td>
+ </tr>
+ <tr>
+ <td class="aboutElementLeft">Gateway:</td>
+ <td class="aboutElementRight">${nic.gateway}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ {/for}
+ </table>
+ </td>
+ </tr>
+ </table>
+<!-- /tplDeviceInfo -->
--- /dev/null
+
+<!-- tplGears -->
+ <p>
+ Enigma2 WebControl supports (Google) Gears to minimize the load caused on your Dreambox.
+ </p>
+ <p>
+ It uses the LocalServer of Gears to store all static content on your Computer instead of loading it from your Dreambox all the time.
+ Enabling Gears can speed up enigma2 WebControl quite a lot (the less power your Box has the more you will profit).
+ </p>
+ <p>
+ To install Gears please go to <a style="text-decoration: underline" href="http://gears.google.com/" target="_blank">gears.google.com</a>.
+ </p>
+ <p>
+ For technical information about Gears please read the API Doc at <a style="text-decoration: underline" href="http://code.google.com/intl/de-DE/apis/gears/" target="_blank">code.google.com/intl/de-DE/apis/gears/</a>
+ </p>
+ <p>
+ {if useGears}
+ <button onClick="disableGears(reloadGearsInfo)">Disable Gears</button>
+ {else}
+ <button onClick="enableGears(reloadGearsInfo)">Enable Gears</button>
+ {/if}
+ </p>
+ <p>
+ <div id="gearsProcess"> </div>
+ </p>
+<!-- /tplGears -->
+
\ No newline at end of file
--- /dev/null
+
+<!-- tplNavExtras -->
+<table id="navTimer" class="navTable">
+ <tr>
+ <td><a href="#" onclick="loadDeviceInfo();">Device Info</a><td>
+ </tr>
+ <tr>
+ <td><a href=#" onclick="loadGearsInfo();">Google Gears</a></td>
+ </tr>
+ <tr>
+ <td><a href="#" onclick="loadAbout();">About</a><td>
+ </tr>
+</table>
+<!-- /tplNavExtras -->
</head>
<body>
+<p>Enigma2 WAP - EPG</p>
<div class="wap" style="text-align: center;">
-<table border="1">
+<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td><b>Channel</b></td>
<td><b>Name</b></td>