1
0
forked from x/ContextOS

tce add some

This commit is contained in:
shaoying 2018-10-14 22:45:54 +08:00
parent 4d5f45a1a7
commit 933ca60296
3 changed files with 36 additions and 51 deletions

View File

@ -48,9 +48,12 @@ Plug 'vim-syntastic/syntastic'
let g:syntastic_quiet_messages = { "regex": [ let g:syntastic_quiet_messages = { "regex": [
\ "Missing module docstring", \ "Missing module docstring",
\ "Missing class docstring", \ "Missing class docstring",
\ "Missing method docstring",
\ "Missing function docstring", \ "Missing function docstring",
\ "Wrong continued indentation", \ "Wrong continued indentation",
\ "Line Too Long", \ "Line Too Long",
\ "Invalid variable name",
\ "Too many instance attributes",
\ "defined outside __init__", \ "defined outside __init__",
\ ] } \ ] }

View File

@ -393,19 +393,6 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
"template": "userinfo", "title": "userinfo", "template": "userinfo", "title": "userinfo",
}, },
//聊天服务
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "aaa", "detail": []interface{}{"lark"},
"template": "detail", "title": "list_lark",
// "option": map[string]interface{}{"auto_refresh": true},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "aaa", "detail": []interface{}{"lark"},
"template": "detail", "title": "send_lark",
"option": map[string]interface{}{"ninput": 2},
},
//文件服务 //文件服务
map[string]interface{}{ map[string]interface{}{
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
@ -421,43 +408,13 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
"template": "create", "title": "create", "template": "create", "title": "create",
}, },
//格式转换 //会话服务
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "cli", "detail": []interface{}{"time"},
"template": "detail", "title": "time",
"option": map[string]interface{}{"refresh": true, "ninput": 1},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "nfs", "detail": []interface{}{"pwd"},
"template": "detail", "title": "pwd",
"option": map[string]interface{}{"refresh": true},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "nfs", "detail": []interface{}{"json"},
"template": "detail", "title": "json",
"option": map[string]interface{}{"ninput": 1},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "cli", "detail": []interface{}{"system", "tmux", "show-buffer"},
"template": "detail", "title": "buffer",
"option": map[string]interface{}{"ninput": 1},
},
map[string]interface{}{ map[string]interface{}{
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
"module": "cli", "command": "system", "module": "cli", "command": "system",
"argument": []interface{}{"tmux", "show-buffer"}, "argument": []interface{}{"tmux", "show-buffer"},
"template": "result", "title": "buffer", "template": "result", "title": "buffer",
}, },
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "web", "command": "/share",
"argument": []interface{}{},
"template": "share", "title": "share",
},
map[string]interface{}{ map[string]interface{}{
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
"module": "cli", "command": "system", "module": "cli", "command": "system",
@ -470,12 +427,37 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
"argument": []interface{}{"tmux", "list-sessions"}, "argument": []interface{}{"tmux", "list-sessions"},
"template": "result", "title": "session", "template": "result", "title": "session",
}, },
//格式转换
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "cli", "detail": []interface{}{"time"},
"template": "detail", "title": "time",
"option": map[string]interface{}{"refresh": true, "ninput": 1},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "nfs", "detail": []interface{}{"json"},
"template": "detail", "title": "json",
"option": map[string]interface{}{"ninput": 1},
},
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "nfs", "detail": []interface{}{"pwd"},
"template": "detail", "title": "pwd",
"option": map[string]interface{}{"refresh": true},
},
map[string]interface{}{ map[string]interface{}{
"from": "root", "to": []interface{}{}, "from": "root", "to": []interface{}{},
"module": "nfs", "command": "git", "module": "nfs", "command": "git",
"argument": []interface{}{}, "argument": []interface{}{},
"template": "result", "title": "git", "template": "result", "title": "git",
}, },
map[string]interface{}{
"from": "root", "to": []interface{}{},
"module": "web", "command": "/share",
"argument": []interface{}{},
"template": "share", "title": "share",
},
}, },
"notice": []interface{}{ "notice": []interface{}{
map[string]interface{}{ map[string]interface{}{
@ -1207,7 +1189,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
if m.Options("sessid") { if m.Options("sessid") {
if aaa := m.Sess("aaa").Cmd("login", m.Option("sessid")); aaa.Results(0) { if aaa := m.Sess("aaa").Cmd("login", m.Option("sessid")); aaa.Results(0) {
m.Append("redirect", m.Option("referer")) m.Append("redirect", m.Option("referer"))
m.Append("username", aaa.Cap("username")) m.Append("username", aaa.Result(0))
return return
} }
} }

View File

@ -1,21 +1,21 @@
package main package main
import ( import (
"os"
"contexts" "contexts"
_ "contexts/aaa" _ "contexts/aaa"
_ "contexts/cli" _ "contexts/cli"
_ "contexts/ssh"
_ "contexts/mdb"
_ "contexts/nfs"
_ "contexts/tcp"
_ "contexts/web" _ "contexts/web"
_ "contexts/lex" _ "contexts/lex"
_ "contexts/log" _ "contexts/log"
_ "contexts/yac" _ "contexts/yac"
"os" _ "contexts/mdb"
_ "contexts/nfs"
_ "contexts/ssh"
_ "contexts/tcp"
) )
func main() { func main() {