forked from x/icebergs
add some
This commit is contained in:
parent
0fa3965d6e
commit
ec3a976337
@ -20,13 +20,14 @@ fieldset.web.matrix>div.output>table.content div.item div.title:hover { backgrou
|
|||||||
fieldset.web.matrix>div.output>table.content div.item div.title span:hover { background-color:var(--hover-bg-color); }
|
fieldset.web.matrix>div.output>table.content div.item div.title span:hover { background-color:var(--hover-bg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item div.status div.item:hover { background-color:var(--hover-bg-color); }
|
fieldset.web.matrix>div.output>table.content div.item div.status div.item:hover { background-color:var(--hover-bg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item:hover { background-color:unset; color:unset; }
|
fieldset.web.matrix>div.output>table.content div.item:hover { background-color:unset; color:unset; }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.notice { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.notice { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.danger { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.server { border:var(--notice-bg-color) solid 3px; }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.server { border:var(--notice-bg-color) solid 3px; }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.master { border:var(--danger-bg-color) solid 3px; }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.master { border:var(--danger-bg-color) solid 3px; }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.danger div.status div.item { color:var(--danger-fg-color); }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.danger div.status div.item { color:var(--danger-fg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.notice div.status div.item { color:var(--notice-fg-color); }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.notice div.status div.item { color:var(--notice-fg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content div.item.stop div.title>span { color:var(--disable-fg-color); }
|
fieldset.web.matrix>div.output:not(.process)>table.content div.item.stop div.title>span { color:var(--disable-fg-color); }
|
||||||
|
fieldset.web.matrix>div.output.process>table.content div.item.process { background-color:blue; color:var(--notice-fg-color); }
|
||||||
fieldset.web.matrix>div.output>table.content tr:not(:hover) div.action { visibility:hidden; }
|
fieldset.web.matrix>div.output>table.content tr:not(:hover) div.action { visibility:hidden; }
|
||||||
body:not(.mobile) fieldset.web.matrix>div.output>table.content th:first-child { position:sticky; left:2px; z-index:2; }
|
body:not(.mobile) fieldset.web.matrix>div.output>table.content th:first-child { position:sticky; left:2px; z-index:2; }
|
||||||
body:not(.mobile) fieldset.web.matrix>div.output>table.content td:first-child { background-color:var(--plugin-bg-color); position:sticky; left:2px; z-index:1; }
|
body:not(.mobile) fieldset.web.matrix>div.output>table.content td:first-child { background-color:var(--plugin-bg-color); position:sticky; left:2px; z-index:1; }
|
||||||
|
@ -150,7 +150,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
})
|
})
|
||||||
m.Action(html.FILTER, mdb.CREATE).StatusTimeCountStats(mdb.TYPE, mdb.STATUS).Display("")
|
m.Action(html.FILTER, mdb.CREATE, UPGRADE).StatusTimeCountStats(mdb.TYPE, mdb.STATUS).Display("")
|
||||||
m.Sort("type,status,name,domain", []string{MYSELF, SERVER, MASTER, WORKER, ""}, []string{cli.START, cli.STOP, ""}, ice.STR_R, ice.STR_R)
|
m.Sort("type,status,name,domain", []string{MYSELF, SERVER, MASTER, WORKER, ""}, []string{cli.START, cli.STOP, ""}, ice.STR_R, ice.STR_R)
|
||||||
ctx.Toolkit(m)
|
ctx.Toolkit(m)
|
||||||
return nil
|
return nil
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_init: function(can, msg) { var list = {}, domain = [""]
|
_init: function(can, msg) { var list = {}, domain = [""], server = []
|
||||||
msg.Table(function(value) { var name = value.name, _domain = value.domain
|
msg.Table(function(value) { var name = value.name, _domain = value.domain
|
||||||
list[name] = list[name]||{}, list[name][_domain] = value, domain.indexOf(_domain) == -1 && domain.push(_domain)
|
list[name] = list[name]||{}, list[name][_domain] = value, domain.indexOf(_domain) == -1 && domain.push(_domain)
|
||||||
|
value.type == web.SERVER && server.push(value.domain)
|
||||||
})
|
})
|
||||||
can.ui = can.page.Appends(can, can._output, [{view: [wiki.CONTENT, html.TABLE], list: [
|
can.ui = can.page.Appends(can, can._output, [{view: [wiki.CONTENT, html.TABLE], list: [
|
||||||
{type: html.THEAD, list: [{type: html.TR, list: can.core.List(domain, function(domain) {
|
{type: html.THEAD, list: [{type: html.TR, list: can.core.List(domain, function(domain) {
|
||||||
@ -14,6 +15,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
})},
|
})},
|
||||||
] }]), can.onmotion.delay(can, function() { can.Status(mdb.COUNT, can.core.Item(list).length+"x"+can.core.List(domain).length) })
|
] }]), can.onmotion.delay(can, function() { can.Status(mdb.COUNT, can.core.Item(list).length+"x"+can.core.List(domain).length) })
|
||||||
can.onmotion.orderShow(can, can.page.SelectOne(can, can._output, "table>tbody"), "tr")
|
can.onmotion.orderShow(can, can.page.SelectOne(can, can._output, "table>tbody"), "tr")
|
||||||
|
can.db.list = list, can.db.domain = domain, can.db.server = server
|
||||||
},
|
},
|
||||||
void: function(can, name, domain, list) { var worker = list[name][""], server = list[""][domain]
|
void: function(can, name, domain, list) { var worker = list[name][""], server = list[""][domain]
|
||||||
return {view: html.ACTION, _init: function(target) {
|
return {view: html.ACTION, _init: function(target) {
|
||||||
@ -31,9 +33,27 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
{text: [item.text, "", "status"]},
|
{text: [item.text, "", "status"]},
|
||||||
can.onappend.buttons(can, item),
|
can.onappend.buttons(can, item),
|
||||||
]},
|
]},
|
||||||
]}
|
], _init: function(target) {
|
||||||
|
item._target = target
|
||||||
|
}}
|
||||||
},
|
},
|
||||||
style: function(can, item, list) { var name = item.name, domain = item.domain, worker = list[name][""]
|
style: function(can, item, list) { var name = item.name, domain = item.domain, worker = list[name][""]
|
||||||
return !worker? html.NOTICE: (worker.status != cli.STOP && item.status != cli.STOP && (item.version != worker.version || item.time < worker.time))? html.DANGER: ""
|
return !worker? html.NOTICE: (worker.status != cli.STOP && item.status != cli.STOP && (item.version != worker.version || item.time < worker.time))? html.DANGER: ""
|
||||||
},
|
},
|
||||||
}, [""])
|
}, [""])
|
||||||
|
Volcanos(chat.ONACTION, {
|
||||||
|
upgrade: function(event, can) {
|
||||||
|
var msg = can.request(event); if (msg.Option(mdb.NAME) || msg.Option(web.DOMAIN)) { return can.Update(event, [ctx.ACTION, code.UPGRADE]) }
|
||||||
|
can.page.ClassList.add(can, can._output, "process")
|
||||||
|
can.core.Next(can.db.server, function(server, next, index) {
|
||||||
|
can.core.Next(can.core.Item(can.db.list, function(key, value) { return value }), function(list, next, i) {
|
||||||
|
var item = list[server]; if (!item) { return next() }
|
||||||
|
if (!item.name || item.status != cli.START) { return next() }
|
||||||
|
can.page.ClassList.add(can, item._target, "process")
|
||||||
|
can.Update(can.request({}, item, {_handle: ice.TRUE}), [ctx.ACTION, code.UPGRADE], function(msg) {
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
}, next)
|
||||||
|
}, function() { can.Update() })
|
||||||
|
},
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user