1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 17:24:06 +08:00
This commit is contained in:
shylinux 2021-01-08 11:06:25 +08:00
parent c6bbd72d36
commit 1039c3be65
5 changed files with 21 additions and 17 deletions

View File

@ -124,7 +124,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta,
"nginx": {name: "代理 nginx", action: [ "nginx": {name: "代理 nginx", action: [
{name: "nginx", help: "代理", index: "web.wiki.word", args: ["usr/nginx-story/src/main.shy"]}, {name: "nginx", help: "代理", index: "web.wiki.word", args: ["usr/nginx-story/src/main.shy"]},
]}, ]},
"golang": {name: "编程 golang", action: [ "context": {name: "编程 context", action: [
{name: "grafana", help: "可视化", index: "web.wiki.word", args: ["usr/golang-story/src/grafana/grafana.shy"]}, {name: "grafana", help: "可视化", index: "web.wiki.word", args: ["usr/golang-story/src/grafana/grafana.shy"]},
{name: "gogs", help: "代码库", index: "web.wiki.word", args: ["usr/golang-story/src/gogs/gogs.shy"]}, {name: "gogs", help: "代码库", index: "web.wiki.word", args: ["usr/golang-story/src/gogs/gogs.shy"]},
{name: "golang", help: "编程", index: "web.wiki.word", args: ["usr/golang-story/src/main.shy"]}, {name: "golang", help: "编程", index: "web.wiki.word", args: ["usr/golang-story/src/main.shy"]},
@ -144,17 +144,20 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta,
]}, ]},
}}, }},
"operate": {name: "运维群", storm: { "operate": {name: "运维群", storm: {
"web": {name: "web", index: [ "cli": {name: "系统 cli", index: [
"system", "daemon", "python", "output",
"runtime", "process",
]},
"web": {name: "网络 web", index: [
"route", "serve", "space", "dream", "route", "serve", "space", "dream",
"spide", "share", "cache", "story", "spide", "share", "cache", "story",
]}, ]},
"relay": {name: "relay", index: [ "ssh": {name: "脚本 ssh", index: [
"aaa.totp", "aaa.totp", "web.code.tmux.session",
"web.code.tmux.session", "connect", "session", "service", "channel",
]}, ]},
"os": {name: "os", action: [ "nfs": {name: "文件 nfs", index: [
{name: "文件系统", help: "fs", index: "nfs.dir", args: ["", "time,size,path,link"]}, "dir", "file",
{name: "操作系统", help: "os", index: "web.wiki.word", args: ["usr/learning/自然/编程/system.shy"]},
]}, ]},
}}, }},
}, },

View File

@ -19,6 +19,8 @@ fieldset.River>div.output div.list {
fieldset.River>div.output div.list div.item { fieldset.River>div.output div.list div.item {
border-left:solid 3px #ccdc4c; border-left:solid 3px #ccdc4c;
background-color:#073540b5; background-color:#073540b5;
font-family:monospace;
font-size:14px;
} }
fieldset.River>div.output div.list div.item:hover { fieldset.River>div.output div.list div.item:hover {
background-color:#2e515f; background-color:#2e515f;

View File

@ -61,8 +61,8 @@ Volcanos("onaction", {help: "控件交互", list: [], _init: function(can, msg,
case "text": case "text":
// msg.Push(key, can.user.MergeURL(can, {river: river, storm: storm})) // msg.Push(key, can.user.MergeURL(can, {river: river, storm: storm}))
// break // break
msg.Push(key, shy("跳转", function() { msg.Push(key, shy("跳转", function(event) {
can.onaction.action(msg._event, can, river, storm) can.onaction.action(event, can, river, storm)
})); break })); break
default: msg.Push(key, "") default: msg.Push(key, "")
} }

View File

@ -17,7 +17,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
can.Status("count", index+1) can.Status("count", index+1)
return {text: [key == "text" && typeof line.text == "function" && line.text.help || value, "td"], onclick: function(event) { return {text: [key == "text" && typeof line.text == "function" && line.text.help || value, "td"], onclick: function(event) {
if (typeof line.text == "function") { if (typeof line.text == "function") {
return can.onmotion.hide(can), line.text() return can.onmotion.hide(can), line.text(event)
} }
can.page.Append(can, can.ui.table, [{td: can.core.List(fields, function(item) { can.page.Append(can, can.ui.table, [{td: can.core.List(fields, function(item) {
@ -46,7 +46,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
can.ui.word.setSelectionRange(0, -1) can.ui.word.setSelectionRange(0, -1)
}, },
select: function(can, msg, cmds, cb) { select: function(can, msg, cmds, cb) { can.ui.word.value = cmds[1]
var fields = (cmds[2]||msg.Option("fields")||"pod,ctx,cmd,type,name,text").split(",") var fields = (cmds[2]||msg.Option("fields")||"pod,ctx,cmd,type,name,text").split(",")
can.page.Appends(can, can.ui.table, [{th: fields}]), can.cb = function() { can.page.Appends(can, can.ui.table, [{th: fields}]), can.cb = function() {
typeof cb == "function" && cb(can.onexport.select(can)), can.onmotion.hide(can) typeof cb == "function" && cb(can.onexport.select(can)), can.onmotion.hide(can)
@ -81,7 +81,7 @@ Volcanos("onaction", {help: "交互操作", list: ["关闭", "清空", "完成"]
}) })
Volcanos("onexport", {help: "导出数据", list: ["selected", "count"], Volcanos("onexport", {help: "导出数据", list: ["selected", "count"],
select: function(can) { select: function(can) {
can.page.Select(can, can.ui.display, "tr", function(tr) { return can.page.Select(can, can.ui.display, "tr", function(tr) {
return can.page.Select(can, tr, "td", function(td) { return td.innerHTML }) return can.page.Select(can, tr, "td", function(td) { return td.innerHTML })
}).slice(1) }).slice(1)
}, },

View File

@ -7,11 +7,10 @@ body fieldset p.story[data-name=inner]:hover {
cursor:copy; cursor:copy;
} }
body fieldset div.story[data-type=spark] { body fieldset div.story[data-type=spark] {
padding:4px; background-color:#2169a9; color:white;
background-color:#2169a9;
border-left:solid 4px blue;
box-shadow: 4px 4px 10px 1px #626bd0; box-shadow: 4px 4px 10px 1px #626bd0;
color:white; border-left:solid 4px blue;
padding:4px; margin:8px 0;
} }
body fieldset div.story[data-type=spark] span:hover { body fieldset div.story[data-type=spark] span:hover {
background-color:#c10c8a; background-color:#c10c8a;