mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-04-20 02:26:45 +02:00
add new domain name
This commit is contained in:
parent
83cc66fced
commit
cceb8b2c49
@ -5,7 +5,6 @@ coffees = assets/coffee/bootstrap.coffee \
|
|||||||
assets/coffee/BaseObject.coffee \
|
assets/coffee/BaseObject.coffee \
|
||||||
assets/coffee/APIManager.coffee \
|
assets/coffee/APIManager.coffee \
|
||||||
assets/coffee/MarkOn.coffee \
|
assets/coffee/MarkOn.coffee \
|
||||||
assets/coffee/WVNC.coffee \
|
|
||||||
assets/coffee/WebVNC.coffee
|
assets/coffee/WebVNC.coffee
|
||||||
|
|
||||||
SED=sed
|
SED=sed
|
||||||
@ -17,7 +16,7 @@ endif
|
|||||||
main: js
|
main: js
|
||||||
- mkdir -p $(BUILDDIR)/assets
|
- mkdir -p $(BUILDDIR)/assets
|
||||||
cp -rf $(copyfiles) $(BUILDDIR)
|
cp -rf $(copyfiles) $(BUILDDIR)
|
||||||
cp -r assets/css assets/scripts assets/shs $(BUILDDIR)/assets
|
cp -r assets/css assets/scripts $(BUILDDIR)/assets
|
||||||
- cd $(BUILDDIR) && ln -s ../grs ./rst
|
- cd $(BUILDDIR) && ln -s ../grs ./rst
|
||||||
|
|
||||||
js:
|
js:
|
||||||
|
@ -14,6 +14,7 @@ class WebVNC extends window.classes.BaseObject
|
|||||||
args =
|
args =
|
||||||
{
|
{
|
||||||
element: 'canvas',
|
element: 'canvas',
|
||||||
|
#ws: 'wss://localhost:9192/wvnc',
|
||||||
ws: 'wss://lxsang.me/wvnc',
|
ws: 'wss://lxsang.me/wvnc',
|
||||||
worker: '/assets/scripts/decoder.js'
|
worker: '/assets/scripts/decoder.js'
|
||||||
}
|
}
|
||||||
@ -34,9 +35,9 @@ class WebVNC extends window.classes.BaseObject
|
|||||||
me.client.connect "/opt/www/vnc.conf", {
|
me.client.connect "/opt/www/vnc.conf", {
|
||||||
bbp: 32,
|
bbp: 32,
|
||||||
flag: 3,
|
flag: 3,
|
||||||
quality: 40
|
quality: 30
|
||||||
}
|
}
|
||||||
$("#tbstatus").html "32bbp, compress JPEG & ZLib, JPEG quality 10%"
|
$("#tbstatus").html "32bbp, compression JPEG & ZLib, JPEG quality 30%"
|
||||||
$("#stop").click (e) ->
|
$("#stop").click (e) ->
|
||||||
me.client.disconnect()
|
me.client.disconnect()
|
||||||
$("#selscale").on 'change', (e) ->
|
$("#selscale").on 'change', (e) ->
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Generated by CoffeeScript 1.12.7
|
// Generated by CoffeeScript 1.9.3
|
||||||
(function() {
|
(function() {
|
||||||
var APIManager, BaseObject, MarkOn, WebVNC, require,
|
var APIManager, BaseObject, MarkOn, WebVNC, require,
|
||||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
@ -181,7 +181,7 @@
|
|||||||
var args, me;
|
var args, me;
|
||||||
args = {
|
args = {
|
||||||
element: 'canvas',
|
element: 'canvas',
|
||||||
ws: 'wss://localhost:9192/wvnc',
|
ws: 'wss://lxsang.me/wvnc',
|
||||||
worker: '/assets/scripts/decoder.js'
|
worker: '/assets/scripts/decoder.js'
|
||||||
};
|
};
|
||||||
this.client = new WVNC(args);
|
this.client = new WVNC(args);
|
||||||
@ -197,17 +197,17 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
this.client.oncopy = function(text) {
|
this.client.oncopy = function(text) {
|
||||||
return ($("#clipboard"))[0].value = text;
|
return cosole.log(text);
|
||||||
};
|
};
|
||||||
return this.client.init().then(function() {
|
return this.client.init().then(function() {
|
||||||
$("#connect").click(function(e) {
|
$("#connect").click(function(e) {
|
||||||
return me.client.connect("/Users/mrsang/Documents/build/www/vnc.conf", {
|
return me.client.connect("/opt/www/vnc.conf", {
|
||||||
bbp: 32,
|
bbp: 32,
|
||||||
flag: 3,
|
flag: 3,
|
||||||
quality: 10
|
quality: 30
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("#tbstatus").html("32bbp, compress JPEG & ZLib, JPEG quality 10%");
|
$("#tbstatus").html("32bbp, compression JPEG & ZLib, JPEG quality 30%");
|
||||||
$("#stop").click(function(e) {
|
$("#stop").click(function(e) {
|
||||||
return me.client.disconnect();
|
return me.client.disconnect();
|
||||||
});
|
});
|
||||||
|
10
get/Makefile
Normal file
10
get/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
BUILDDIR = ../build/get
|
||||||
|
|
||||||
|
copyfiles = router.lua shs
|
||||||
|
main:
|
||||||
|
- mkdir -p $(BUILDDIR)
|
||||||
|
cp -rf $(copyfiles) $(BUILDDIR)
|
||||||
|
- cd $(BUILDDIR) && ln -s ../grs ./rst
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(BUILDDIR)/*
|
55
get/router.lua
Normal file
55
get/router.lua
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
-- the rewrite rule for the framework
|
||||||
|
-- should be something like this
|
||||||
|
-- ^\/apps\/+(.*)$ = /apps/router.lua?r=<1>&<query>
|
||||||
|
-- some global variables
|
||||||
|
DIR_SEP = "/"
|
||||||
|
WWW_ROOT = "/opt/www/htdocs/get"
|
||||||
|
HTTP_ROOT = "https://get.makeand.run"
|
||||||
|
-- class path: path.to.class
|
||||||
|
BASE_FRW = ""
|
||||||
|
-- class path: path.to.class
|
||||||
|
CONTROLLER_ROOT = BASE_FRW.."apps.controllers"
|
||||||
|
MODEL_ROOT = BASE_FRW.."apps.models"
|
||||||
|
-- file path: path/to/file
|
||||||
|
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
|
||||||
|
LOG_ROOT = WWW_ROOT..DIR_SEP.."logs"
|
||||||
|
|
||||||
|
-- require needed library
|
||||||
|
require(BASE_FRW.."silk.api")
|
||||||
|
|
||||||
|
function NotfoundController:index(...)
|
||||||
|
local args = {...}
|
||||||
|
local name = args[1] or nil
|
||||||
|
if not name then
|
||||||
|
return self:error("Unknown script")
|
||||||
|
end
|
||||||
|
name = name:gsub("Controller",""):lower()
|
||||||
|
local path = WWW_ROOT..DIR_SEP.."shs"..DIR_SEP..name..".sh"
|
||||||
|
|
||||||
|
if ulib.exists(path) then
|
||||||
|
std.header("text/plain")
|
||||||
|
std.f(path)
|
||||||
|
else
|
||||||
|
self:error("No script found: "..path)
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- registry object store global variables
|
||||||
|
local REGISTRY = {}
|
||||||
|
-- set logging level
|
||||||
|
REGISTRY.logger = Logger:new{ levels = {INFO = false, ERROR = false, DEBUG = false}}
|
||||||
|
|
||||||
|
REGISTRY.layout = 'default'
|
||||||
|
REGISTRY.fileaccess = false
|
||||||
|
|
||||||
|
local router = Router:new{registry = REGISTRY}
|
||||||
|
REGISTRY.router = router
|
||||||
|
router:setPath(CONTROLLER_ROOT)
|
||||||
|
--router:route('edit', 'post/edit', "ALL" )
|
||||||
|
|
||||||
|
router:route('default', default_routes_dependencies )
|
||||||
|
router:delegate()
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
-- some global variables
|
-- some global variables
|
||||||
DIR_SEP = "/"
|
DIR_SEP = "/"
|
||||||
WWW_ROOT = "/opt/www/htdocs/os"
|
WWW_ROOT = "/opt/www/htdocs/os"
|
||||||
HTTP_ROOT = "https://wos.localhost:9195"
|
HTTP_ROOT = "https://wos.localhost:9192"
|
||||||
-- class path: path.to.class
|
-- class path: path.to.class
|
||||||
BASE_FRW = ""
|
BASE_FRW = ""
|
||||||
-- class path: path.to.class
|
-- class path: path.to.class
|
||||||
|
Loading…
x
Reference in New Issue
Block a user