소스 검색

small fixes, pre ADAF workshop

Danja Vasiliev 9 년 전
부모
커밋
39c599ebe5

+ 5 - 18
openwrt/common/etc/lighttpd/lighttpd.conf

@@ -7,39 +7,27 @@ server.modules = (
  "mod_auth",
  "mod_setenv",
  "mod_proxy",
-# "mod_status",
-# "mod_debug"
 )
 
 server.document-root =  "/www/htdocs"
 server.upload-dirs =  ( "/www/tmp" )
 server.errorlog =       "/www/log/error.log"
-#accesslog.filename =    "/www/log/access.log"
 server.pid-file =       "/var/run/lighttpd.pid"
 server.username =       "httpd"
 server.groupname =      "nogroup"
 server.port =           80
 
-dir-listing.activate =   "enable"
-dir-listing.hide-dotfiles = "enable"
-
-#debug.log-request-handling = "enable"
-#debug.log-request-header = "enable"
-#debug.log-file-not-found = "enable"
-#debug.log-request-header-on-error = "enable"
-#debug.log-response-header = "enable"
-#debug.log-condition-handling	= "enable"
-#auth.debug = 2
-
-#setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
-
 $HTTP["host"] != "superglue.local" {
   accesslog.filename = "/www/log/access.log"
 }
 
+dir-listing.activate =   "enable"
+dir-listing.hide-dotfiles = "enable"
+
 index-file.names = (
     "index.html",
-    "default.html"
+    "default.html",
+    "failsafe.html"
 )
 
 cgi.assign = (
@@ -104,7 +92,6 @@ $HTTP["request-method"] == "POST" {
   )
 }
 
-
 ## can use this? per 
 ## https://dev.openwrt.org/browser/packages/net/lighttpd/files/lighttpd.conf?rev=38469
 # include_shell "cat /etc/lighttpd/conf.d/*.conf"

+ 1 - 1
openwrt/common/etc/openvpn/sgvpn-client.conf

@@ -14,7 +14,7 @@ comp-lzo
 script-security 2
 cipher BF-CBC
 log  /www/log/openvpn.log
-verb 0
+verb 1
 mute 10
 
 <ca>

+ 1 - 1
openwrt/common/opt/lib/admin/admin2.cgi

@@ -660,7 +660,7 @@ wankey=$(doUci get wankey)
   <div style='display:inline-flex'>
   <div style='display:inline-block;'>
     <input type='text' name='lanssid' value='<% doUci get lanssid %>'>
-    <input type='password' name='lankey' value='<% doUci get lankey %>'>
+    <input type='password' name='lankey' value='<% doUci get lankey %>' placeholder='passphrase'>
   </div>
   <div style='display:inline-block;'>
     <input type='text' name='lanipaddr' value='<% doUci get lanipaddr %>'>

+ 8 - 5
openwrt/common/opt/lib/resources/admin/admin.js

@@ -24,11 +24,14 @@ el['uploadbtn'].addEventListener('change', function (e) {
 var submitbtns = document.querySelectorAll('input[type="submit"]');
 for (var i=0; i < submitbtns.length; i++){
   submitbtns[i].addEventListener('click', function(e) {
-  if (e.target.hasAttribute('data-wait')) {
-    e.target.value = e.target.getAttribute('data-wait');
-  } else e.target.value = 'Working, please wait..';
-  e.stopPropagation();
-  }, false);
+    if (e.target.hasAttribute('data-wait')) {
+      e.target.value = e.target.getAttribute('data-wait');
+    } else e.target.value = 'Working, please wait..';
+ /* e.target.form.submit(function () {
+      e.target.disabled = true;
+    }); */
+    e.stopPropagation();
+  });
 }
 
 el['wanconf'].addEventListener('change', function(e) { 

+ 0 - 19
openwrt/common/opt/lib/resources/demo.html

@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-		<meta name="generator" content="SuperGlue" data-superglue-version="1.0" data-superglue-settings="">
-		<title>Superglue demo page</title>
-		<style type="text/css" data-superglue="default-css">
-			body { margin: 0px; padding: 0px; }
-			#sg-page { position: relative; top: 0px; }
-			#sg-page.sg-page-centered { margin: 0px auto; }
-			.sg-element { position: absolute; overflow: hidden; }
-		</style>
-		<link rel="stylesheet" href="/resources/css/SuperGlue.css" data-superglue="text-css">
-	</head>
-	<body style="">
-		<div id="sg-page" data-superglue-grid="off/0px">
-		</div>
-	</body>
-</html>

+ 16 - 13
openwrt/common/opt/lib/resources/failsafe.html

@@ -2,27 +2,30 @@
 <html>
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-		<meta name="generator" content="Superglue" data-superglue-version="1.0" data-superglue-settings="">
-		<title>Superglue failsafe</title>
-		<style type="text/css" data-superglue="default-css">
+		<meta name="generator" content="SuperGlue" data-superglue-version="1.0.1" data-superglue-settings="">
+		<title>Superglue | failsafe page</title>
+		<style type="text/css" data-superglue-css="defaults">
 			body { margin: 0px; padding: 0px; }
 			#sg-page { position: relative; top: 0px; }
 			#sg-page.sg-page-centered { margin: 0px auto; }
 			.sg-element { position: absolute; overflow: hidden; }
 		</style>
-		<link rel="stylesheet" href="/resources/css/SuperGlue.css" data-superglue="text-css">
+		<style type="text/css" data-superglue-css="user">
+
+		</style>
+		<link rel="stylesheet" href="/resources/css/SuperGlue.css" data-superglue-css="CSS4TextElement">
 	</head>
-	<body style="background-color: rgb(153, 151, 161); background-repeat: repeat;">
-		<div id="sg-page" class="sg-page-centered" style="width: 1156px;" data-superglue-grid="off/7px">
-			<div class="sg-element" data-superglue-type="ImageElement" style="left: 193px; top: 93px; width: 105px; height: 225px;">
-	<div style="width: 100%; height: 100%; background-image: url(/resources/img/superglueLogo.png); background-repeat: repeat-y;"></div>
+	<body style="background-color: rgb(242, 242, 245);">
+		<div id="sg-page" data-superglue-grid="off/0px">
+			<div class="sg-element" data-superglue-type="ImageElement" style="left: 242px; top: 91px; width: 113px; height: 236px;">
+				<img src="/resources/img/superglueLogo.png">
 			</div>
-			<div class="sg-element" data-superglue-type="TextElement" style="left: 313px; top: 193px; width: 270px; height: 55px;">
-<p style="font-size: 40px; font-family: Sans;"><span style="font-family: Montserrat;"><b><span style="font-size: 40px;">SUPERGLUE</span></b></span></p>
+			<div class="sg-element" data-superglue-type="TextElement" style="left: 412px; top: 148px; width: 551px; height: 225px;">
+				<p><span style="font-size: 16px; font-family: TitilliumWeb;">USB&nbsp;</span><span style="font-size: 16px; font-family: TitilliumWeb;">storage device&nbsp;</span><span style="font-size: 16px; font-family: TitilliumWeb;">is currently&nbsp;</span><span style="font-size: 16px; font-family: TitilliumWeb;">available.</span></p><p><span style="font-size: 16px; font-family: TitilliumWeb;"><br></span></p><p><span style="font-size: 16px; font-family: TitilliumWeb;"><b>1.</b> Please attach storage device to the USB port of your Superglue device</span></p><p><span style="font-size: 16px; font-family: TitilliumWeb;"><b>2.</b> Use&nbsp;</span><span style="color: rgb(68, 68, 68); font-size: 16px; font-family: TitilliumWeb;"><a href="http://superglue.local/admin" style="color: rgb(68, 68, 68);">Superglue control panel</a></span><span style="color: rgb(78, 78, 78); font-size: 16px; font-family: TitilliumWeb;"><a href="http://superglue.local/admin" style="color: rgb(68, 68, 68);"></a></span><span style="font-size: 16px; font-family: TitilliumWeb;">&nbsp;to initialize storage device</span></p><div><br></div>
 			</div>
-			<div class="sg-element" data-superglue-type="TextElement" style="left: 315px; top: 266px; width: 456px; height: 80px;">
-<span style="font-size: 14px; font-family: Montserrat;"><b></b></span><span style="font-size: 14px; font-family: Montserrat;"><b><span style="color: rgb(214, 44, 44); font-size: 14px;">NO STORAGE IS AVAILABLE !!</span></b></span><div><font color="#d62c2c" face="Montserrat"><span style="font-size: 14px;"><b><br></b></span></font><div><b style="font-family: Montserrat; color: rgb(214, 44, 44);"><span style="font-size: 14px;">PLEASE MAKE SURE YOUR USB DRIVE IS CONNECTED</span></b><br></div></div>
+			<div class="sg-element" data-superglue-type="TextElement" style="left: 398px; top: 76px; width: 551px; height: 66px;">
+				<p><span style="font-size: 34px; font-family: TitilliumWeb;">No USB storage!</span></p>
 			</div>
 		</div>
 	</body>
-</html>
+</html>

+ 1 - 1
openwrt/common/opt/lib/scripts/sg-data-dirs.sh

@@ -22,7 +22,7 @@ _HTDOCS="$_WWW/htdocs"
 
 ## check if index.html is present
 [ -e $_HTDOCS/index.html ] || (
-  cp /opt/lib/resources/demo.html $_HTDOCS/default.html
+  cp /opt/lib/resources/default.html $_HTDOCS/default.html
   chown httpd $_HTDOCS/default.html 
   )
 

+ 2 - 2
openwrt/tools/make_fw.sh

@@ -99,14 +99,14 @@ for _TARGET in $_TARGETS; do
   cp -Ra $_TARGET/* $_TARGET.tmp/
    sleep 1
 
-  if [ $_DEVTOOLS = false ]; then
+  if [[ $_DEVTOOLS = false ]]; then
     echo 'removing devTools..'
     rm -Rf $_TARGET.tmp/opt/lib/devTools
   fi
   
   if [[ -e $_EXT_SRC ]]; then
     echo 'copying browser extension..'
-    _EXT_DST="$_TARGET.tmp/opt/lib/extension/superglue.xpi"
+    _EXT_DST="$_TARGET.tmp/opt/lib/extension"
     [[ -e $(dirname $_EXT_DST) ]] || mkdir $(dirname $_EXT_DST)
     cp -Ra $_EXT_SRC $_EXT_DST
     sleep 1