changeset 463:24007794e57a

Update Web UI to actual state.
author Aleksandr Rybalko <ray@ddteam.net>
date Mon, 24 Sep 2012 14:10:44 +0300
parents 42ab78ecd342
children d7b0ddec1929
files profiles/lua_web_ui/files/etc/www/htdocs/Basic.iptv.html profiles/lua_web_ui/files/etc/www/htdocs/Status.log.lua profiles/lua_web_ui/files/etc/www/htdocs/Status.status.lua profiles/lua_web_ui/files/etc/www/htdocs/css/router.css profiles/lua_web_ui/files/etc/www/htdocs/css/toolbar.css profiles/lua_web_ui/files/etc/www/htdocs/css/tv.css profiles/lua_web_ui/files/etc/www/htdocs/icons/minus.gif profiles/lua_web_ui/files/etc/www/htdocs/icons/monitor.gif profiles/lua_web_ui/files/etc/www/htdocs/icons/plus.gif profiles/lua_web_ui/files/etc/www/htdocs/icons/text.gif profiles/lua_web_ui/files/etc/www/htdocs/img/FreeBSD.png profiles/lua_web_ui/files/etc/www/htdocs/js/tv.js profiles/lua_web_ui/files/etc/www/htdocs/tv.html
diffstat 13 files changed, 385 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/Basic.iptv.html	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,14 @@
+$$$code:inc("htdocs/header.html")$$$
+    <h1>IPTV configuration (Multicast forwarding)</h1>
+
+$$$code:conf_table("IPTV", "IPTV", "igmp.instance[1]",
+{
+    { label = "Enabled", 			type = "attr", htmltype = "checkbox", 	node = ":enable" 	},
+    { label = "Upstream (wan0)", 		type = "node", htmltype = "text", 	node = "up" 		},
+    { label = "Downstream (lan0 or wlan0)", 	type = "node", htmltype = "text", 	node = "down" 		},
+})$$$
+
+$$$code:inc("htdocs/footer.html")$$$
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/Status.log.lua	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,27 @@
+
+return ([[
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+	<meta http-equiv="content-type" content="text/html; charset=utf-8">
+	<title>Status</title>
+	<style type="text/css"> body {	margin:0; padding:0; } 	</style>
+	<link href="css/anim.css" rel="stylesheet" type="text/css">
+    </head>
+    <body class="yui3-skin-sam  yui-skin-sam">
+
+<div id="Main Log" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>Main Log</h4>
+    </div>
+    <a href="#" target="_blank">Open log in new window</a>
+    <div class="yui3-bd"><pre>
+]]
+    .. exec_output("cat /var/log/all.log") ..
+    [[</pre></div>
+</div>
+
+</body>
+</html>
+]]);
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/Status.status.lua	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,104 @@
+function runtime(iface)
+    local ret = "";
+    if r[iface] then
+	for k,v in pairs(r[iface]) do
+	    ret = ret .. k .. "=" .. v .. "<br/>\n";
+	end
+
+	return (ret);
+    end
+    return ("");
+end
+
+return ([[
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+    <head>
+	<meta http-equiv="content-type" content="text/html; charset=utf-8">
+	<title>Status</title>
+	<style type="text/css"> body {	margin:0; padding:0; } 	</style>
+	<link href="css/anim.css" rel="stylesheet" type="text/css">
+    </head>
+    <body class="yui3-skin-sam  yui-skin-sam">
+    <h1>LAN configuration</h1>
+
+<div id="Static" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>Static/DHCP</h4>
+    </div>
+    <div class="yui3-bd">
+    ]]
+    .. runtime("wan0") ..
+    [[
+    </div>
+</div>
+<div id="PPPoE" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>PPPoE</h4>
+    </div>
+    <div class="yui3-bd">
+    ]]
+    .. runtime("PPPoE") ..
+    [[
+    </div>
+</div>
+<div id="PPP" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>PPP</h4>
+    </div>
+    <div class="yui3-bd">
+    ]]
+    .. runtime("PPP") ..
+    [[
+    </div>
+</div>
+<div id="IPSec0" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>IPSec0</h4>
+    </div>
+    <div class="yui3-bd">
+    ]]
+    .. runtime("IPSec0") ..
+    [[
+    </div>
+</div>
+<div id="Memory" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>Memory Usage</h4>
+    </div>
+    <div class="yui3-bd"><pre>
+    ]]
+    .. exec_output("sysctl -n vm.vmtotal") ..
+    [[
+    </pre></div>
+</div>
+<div id="ifconfig" class="yui3-module boxitem">
+    <div class="yui3-hd">
+        <h4>ifconfig output</h4>
+    </div>
+    <div class="yui3-bd"><pre>
+    ]]
+    .. exec_output("ifconfig") ..
+    [[
+    </pre></div>
+</div>
+<script type="text/javascript" src="js/ajax.js"></script>
+<script>
+function send_update(form, proc)
+{
+    var query = getValuesAsArray(form);
+    if (!proc) {
+	proc = function (x) { };
+    }
+    ajax("POST", "/cmd.xml", query, true, proc);
+
+    return false;
+}
+</script>
+
+
+
+</body>
+</html>
+]]);
+
--- a/profiles/lua_web_ui/files/etc/www/htdocs/css/router.css	Mon Sep 24 14:07:25 2012 +0300
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/css/router.css	Mon Sep 24 14:10:44 2012 +0300
@@ -1,3 +1,6 @@
+/* Copyright 2004 D-Link Systems, Inc. All Rights Reserved.
+-------------------------------------------------------------------------------- */
+
 html, div, h1, h2, h3, h4, p, ul, ol, li, dl, dt, dd, td, input, select, textarea
 {
 	font-family: Tahoma, Helvetica, Geneva, Arial, sans-serif;
@@ -87,77 +90,77 @@
 }
 
 #table_tree{
-	font-family: Arial;
-	font-size: 22px;
-	height: 514px;
-	width: 200px;
-	margin: 5px 4px 3px 1px;
-	border-top-color:#808080;
-	border-left-color:#808080;
-	background:#FFFFFF;
+    font-family: Arial;
+    font-size: 22px;
+    height: 514px;
+    width: 200px;
+    margin: 5px 4px 3px 1px;
+    border-top-color:#808080;
+    border-left-color:#808080;
+    background:#FFFFFF;
 }
 
 #table_page{
-	width:555px;
-	height: 514px;
-	margin: 5px 5px 5px 3px;
-	border-width: 2px;
-	border-top:solid 2 #ffffff;
-	border-bottom:solid 2 #808080;
-	border-left:solid 2 #ffffff;
-	border-right:solid 2 #808080;
-	background:#CCDCE2;
+    width:555px;
+    height: 514px;
+    margin: 5px 5px 5px 3px;
+    border-width: 2px;
+    border-top:solid 2 #ffffff;
+    border-bottom:solid 2 #808080;
+    border-left:solid 2 #ffffff;
+    border-right:solid 2 #808080;
+    background:#CCDCE2;
 }
 
 #table_frame{
-	width:547px;
-	height: 504px;
-	margin: 2px 2px 2px 3px;
-	border: 1px solid #136393;
-	background:#E4EAEB;
+    width:547px;
+    height: 504px;
+    margin: 2px 2px 2px 3px;
+    border: 1px solid #136393;
+    background:#E4EAEB;
 }
 
 #alink_tree a:link, #alink_tree a:visited, #alink_tree a:active{
-	text-decoration: none;
-	font-size: 11px;
-	color: #000000;
+text-decoration: none;
+font-size: 11px;
+color: #000000;
 }
 
 #td_header
 {
-	font-family: Arial;
-	height: 30px;
-	color: #000000;
-	font-size: 18px;
-	background: url(img/light_blue1.jpg);
-	padding-left: 15px;
+font-family: Arial;
+height: 30px;
+color: #000000;
+font-size: 18px;
+background: url(img/light_blue1.jpg);
+padding-left: 15px;
 }
 
 #table_header{
-	height: 30px;
-	width: 100%;
-	background:#CCDCE2;
+height: 30px;
+width: 100%;
+background:#CCDCE2;
 }
 
 #table_set_main{
-	width: 100%;
-	margin-top: 1px;
-	border-top: solid 1px  #136393;
-	background: #E4EAEB;
-	padding-left: 5px;
-	padding-top: 5px;
+width: 100%;
+margin-top: 1px;
+border-top: solid 1px  #136393;
+background: #E4EAEB;
+padding-left: 5px;
+padding-top: 5px;
 }
 
 #td_left{
-	font-family: Arial;
-	text-align:left;
-	margin: 2px;
-	height:25px;
+font-family: Arial;
+text-align:left;
+margin: 2px;
+height:25px;
 }
 
 #td_right{
-	font-family: Arial;
-	text-align:left;
+font-family: Arial;
+text-align:left;
 }
 
 span.word{
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/css/toolbar.css	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,82 @@
+.toolbar{
+	background: #ccdce2 url('../img/tool_bar.jpg') center left;
+	border:none;
+	border:0px;
+	margin:0px;
+	padding:0px;
+	font-size:14px;
+	font-weight:bold;
+	}
+.toolbar ul{
+	height:25px;
+	list-style:none;
+	margin:0;
+	padding:0;
+}
+.toolbar li{
+	float:left;
+	padding:0px;
+}
+.toolbar li a{
+	color:white;
+	display:block;
+	font-weight:normal;
+	line-height:25px;
+	margin:0px;
+	padding:0px 10px;
+	text-align:center;
+	text-decoration:none;
+}
+.toolbar li a:hover, .toolbar ul li:hover a{
+	color:white;
+	text-decoration:none;
+}
+.toolbar li ul{
+	display:none;
+	height:auto;
+	padding:0px;
+	margin:0px;
+	border:0px;
+	position:absolute;
+	z-index:200;
+	width: 150px;
+}
+.toolbar li:hover ul{	display:block;	}
+.toolbar li ul li a:active span{	color:red;	}
+.toolbar li li {
+	background: #ccdce2 url('../img/tool_bar.jpg') center left;
+	display:block;
+	float:none;
+	margin:0px;
+	padding:0px;
+	width: 150px;
+}
+.toolbar li:hover li a{	background:none; }
+.toolbar li ul a{
+	display:block;
+	height:25px;
+	font-size:12px;
+	font-style:normal;
+	margin:0px;
+	padding:0px 10px 0px 10px;
+	text-align:left;
+}
+.toolbar li ul a:hover, .toolbar li ul li:hover a{
+	border:none;
+	border:0px;
+	color:#ffffff;
+	background: #ccdce2 url('../img/tool_bar.jpg') center left;
+	text-decoration:none;
+}
+.toolbar p{clear:left;}
+
+.separator {
+	border:none;
+	border:0px;
+	background: #ccdce2 url('../img/tool_bar_v.jpg') center left no-repeat;
+	width: 2px;
+	list-style:none;
+	margin:6px 0px 2px 0px;
+	padding:0px 0px 0px 0px;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/css/tv.css	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,43 @@
+body { background: #f5f5ea; };
+
+.treeview { padding: 0; clear: both; font-family: Arial, sans-serif; width: 100%; }
+.treeview * { font-size: 100.1%; }
+.treeview ul { overflow: hidden; width: 100%; margin: 0; padding: 0 0 1.5em 0; list-style-type: none; }
+.treeview ul ul { overflow: visible; width: auto; margin: 0 0 0 0; padding: 0 0 0 0.75em; }
+.treeview ul.l { border-left: 1px solid; margin-left: -1px; }
+.treeview li.cl ul { display: none; }
+.treeview li { margin: 0; padding: 0; }
+.treeview li li { margin: 0 0 0 0.5em; border-left: 1px dotted; padding: 0; }
+.treeview li div { position: relative; height: 1.5em; min-height: 16px; //height: 1.3em; }
+.treeview li li div { border-bottom: 1px dotted; }
+.treeview li li li div p { left: 0.75em; }
+.treeview li p { position: absolute; z-index: 1; top: 0.8em; //top: 0.65em; left: 1.75em; width: 100%; margin: 0; border-bottom: 1px dashed; padding: 0; }
+.treeview a { padding: 0.1em 0.2em; white-space: nowrap; //height: 1px; }
+.treeview img.i { border-right: 2px solid; border-bottom: 0.5em solid; margin-bottom: -0.5em; vertical-align: middle; }
+.treeview a.sc { position: absolute; top: 0.06em; width: 100%; margin-left: -1em; padding: 0; text-decoration: none; }
+.treeview a.sc span {margin-left: 0.3em; }
+
+/* colors */
+.treeview li p,
+.treeview img.i,
+.treeview .sc
+{ background: #f5f5ea; }
+.treeview ul.l,
+.treeview li p,
+.treeview img.i
+{ border-color: #f5f5ea; }
+.treeview ul li li,
+.treeview ul li li div
+{ border-color: #999999; }
+.treeview a,
+.treeview a.sc,
+.treeview a.sc:hover
+{ color: #000000; }
+.treeview a:hover
+{ color: #cc0000; }
+a {outline: 0}
+img { border: 0;}
+img.icon
+{ width: 16px; height: 16px;}
+img.icon_exp
+{ width: 13px; height: 15px; margin: 3px 0;}
Binary file profiles/lua_web_ui/files/etc/www/htdocs/icons/minus.gif has changed
Binary file profiles/lua_web_ui/files/etc/www/htdocs/icons/monitor.gif has changed
Binary file profiles/lua_web_ui/files/etc/www/htdocs/icons/plus.gif has changed
Binary file profiles/lua_web_ui/files/etc/www/htdocs/icons/text.gif has changed
Binary file profiles/lua_web_ui/files/etc/www/htdocs/img/FreeBSD.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/js/tv.js	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,12 @@
+function UnHide( eThis ){
+	var icon = eThis.childNodes[0].getAttribute('src');
+        var plus = /icons\/plus.gif/;
+	if( plus.test(icon) ){
+            eThis.childNodes[0].setAttribute('src', 'icons/minus.gif');
+            eThis.parentNode.parentNode.parentNode.className = '';
+        }else{
+            eThis.childNodes[0].setAttribute('src', 'icons/plus.gif');
+            eThis.parentNode.parentNode.parentNode.className = 'cl';
+        }
+        return false;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/htdocs/tv.html	Mon Sep 24 14:10:44 2012 +0300
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+	<title>ZRouter main menu</title>
+<link href="css/tv.css" type="text/css" rel="stylesheet">
+<script type="text/javascript" src="js/tv.js"></script>
+</head>
+<body>
+<div class="treeview">
+    <ul>
+        <li>
+            <div>
+        	<p>
+        	    <a href="javascript: void(0)" class="sc" onclick="return UnHide(this)">
+        		<img src="icons/monitor.gif" class="icon"/>
+        	    </a>
+        	    <a href="/home_sys.html" target="ifrMain">ZRouter Config</a>
+        	</p>
+    	    </div>
+            <ul>
+                <li class="cl"><div><p><a href="javascript: void(0)" class="sc" onclick="return UnHide(this)"><img src="icons/plus.gif" class="icon_exp"/><span>Basic Settings</span></a></p></div>
+		    <ul>
+			<li><div><p><a href="/Basic.wan.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />Internet</a></p></div></li>
+			<li><div><p><a href="/Basic.lan.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />LAN</a></p></div></li>
+			<li><div><p><a href="/Basic.wlan.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />Wireless</a></p></div></li>
+			<li><div><p><a href="/Basic.iptv.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />IPTV</a></p></div></li>
+		    </ul>
+                </li>
+                <li class="cl"><div><p><a href="javascript: void(0)" class="sc" onclick="return UnHide(this)"><img src="icons/plus.gif" class="icon_exp"/><span>Security Links</span></a></p></div>
+			<ul>
+				<li><div><p><a href="/Security.IPSec.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />IPSec</a></p></div></li>
+				<!-- li><div><p><a href="/Security.OpenVPN.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />OpenVPN</a></p></div></li -->
+				<!-- li><div><p><a href="/Security.SSH.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />SSH Tunnels</a></p></div></li -->
+			</ul>
+                </li>
+                <li class="cl"><div><p><a href="javascript: void(0)" class="sc" onclick="return UnHide(this)"><img src="icons/plus.gif" class="icon_exp"/><span>Administration</span></a></p></div>
+			<ul>
+				<li><div><p><a href="/Administration.info.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />Device Info</a></p></div></li>
+				<li><div><p><a href="/Administration.users.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />Users</a></p></div></li>
+				<li><div><p><a href="/Administration.firmware.html" target="ifrMain"><img src="icons/text.gif" class="i icon" />Firmware</a></p></div></li>
+			</ul>
+                </li>
+                <li class="cl"><div><p><a href="javascript: void(0)" class="sc" onclick="return UnHide(this)"><img src="icons/plus.gif" class="icon_exp"/><span>Status</span></a></p></div>
+			<ul>
+				<li><div><p><a href="/Status.status.lua" target="ifrMain"><img src="icons/text.gif" class="i icon" />Device Information</a></p></div></li>
+				<li><div><p><a href="/Status.log.lua" target="ifrMain"><img src="icons/text.gif" class="i icon" />System Log</a></p></div></li>
+			</ul>
+                </li>
+            </ul>
+        </li>
+    </ul>
+</div>
+</body>
+</html>
\ No newline at end of file