1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2021-10-07 21:19:41 +08:00
parent bec432f3b8
commit c6a9235274
5 changed files with 35 additions and 15 deletions

View File

@ -63,7 +63,7 @@ Volcanos("user", {help: "用户操作", agent: {
"begin": "启动", "end": "结束", "begin": "启动", "end": "结束",
"list": "查看", "back": "返回", "list": "查看", "back": "返回",
"run": "执行", "refresh": "刷新", "run": "执行", "refresh": "刷新",
"share": "共享", "share": "共享", "clear": "清空",
}[text] || text }[text] || text
}, },
toast: function(can, content, title, duration, progress) { toast: function(can, content, title, duration, progress) {

View File

@ -237,7 +237,7 @@ fieldset>div.status>div.item {
height:18px; height:18px;
} }
fieldset>div.status>div.item>label { fieldset>div.status>div.item>label {
font-size:10px; color:#504242e0; font-size:10px; color:#bdb8b8e0;
} }
fieldset>div.output { fieldset>div.output {
@ -488,6 +488,10 @@ body.white table input[type=button][value=启动] {
background:#52ce78; background:#52ce78;
} }
body.white fieldset>div.status>div.item>label {
font-size:10px; color:#504242e0;
}
body.white fieldset.Action { body.white fieldset.Action {
color:black; color:black;
} }

View File

@ -82,6 +82,7 @@ Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js",
{name: "idc", help: "平台", index: "web.wiki.word", args: ["usr/linux-story/idc/idc.shy"]}, {name: "idc", help: "平台", index: "web.wiki.word", args: ["usr/linux-story/idc/idc.shy"]},
{name: "iso", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/iso.shy"]}, {name: "iso", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/iso/iso.shy"]},
{name: "iot", help: "设备", index: "web.wiki.word", args: ["usr/linux-story/iot/iot.shy"]}, {name: "iot", help: "设备", index: "web.wiki.word", args: ["usr/linux-story/iot/iot.shy"]},
{name: "cli", help: "命令", index: "web.wiki.word", args: ["usr/linux-story/cli/cli.shy"]},
{name: "linux", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/src/main.shy"]}, {name: "linux", help: "系统", index: "web.wiki.word", args: ["usr/linux-story/src/main.shy"]},
]}, ]},
nginx: {name: "代理 nginx", action: [ nginx: {name: "代理 nginx", action: [
@ -94,7 +95,7 @@ Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js",
{name: "redis", help: "缓存", index: "web.wiki.word", args: ["usr/redis-story/src/main.shy"]}, {name: "redis", help: "缓存", index: "web.wiki.word", args: ["usr/redis-story/src/main.shy"]},
{name: "kafka", help: "队列", index: "web.wiki.word", args: ["usr/redis-story/src/kafka/kafka.shy"]}, {name: "kafka", help: "队列", index: "web.wiki.word", args: ["usr/redis-story/src/kafka/kafka.shy"]},
]}, ]},
mysql: {name: "数据 mysql", action: [ mysql: {name: "存储 mysql", action: [
{name: "mysql", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/main.shy"]}, {name: "mysql", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/main.shy"]},
{name: "clickhouse", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/clickhouse/clickhouse.shy"]}, {name: "clickhouse", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/clickhouse/clickhouse.shy"]},
]}, ]},
@ -109,14 +110,14 @@ Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js",
]}, ]},
}}, }},
operate: {name: "运维群", storm: { operate: {name: "运维群", storm: {
cli: {name: "系统 cli", index: [ aaa: {name: "权限 aaa", index: [
"qrcode", "daemon", "system", "runtime", "user", "sess", "role", "totp",
]}, ]},
web: {name: "应用 web", index: [ web: {name: "应用 web", index: [
"spide", "route", "share", "dream", "spide", "route", "share", "dream",
]}, ]},
aaa: {name: "权限 aaa", index: [ cli: {name: "系统 cli", index: [
"user", "sess", "role", "totp", "qrcode", "daemon", "system", "runtime",
]}, ]},
nfs: {name: "文件 nfs", index: [ nfs: {name: "文件 nfs", index: [
"cat", "dir", "tail", "trash", "cat", "dir", "tail", "trash",

View File

@ -2,16 +2,25 @@ Volcanos("onfigure", {help: "控件详情", list: [], key: {onclick: function(ev
can.run(event, [ctx.ACTION, "inputs", meta.name, target.value], function(msg) { can.run(event, [ctx.ACTION, "inputs", meta.name, target.value], function(msg) {
if (msg.Length() == 0) { return can.page.Remove(can, can._target) } if (msg.Length() == 0) { return can.page.Remove(can, can._target) }
can.onappend._action(can, ["关闭", "清空"], can._action, { can.onappend._action(can, ["close", "clear"], can._action, {
"关闭": function(event) { can.page.Remove(can, can._target) }, "close": function(event) { can.page.Remove(can, can._target) },
"清空": function(event) { target.value = "" }, "clear": function(event) { target.value = "" },
}) })
function show(msg) {
can.onmotion.clear(can)
can.onappend.table(can, msg, function(value, key, index, line) { can.onappend.table(can, msg, function(value, key, index, line) {
return {text: [value, "td"], onclick: function() { return {text: [value, "td"], onclick: function() {
target.value = line[key], can.page.Remove(can, can._target) target.value = line[key]
msg.Option("_process") == "_again"? can.run({}, [ctx.ACTION, "inputs", meta.name, target.value], function(msg) {
show(msg)
}): can.page.Remove(can, can._target)
}} }}
}), can.Status("count", msg.Length()) }), can.Status("count", msg.Length())
}
show(msg)
can.onlayout.figure(event, can) can.onlayout.figure(event, can)
}) })
}}}) }}})

View File

@ -173,6 +173,12 @@ Volcanos("onaction", {help: "交互操作", list: [
}) })
}, },
next: function(event, can) {
can.Update(event, [ctx.ACTION, "next", can.Status("total")||0, can.Option("limit"), can.Option("offend")])
},
prev: function(event, can) {
can.Update(event, [ctx.ACTION, "prev", can.Status("total")||0, can.Option("limit"), can.Option("offend")])
},
change: function(event, can, name, value, cb) { change: function(event, can, name, value, cb) {
return can.page.Select(can, can._option, "input.args", function(input) { return can.page.Select(can, can._option, "input.args", function(input) {
if (input.name == name && value != input.value) { input.value = value if (input.name == name && value != input.value) { input.value = value