diff --git a/src/document/started/about/introduction.shy b/src/document/started/about/introduction.shy index 144d10be..6f57e4d7 100644 --- a/src/document/started/about/introduction.shy +++ b/src/document/started/about/introduction.shy @@ -1,55 +1,3 @@ title "Contexts" -chapter "实践" -label ` -code wiki chat team mall -linux nginx docker redis mysql -bash git golang vim tmux -` -chapter "理论" -label ` -集群化 模块化 自动化 -` - -chapter "项目" -label ` -intshell icebergs volcanos -contexts toolkits learning -go-git release matrix -` index web.code.git.spide - -section "火山架" -field "趋势图" web.code.git.trend args `volcanos` -field "架构图" web.code.git.spide args `volcanos` - -section "冰山架" -field "趋势图" web.code.git.trend args `icebergs` -field "架构图" web.code.git.spide args `icebergs` -label ` -ctx mdb web aaa -lex yac ssh gdb -tcp nfs cli log -` -chain ` -web - code - wiki - chat - team - mall -` -label ` -git ssh xterm qrcode websocket webview -tmux node java -alpha input lex yac -vim bash chrome coder -wx mp lark wework github -` compact true - -section "神农架" -field "趋势图" web.code.git.trend args `intshell` -field "架构图" web.code.git.spide args `intshell` - -spark README.md - -source h2/h2.shy +spark `contexts 是一个功能完备的工具系统。` diff --git a/src/document/started/index.shy b/src/document/started/index.shy index 32eb51ba..7fc0ca48 100644 --- a/src/document/started/index.shy +++ b/src/document/started/index.shy @@ -2,11 +2,24 @@ navmenu ` "About" about/ Introduction introduction.shy License license.shy -"Getting started" started/ - Install install.shy -"User interfaces" interfaces/ - CLI cli.shy - WEB web.shy -"Using Contexts" using/ -"Managing Contexts" managing/ +"下载安装" install/ + "快速下载" quick.shy + "手动下载" manual.shy + "源码编译" source.shy + "创建项目" project.shy +"使用方式" interfaces/ + "命令式" cli.shy + "网页式" web.shy +"基础功能" using/ + "创建空间" space.shy +"应用管理" managing/ + "启动配置" config.shy +"功能开发" development/ + "创建项目" config.shy + "创建模块" config.shy +"架构原理" development/ + "启动流程" config.shy + "事件消息" config.shy + "模块注册" config.shy + "远程调用" config.shy ` diff --git a/src/document/started/install/manual.shy b/src/document/started/install/manual.shy new file mode 100644 index 00000000..01862f1c --- /dev/null +++ b/src/document/started/install/manual.shy @@ -0,0 +1,9 @@ +title "手动下载" +spark `如果有其它需要,如下载不同系统或不同架构的 bin 文件,可手动下载。如下,使用 wget 或 curl 命令,下载所需 bin 文件。 +其中 linux 替换成所需系统名如 darwin、windows 等,amd64 替换成所需的架构名如 x86、arm 等` +web.code.publish binary +spark `添加执行权限,并重命名文件` +shell ` +chmod u+x ice.linux.amd64 +mdkir bin; mv ice.linux.amd64 bin/ice.bin +` diff --git a/src/document/started/install/project.shy b/src/document/started/install/project.shy new file mode 100644 index 00000000..096c3311 --- /dev/null +++ b/src/document/started/install/project.shy @@ -0,0 +1,13 @@ +title "创建项目" + +spark `当 contexts 自带的工具,无法满足使用需求时,可以基于 contexts 快速创建出新的项目。 +从网上搜索基于 contexts 开发的模块,通过 import 直接引入即可。或是直接自己开发新的工具模块。 + +` +section "创建项目" +field "" web.code.inner style output + +section "创建模块" +field "" web.code.inner args `usr/icebergs/ misc/node/node.go` style output + + diff --git a/src/document/started/install/quick.shy b/src/document/started/install/quick.shy new file mode 100644 index 00000000..e2099965 --- /dev/null +++ b/src/document/started/install/quick.shy @@ -0,0 +1,8 @@ +title "快速下载" +spark `contexts 使用 golang 开发,所以编译后只有一个 bin 文件。直接下载即可使用` +spark `为了方便下载,可以直接使用如下命令。自动识别出操作系统与处理器类型,下载对应的 bin 文件,并自动启动服务。` +spark `点击即可下面命令,即可直接复制` +web.code.publish contexts +spark warning `contexts 有组建集群的功能,为了快速组建集群,这条命令也带了连接远程服务器的功能。` +spark warning `如果远程服务器是自己搭建的,或是可信的服务,可直接执行。` +spark warning `或通过配置文件,设置远程服务的权限。或直接在上面命令后面加上参数 'dev ""' 直接禁用远程服务。` diff --git a/src/document/started/install/source.shy b/src/document/started/install/source.shy new file mode 100644 index 00000000..9cb721f5 --- /dev/null +++ b/src/document/started/install/source.shy @@ -0,0 +1,13 @@ +title "源码编译" +spark ` +如果想了解 contexts 的源码与原理,可以直接下载源码,自己编译后再启动。 +` +spark ` +需要安装好 make git golang +` + +web.code.publish source + +shell ` +make +` diff --git a/src/document/started/interfaces/cli.shy b/src/document/started/interfaces/cli.shy index 6c5eb595..898ab074 100644 --- a/src/document/started/interfaces/cli.shy +++ b/src/document/started/interfaces/cli.shy @@ -1,3 +1,17 @@ -spark ` -cli -` +title "命令交互" +spark `contexts 提供了命令接口,所有的功能模块,都可以通过命令行来使用。` + +spark `tcp.host 查看网卡信息` +shell ` +./bin/ice.bin tcp.host +` with echo + +spark `cli.system 执行本机命令` +shell ` +./bin/ice.bin cli.system pwd +` with echo + +spark `nfs.dir 查看目录列表` +shell ` +./bin/ice.bin nfs.dir +` with echo diff --git a/src/document/started/interfaces/web.shy b/src/document/started/interfaces/web.shy index 60d3b847..befc0d3a 100644 --- a/src/document/started/interfaces/web.shy +++ b/src/document/started/interfaces/web.shy @@ -1,3 +1,33 @@ -spark ` -web -` +title "网页交互" +spark `contexts 提供了网页接口,所有的功能模块,都可以通过网页来使用。` + +chapter "启动服务" +section "直接启动" +spark `serve 命令直接启动服务。` +shell `./bin/ice.bin serve start` +spark `默认的服务端口是 9020,打开 http://localhost:9020 即可通过网页使用所有的功能。` + +section "守护启动" +spark `如果需要进程常驻,可以使用 forever 守护命令。在开发过程中非常有用,每次执行 make 命令进行编译与构建时,都会发送信号自动重启服务进程。` +spark `forever 启动守护进程后,会自动启动服务进程,当服务进程意外停止后,会重新拉起服务。` +shell `./bin/ice.bin forever start` + +section "容器启动" +spark `容器启动命令与前相同,但访问时需要登录认证。` +spark `contexts 默认会开启 IP 认证授权,只有通过本机访问的请求,才会免登录。` +spark `但通过容器启动或远程服务器启动的 contexts,访问时都需要登录认证。` + +chapter "使用方式" +section "导航式" +spark `contexts 启动后,可直接访问 http://localhost:9020/chat/portal/,打开后台管理系统。` +spark `后台管理系统导航栏的内容,都是在 src/main.js 文件中定义的。如需自定义,直接修改即可。` +spark `contexts 也提供了界面添加功能,点击创建后,依次添加群组、添加应用、添加工具,即可动态自动定义导航栏。` +iframe "http://localhost:9020" + +section "搜索式" +spark `默认后台管理系统,会提供一个搜索框,搜索到命令后会在结果栏中自动创建工具界面,即可立即使用此工具。` +iframe "http://localhost:9020?_search=tcp.host" + +section "命令式" +spark `所有的工具,都可以通过 URL 直接访问使用,如工具 web.team.plan 的 URL 是 http://localhost:9020/chat/cmd/web.team.plan,界面如下所示` +iframe "http://localhost:9020/chat/cmd/web.team.plan" diff --git a/src/document/started/managing/config.shy b/src/document/started/managing/config.shy new file mode 100644 index 00000000..8bb21662 --- /dev/null +++ b/src/document/started/managing/config.shy @@ -0,0 +1 @@ +title "config" diff --git a/src/document/started/started/install.shy b/src/document/started/started/install.shy index acc487b8..e69de29b 100644 --- a/src/document/started/started/install.shy +++ b/src/document/started/started/install.shy @@ -1 +0,0 @@ -web.code.publish contexts diff --git a/src/document/started/using/space.shy b/src/document/started/using/space.shy new file mode 100644 index 00000000..0b2dda03 --- /dev/null +++ b/src/document/started/using/space.shy @@ -0,0 +1 @@ +title "space" diff --git a/src/main.js b/src/main.js index f7d3a383..83c1ef94 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,6 @@ Volcanos({river: { product: {name: "产品群", icon: "bi bi-bar-chart-line-fill", storm: { - office: {name: "办公 office", icon: "bi bi-bar-chart-line-fill", index: ["web.chat.macos.desktop", "web.wiki.feel", "web.wiki.draw", "web.wiki.data"]}, + office: {name: "办公 office", icon: "bi bi-bar-chart-line-fill", index: ["web.wiki.portal", "web.chat.macos.desktop", "web.wiki.feel", "web.wiki.draw", "web.wiki.data"]}, }}, project: {name: "研发群", icon: "bi bi-git", storm: { studio: {name: "研发 studio", icon: "bi bi-git", index: ["web.code.vimer", "web.code.git.status", "web.chat.favor", "web.team.plan", "web.wiki.word"]}, diff --git a/src/template/web.code.publish/binary.sh b/src/template/web.code.publish/binary.sh new file mode 100644 index 00000000..93a414c4 --- /dev/null +++ b/src/template/web.code.publish/binary.sh @@ -0,0 +1,2 @@ +wget -q {{.Option "domain"}}/publish/{{.Option "binary"}} +curl -fsSL -O {{.Option "domain"}}/publish/{{.Option "binary"}} diff --git a/src/template/web.code.publish/source.sh b/src/template/web.code.publish/source.sh new file mode 100644 index 00000000..f82a4992 --- /dev/null +++ b/src/template/web.code.publish/source.sh @@ -0,0 +1 @@ +git clone {{.Option "source"}} diff --git a/src/template/web.wiki.iframe/iframe.html b/src/template/web.wiki.iframe/iframe.html new file mode 100644 index 00000000..a1784ac2 --- /dev/null +++ b/src/template/web.wiki.iframe/iframe.html @@ -0,0 +1,2 @@ + + diff --git a/src/template/web.wiki.spark/shell.html b/src/template/web.wiki.spark/shell.html index 0913164a..28edb278 100644 --- a/src/template/web.wiki.spark/shell.html +++ b/src/template/web.wiki.spark/shell.html @@ -1 +1 @@ -
{{range $index, $value := .Optionv "list"}}{{$value}}
{{end}}
+
{{range $index, $value := .Optionv "list"}}{{$value}}
{{end}}{{.Option "echo"}}
diff --git a/src/template/web.wiki.spark/warning.html b/src/template/web.wiki.spark/warning.html new file mode 100644 index 00000000..ba2d1503 --- /dev/null +++ b/src/template/web.wiki.spark/warning.html @@ -0,0 +1,2 @@ +

{{.Option "text"}}

+