1
0
forked from x/ContextOS
This commit is contained in:
shylinux 2019-09-08 09:53:55 +08:00
parent 412631a028
commit 02eb04b0e3
5 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
BENCH=src/extend/bench.go BENCH=src/extend/bench.go
upgrade=usr/upgrade/ publish=usr/publish/
install: install:
@go get github.com/nsf/termbox-go @go get github.com/nsf/termbox-go
@ -51,17 +51,17 @@ tar_all: tar linux64 darwin win64
tar zcvf tar.tgz tar tar zcvf tar.tgz tar
linux_arm: linux_arm:
GOARCH=arm GOOS=linux go build -o $(upgrade)bench.linux.arm $(BENCH) GOARCH=arm GOOS=linux go build -o $(publish)bench.linux.arm $(BENCH)
linux32: linux32:
GOARCH=386 GOOS=linux go build -o $(upgrade)bench.linux.386 $(BENCH) GOARCH=386 GOOS=linux go build -o $(publish)bench.linux.386 $(BENCH)
linux64: linux64:
GOARCH=amd64 GOOS=linux go build -o $(upgrade)bench.linux.amd64 $(BENCH) GOARCH=amd64 GOOS=linux go build -o $(publish)bench.linux.amd64 $(BENCH)
darwin: darwin:
GOARCH=amd64 GOOS=darwin go build -o $(upgrade)bench.darwin.amd64 $(BENCH) GOARCH=amd64 GOOS=darwin go build -o $(publish)bench.darwin.amd64 $(BENCH)
win32: win32:
GOARCH=386 GOOS=windows go build -o $(upgrade)bench.win32.exe $(BENCH) GOARCH=386 GOOS=windows go build -o $(publish)bench.win32.exe $(BENCH)
win64: win64:
GOARCH=amd64 GOOS=windows go build -o $(upgrade)bench.win64.exe $(BENCH) GOARCH=amd64 GOOS=windows go build -o $(publish)bench.win64.exe $(BENCH)
DOTS=etc/dotsfile DOTS=etc/dotsfile

View File

@ -4,5 +4,5 @@ var version = struct {
host string host string
self int self int
}{ }{
"2019-09-02 20:11:08", "centos", 489, "2019-09-08 08:42:19", "com", 490,
} }

View File

@ -29,7 +29,8 @@ kit missyou "任务" private \
kit pod "设备" private "ssh._route" _ "ssh.remote" __ \ kit pod "设备" private "ssh._route" _ "ssh.remote" __ \
text "" name pod view long \ text "" name pod view long \
button "行动" action auto \ button "行动" action auto \
exports pod pod button "返回" click Back \
exports pod pod pod
kit ctx "模块" private "ssh._route" _ context _ list __ \ kit ctx "模块" private "ssh._route" _ context _ list __ \
text "" name pod imports plugin_pod action auto view long \ text "" name pod imports plugin_pod action auto view long \

View File

@ -14,7 +14,8 @@ kit macro "脚本宏" "macro.js" public \
button "运行" click "Replay" \ button "运行" click "Replay" \
exports mac name exports mac name
kit sys "命令行" public "nfs.source" \ kit sys "命令行" public "ssh._route" _ "nfs.source" \
text "" name pod imports plugin_pod \
textarea "" view long \ textarea "" view long \
button "运行" \ button "运行" \
exports mac name exports mac name

View File

@ -696,8 +696,8 @@ function Plugin(page, pane, field, runs) {
var meta = field.Meta var meta = field.Meta
var name = meta.name var name = meta.name
var args = meta.args || [] var args = meta.args || []
var display = JSON.parse(meta.display||'{}')
var feature = JSON.parse(meta.feature||'{}') var feature = JSON.parse(meta.feature||'{}')
var display = JSON.parse(meta.display||'{}')
var exports = JSON.parse(meta.exports||'["",""]') var exports = JSON.parse(meta.exports||'["",""]')
var deal = (feature && feature.display) || "table" var deal = (feature && feature.display) || "table"
var history = [] var history = []
@ -711,7 +711,7 @@ function Plugin(page, pane, field, runs) {
}: cb) }: cb)
}) })
var count = kit.Selector(option, "args").length var count = kit.Selector(option, ".args").length
args && count < args.length && (item.value = value||args[count++]||item.value||""); args && count < args.length && (item.value = value||args[count++]||item.value||"");
(item.title || item.name) && (item.title = item.title || item.name) (item.title || item.name) && (item.title = item.title || item.name)
@ -725,6 +725,7 @@ function Plugin(page, pane, field, runs) {
input.type = "select", input.list = item.values.map(function(value) { input.type = "select", input.list = item.values.map(function(value) {
return {type: "option", value: value, inner: value} return {type: "option", value: value, inner: value}
}) })
input.value = item.value
break break
case "textarea": case "textarea":
input.type = "textarea", item.style = "height:100px;"+"width:"+(pane.target.clientWidth-30)+"px" input.type = "textarea", item.style = "height:100px;"+"width:"+(pane.target.clientWidth-30)+"px"
@ -897,10 +898,7 @@ function Plugin(page, pane, field, runs) {
return name == "status" || line.status == "stop" ? undefined: line.you return name == "status" || line.status == "stop" ? undefined: line.you
}, },
pod: function(value, name, line) { pod: function(value, name, line) {
if (option[exports[0]].value) { return (option[exports[0]].value? option[exports[0]].value+".": "")+line.pod
return option[exports[0]].value+"."+line.pod
}
return line.pod
}, },
dir: function(value, name, line) { dir: function(value, name, line) {
name != "path" && (value = line.path) name != "path" && (value = line.path)
@ -1006,7 +1004,7 @@ function Plugin(page, pane, field, runs) {
}) })
JSON.parse(meta.inputs || "[]").map(function(item) { JSON.parse(meta.inputs || "[]").map(function(item) {
plugin.Append(item, item.name, item.value) plugin.Append(item, item.name)
}) })
return page[field.id] = pane[field.id] = pane[name] = field, field.Plugin = plugin return page[field.id] = pane[field.id] = pane[name] = field, field.Plugin = plugin
} }