mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
mix Merge branch 'master' of https://github.com/shylinux/context
This commit is contained in:
commit
969ca432b0
@ -40,6 +40,8 @@ install() {
|
||||
wget -O ${ctx_app} "$ctx_dev/publish/${ctx_app}?GOOS=$GOOS&GOARCH=$GOARCH" && chmod a+x ${ctx_app} \
|
||||
&& ./${ctx_app} upgrade ${target} && ${md5} ${ctx_app} \
|
||||
&& mv ${ctx_app} bin/${ctx_app}
|
||||
|
||||
mkdir -p usr/script && touch usr/script/local.shy && cd etc && ln -s ../usr/script/local.shy .
|
||||
}
|
||||
hup() {
|
||||
echo "term hup"
|
||||
|
@ -848,6 +848,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
switch arg[0] {
|
||||
case "restart":
|
||||
m.Cmd("cli.quit", "1")
|
||||
|
||||
case "project":
|
||||
m.Cmd("cli.project", "init")
|
||||
m.Cmd("cli.compile", "all")
|
||||
|
@ -4,5 +4,5 @@ var version = struct {
|
||||
host string
|
||||
self int
|
||||
}{
|
||||
"2019-07-16 10:26:05", "ZYB-20190522USI.ubuntu", 176,
|
||||
"2019-07-16 10:50:22", "ZYB-20190522USI.ubuntu", 177,
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
||||
"componet_type": "private", "componet_ctx": "ssh", "componet_cmd": "_route",
|
||||
"componet_args": []interface{}{"$$", "context", "cli", "upgrade"}, "inputs": []interface{}{
|
||||
map[string]interface{}{"type": "text", "name": "pod", "imports": "plugin_pod"},
|
||||
map[string]interface{}{"type": "select", "name": "action", "values": []interface{}{"script", "plugin", "portal", "system", "bench"}},
|
||||
map[string]interface{}{"type": "select", "name": "action", "values": []interface{}{"script", "restart", "plugin", "portal", "system", "bench"}},
|
||||
map[string]interface{}{"type": "text", "name": "who"},
|
||||
map[string]interface{}{"type": "button", "value": "升级"},
|
||||
},
|
||||
|
@ -360,12 +360,12 @@ var Index = &ctx.Context{Name: "chat", Help: "会议中心",
|
||||
}
|
||||
if len(arg) == 1 {
|
||||
m.Confm("flow", []string{arg[0], "user"}, func(key string, value map[string]interface{}) {
|
||||
m.Add("append", "key", key)
|
||||
m.Add("append", "user.route", value["user"])
|
||||
m.Add("append", "user", key)
|
||||
m.Add("append", "node", value["user"])
|
||||
})
|
||||
m.Confm("ssh.node", func(key string, value map[string]interface{}) {
|
||||
m.Add("append", "key", key)
|
||||
m.Add("append", "user.route", value["name"])
|
||||
m.Add("append", "user", "")
|
||||
m.Add("append", "node", value["name"])
|
||||
})
|
||||
m.Table()
|
||||
return
|
||||
|
@ -460,13 +460,13 @@ page = Page({
|
||||
},
|
||||
Show: function() {
|
||||
this.ShowDialog() && (table.innerHTML = "", ui.name.value = "nice", this.Run([river], function(msg) {
|
||||
kit.AppendTable(table, ctx.Table(msg), ["key", "user.route"], function(value, key, pod, i, tr, event) {
|
||||
kit.AppendTable(table, ctx.Table(msg), ["user", "node"], function(value, key, pod, i, tr, event) {
|
||||
var old = table.querySelector("tr.select")
|
||||
tr.className = "select", old && (old.className = "normal"), field.Pane.Run([river, pod.key, pod["user.route"]], function(msg) {
|
||||
tr.className = "select", old && (old.className = "normal"), field.Pane.Run([river, pod.user, pod.node], function(msg) {
|
||||
device.innerHTML = "", kit.AppendTable(device, ctx.Table(msg), ["key", "index", "name", "help"], function(value, key, com, i, tr, event) {
|
||||
var last = kit.AppendChild(ui.list, [{type: "tr", list: [
|
||||
{text: [com.key, "td"]}, {text: [com.index, "td"]}, {text: [com.name, "td"]}, {text: [com.help, "td"]},
|
||||
], dataset: {pod: pod["user.route"], group: com.key, index: com.index, name: com.name}, click: function(event) {
|
||||
], dataset: {pod: pod.node, group: com.key, index: com.index, name: com.name}, click: function(event) {
|
||||
last.parentNode.removeChild(last)
|
||||
}}]).last
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user