mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-18 10:51:07 +02:00
yWeb: move data from /src to /data
Origin commit data
------------------
Branch: ni/coolstream
Commit: 29847283ad
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-15 (Thu, 15 Dec 2016)
Origin message was:
------------------
- yWeb: move data from /src to /data
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
150
data/y-web/extentions/boxinfo/files/httpd/Y_Ext_BoxInfo.yhtm
Executable file
150
data/y-web/extentions/boxinfo/files/httpd/Y_Ext_BoxInfo.yhtm
Executable file
@@ -0,0 +1,150 @@
|
||||
{=include-block:Y_Blocks.txt;head=}
|
||||
<link rel="STYLESHEET" type="text/css" href="/ywidget.css"/>
|
||||
<script type="text/javascript" src="/Y_Baselib.js"></script>
|
||||
<script type="text/javascript" src="/prototype.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function dbox_exec_bi(_cmd)
|
||||
{
|
||||
var __cmd = _cmd.replace(/ /g, "&");
|
||||
return loadSyncURL("/control/exec?Y_Ext_BoxInfo&"+__cmd);
|
||||
}
|
||||
function dbox_exec_bi2(_cmd)
|
||||
{
|
||||
var __cmd = _cmd.replace(/ /g, "&");
|
||||
var res=loadSyncURL("/control/exec?Y_Ext_BoxInfo&"+__cmd);
|
||||
return res.gsub("\n","<br/>")
|
||||
}
|
||||
|
||||
function do_start()
|
||||
{
|
||||
$('statusline').show();
|
||||
do_mem();
|
||||
|
||||
}
|
||||
function str2A(_str)
|
||||
{
|
||||
_str=_str.strip();
|
||||
_str=_str.replace(/[\t\n]/gi," ");
|
||||
_str=_str.replace(/[ ]+/gi," ");
|
||||
return _str.split(" ");
|
||||
}
|
||||
function do_mem()
|
||||
{
|
||||
var yfree=dbox_exec_bi('free');
|
||||
yfree=yfree.strip();
|
||||
yfree = yfree.replace(/[\t\n]/gi,"");
|
||||
yfree = yfree.replace(/[ ]+/gi," ");
|
||||
var yfreeA=yfree.split(" ");
|
||||
$('mtotal').update(yfreeA[6]);
|
||||
$('mused').update(yfreeA[7]);
|
||||
$('mfree').update(yfreeA[8]);
|
||||
$('mswap').update(yfreeA[13]);
|
||||
|
||||
$('status').update("getting hardware information");
|
||||
window.setTimeout("do_hardware()",100)
|
||||
}
|
||||
function do_hardware()
|
||||
{
|
||||
var res=dbox_exec_bi('avia_version');
|
||||
$('aviachip').update(res);
|
||||
$('box').update(dbox_exec_bi('tuxinfo -M'));
|
||||
$('model').update(dbox_exec_bi('tuxinfo -V'));
|
||||
var res=dbox_exec_bi('i2c');
|
||||
var i2cA=res.split("\t");
|
||||
$('i2c').update(i2cA[2]);
|
||||
$('avswitch').update(split_left(dbox_exec_bi('avswitch')," "));
|
||||
var resA=str2A(dbox_exec_bi('cpuinfo'));
|
||||
$('cpu').update(resA[5]);
|
||||
$('cpuclock').update(resA[8]);
|
||||
$('bongomips').update(resA[21]);
|
||||
$('fb').update(dbox_exec_bi('fb'));
|
||||
|
||||
$('status').update("getting OS and Software information");
|
||||
window.setTimeout("do_sw()",100)
|
||||
}
|
||||
function do_sw()
|
||||
{
|
||||
// $('linux').update(dbox_exec_command('cat /proc/version'));
|
||||
$('os').update(dbox_exec_bi('uname -s'));
|
||||
$('kernel').update(dbox_exec_bi('uname -r'));
|
||||
$('kerneldate').update(dbox_exec_bi('uname -v'));
|
||||
$('arch').update(dbox_exec_bi('uname -m'));
|
||||
var res=dbox_exec_bi('busybox_help');
|
||||
$('busybox').update(split_left(res,"\n"));
|
||||
$('busyboxcmd').update(split_right(res,"functions:\n"));
|
||||
var res=dbox_exec_bi('proc_version');
|
||||
|
||||
$('status').update("Filesystem information");
|
||||
window.setTimeout("do_fs()",100)
|
||||
}
|
||||
function do_fs()
|
||||
{
|
||||
$('mounts').update(dbox_exec_bi2('do_proc mounts'));
|
||||
$('mtd').update(dbox_exec_bi('do_proc mtd').gsub("\n","<br/>"));
|
||||
var res=dbox_exec_bi('do_proc filesystems');
|
||||
res=res.gsub("nodev","");
|
||||
res=res.strip();
|
||||
res=res.gsub("\n",",");
|
||||
$('filesystems').update(res);
|
||||
$('mods').update(dbox_exec_bi2('do_proc modules'));
|
||||
|
||||
$('statusline').hide();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<style>
|
||||
.line {border-bottom: 1px solid #6D96A9;font-weight:bold}
|
||||
.y_form tr {vertical-align:top;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="work_box">
|
||||
<div class="work_box_head">
|
||||
<div class="work_box_head_h2">{=var-set:help_url=Help-Extensions-boxinfo=}{=var-set:menu=Box Information [1.0.1]=}{=include-block:Y_Blocks.txt;work_menu=}</div></div>
|
||||
<div class="work_box_body">
|
||||
<div id="statusline"><img border="0" src="/images/wait.gif" width="20" height="20" alt="wait"/>
|
||||
<span id="status">getting memory information</span></div>
|
||||
<table class="y_form" cellpadding="1" width="100%" style="margin-right:20px">
|
||||
<tr><td class="y_form_header" colspan="2">Speicher</td></tr>
|
||||
<tr><td>total:</td><td><span id="mtotal">...</span></td></tr>
|
||||
<tr><td>used:</td><td><span id="mused">...</span></td></tr>
|
||||
<tr><td>free:</td><td><span id="mfree">...</span></td></tr>
|
||||
<tr><td>swap:</td><td><span id="mswap">...</span></td></tr>
|
||||
|
||||
<tr><td class="y_form_header" colspan="2">Hardware</td></tr>
|
||||
<tr><td>avia chip:</td><td><span id="aviachip">...</span></td></tr>
|
||||
<tr><td>AV chip:</td><td><span id="avswitch">...</span></td></tr>
|
||||
<tr><td>i2c:</td><td><span id="i2c">...</span></td></tr>
|
||||
<tr><td>CPU:</td><td><span id="cpu">...</span></td></tr>
|
||||
<tr><td>CPU Clock:</td><td><span id="cpuclock">...</span></td></tr>
|
||||
<tr><td>bongomips:</td><td><span id="bongomips">...</span></td></tr>
|
||||
<tr><td>Box:</td><td><span id="box">...</span></td></tr>
|
||||
<tr><td>Hersteller:</td><td><span id="model">...</span></td></tr>
|
||||
<tr><td>Framebuffer:</td><td><span id="fb">...</span></td></tr>
|
||||
|
||||
<tr><td class="y_form_header" colspan="2">OS & Software</td></tr>
|
||||
<tr><td>OS:</td><td><span id="os">...</span></td></tr>
|
||||
<tr><td>Kernel:</td><td><span id="kernel">...</span></td></tr>
|
||||
<tr><td>Kernel Date:</td><td><span id="kerneldate">...</span></td></tr>
|
||||
<tr><td>Architecture:</td><td><span id="arch">...</span></td></tr>
|
||||
<tr><td>Busybox Version:</td><td><span id="busybox">...</span></td></tr>
|
||||
<tr><td>Busybox Commands:</td><td><span id="busyboxcmd">...</span></td></tr>
|
||||
|
||||
<tr><td class="y_form_header" colspan="2">Filesystem & Modules</td></tr>
|
||||
<tr><td>Mounts:</td><td><span id="mounts">...</span></td></tr>
|
||||
<tr><td>mtd:</td><td><span id="mtd">...</span></td></tr>
|
||||
<tr><td>filesystems:</td><td><span id="filesystems">...</span></td></tr>
|
||||
<tr><td>modules & dependencies:</td><td><span id="mods">...</span></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
window.setTimeout("do_start();",500);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
76
data/y-web/extentions/boxinfo/files/httpd/scripts/Y_Ext_BoxInfo.sh
Executable file
76
data/y-web/extentions/boxinfo/files/httpd/scripts/Y_Ext_BoxInfo.sh
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
# -----------------------------------------------------------
|
||||
# BoxInfo (yjogol)
|
||||
# $Date: 2007-12-29 17:08:16 $
|
||||
# $Revision: 1.1 $
|
||||
# -----------------------------------------------------------
|
||||
|
||||
do_line()
|
||||
{
|
||||
echo "------------------------------------------------------------------------------------"
|
||||
}
|
||||
do_dline()
|
||||
{
|
||||
echo "===================================================================================="
|
||||
}
|
||||
do_header()
|
||||
{
|
||||
do_line
|
||||
echo " $1"
|
||||
do_line
|
||||
}
|
||||
do_proc()
|
||||
{
|
||||
do_header "$1"
|
||||
cat /proc/$2
|
||||
}
|
||||
do_cmd()
|
||||
{
|
||||
do_header "$1"
|
||||
shift 1
|
||||
$*
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
# $2=l (long)
|
||||
proc)
|
||||
do_proc Kernel version
|
||||
if [ "$2" == "l" ]; then
|
||||
do_proc CPU cpuinfo
|
||||
do_proc 'Memory usage overview' meminfo
|
||||
do_proc Partitions partitions
|
||||
do_proc 'mtd list' mtd
|
||||
do_proc 'installed Filesystems' filesystems
|
||||
do_proc 'loaded modules' modules
|
||||
do_proc 'system uptime' uptime
|
||||
do_cmd "kernel stack" dmesg
|
||||
fi
|
||||
do_cmd 'free space' df
|
||||
do_cmd 'running processes' ps
|
||||
do_cmd 'busybox version and installed commands' busybox --help
|
||||
if [ "$2" == "l" ]; then
|
||||
do_cmd 'Commands in /bin' ls /bin
|
||||
do_cmd 'Commands in /sbin' ls /sbin
|
||||
do_cmd 'mounts' cat /etc/fstab
|
||||
if [ -e /etc/smb.conf ]; then
|
||||
do_cmd 'Samba Server configuration' cat /etc/smb.conf
|
||||
fi
|
||||
if [ -e /etc/auto.net ]; then
|
||||
do_cmd 'auto mounter configuration' cat /etc/auto.net
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
avia_version) cat /proc/bus/avia_version ;;
|
||||
tuxinfo) shift 1; tuxinfo $* ;;
|
||||
i2c) cat /proc/bus/i2c ;;
|
||||
free) free ;;
|
||||
avswitch) /bin/switch ;;
|
||||
cpuinfo) cat /proc/cpuinfo ;;
|
||||
fb) cat /proc/fb ;;
|
||||
uname) shift 1; uname $* ;;
|
||||
busybox_help) busybox --help ;;
|
||||
proc_version) cat /proc/version ;;
|
||||
do_proc) cat /proc/$2 ;;
|
||||
*)
|
||||
echo "[Y_BoxInfo.sh] Parameter falsch: $*" ;;
|
||||
esac
|
Reference in New Issue
Block a user