forked from x/icebergs
opt procstat.go
This commit is contained in:
parent
ec40e9d9eb
commit
c71b01e4bb
@ -79,11 +79,12 @@ func init() {
|
||||
)
|
||||
last = stat
|
||||
}},
|
||||
}, mdb.PageListAction(mdb.FIELD, "time,id,utime,vmrss,user,idle,free,rx,tx,established,time_wait")), Hand: func(m *ice.Message, arg ...string) {
|
||||
m.OptionDefault(mdb.CACHE_LIMIT, "300")
|
||||
mdb.PageListSelect(m, arg...)
|
||||
m.SortInt(mdb.ID).Display("/plugin/story/trend.js", ice.VIEW, "折线图", "min", "0", "max", "1000", COLOR, "yellow,cyan,red,green,blue,purple,purple")
|
||||
m.Status("from", m.Append(mdb.TIME), "span", kit.FmtDuration(time.Duration(kit.Time(m.Time())-kit.Time(m.Append(mdb.TIME)))), m.AppendSimple(mdb.Config(m, mdb.FIELD)), "cursor", "0")
|
||||
}, mdb.PageListAction(mdb.LIMIT, "720", mdb.LEAST, "360", mdb.FIELD, "time,id,utime,vmrss,user,idle,free,rx,tx,established,time_wait")), Hand: func(m *ice.Message, arg ...string) {
|
||||
m.OptionDefault(mdb.CACHE_LIMIT, "360")
|
||||
if mdb.PageListSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||
m.SortInt(mdb.ID).Display("/plugin/story/trend.js", ice.VIEW, "折线图", "min", "0", "max", "1000", COLOR, "yellow,cyan,red,green,blue,purple,purple")
|
||||
m.Status("from", m.Append(mdb.TIME), "span", kit.FmtDuration(time.Duration(kit.Time(m.Time())-kit.Time(m.Append(mdb.TIME)))), m.AppendSimple(mdb.Config(m, mdb.FIELD)), "cursor", "0")
|
||||
}
|
||||
}},
|
||||
})
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ func _timer_action(m *ice.Message, now time.Time, arg ...string) {
|
||||
}
|
||||
m.Option(ice.LOG_DISABLE, ice.FALSE)
|
||||
// m.Cmd(ROUTINE, mdb.CREATE, mdb.NAME, value[mdb.NAME], kit.Keycb(ROUTINE), value[ice.CMD])
|
||||
m.Cmd(kit.Split(value[ice.CMD]))
|
||||
m.Cmd(kit.Split(value[ice.CMD])).Cost()
|
||||
kit.If(count < 0, func() { count++ })
|
||||
mdb.HashModify(m, mdb.HASH, value[mdb.HASH], mdb.COUNT, count-1, mdb.TIME, m.Time(value[INTERVAL]))
|
||||
})
|
||||
|
@ -253,27 +253,16 @@ func AutoConfig(arg ...Any) *ice.Action {
|
||||
}
|
||||
}}
|
||||
}
|
||||
func ImportantZoneAction() ice.Actions {
|
||||
return ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
Config(m, "important", ice.TRUE)
|
||||
ZoneImport(m)
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.OptionFields("")
|
||||
ZoneExport(m)
|
||||
}},
|
||||
}
|
||||
}
|
||||
func ImportantHashAction(arg ...Any) ice.Actions {
|
||||
func ImportantZoneAction(arg ...Any) ice.Actions {
|
||||
return ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
Config(m, "important", ice.TRUE)
|
||||
HashImport(m)
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
HashExport(m)
|
||||
}},
|
||||
}, ZoneAction(arg...))
|
||||
}
|
||||
func ImportantHashAction(arg ...Any) ice.Actions {
|
||||
return ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { Config(m, "important", ice.TRUE) }},
|
||||
}, HashAction(arg...))
|
||||
}
|
||||
func saveImportant(m *ice.Message, key, sub string, arg ...string) {
|
||||
|
@ -15,13 +15,14 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
DESKTOP: {Help: "应用桌面", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Cmd(DESKTOP).Length() == 0 {
|
||||
if mdb.HashImport(m); m.Cmd(DESKTOP).Length() == 0 {
|
||||
DeskAppend(m, "Books", web.WIKI_WORD)
|
||||
DeskAppend(m, "Photos", web.WIKI_FEEL)
|
||||
DeskAppend(m, "Grapher", web.WIKI_DRAW)
|
||||
DeskAppend(m, "Calendar", web.TEAM_PLAN, ctx.ARGS, team.MONTH)
|
||||
}
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { mdb.HashExport(m) }},
|
||||
web.DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.Switch(m.Option(mdb.TYPE), kit.Simple(web.SERVER, web.WORKER), func() { m.PushButton(kit.Dict(m.CommandKey(), "桌面")) })
|
||||
}},
|
||||
|
@ -11,13 +11,14 @@ const DOCK = "dock"
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{DOCK: {Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Cmd(DOCK).Length() == 0 {
|
||||
if mdb.HashImport(m); m.Cmd(DOCK).Length() == 0 {
|
||||
DockAppend(m, "Finder", Prefix(FINDER))
|
||||
DockAppend(m, "Safari", web.CHAT_IFRAME)
|
||||
DockAppend(m, "Terminal", web.CODE_XTERM)
|
||||
DockAppend(m, "", web.CODE_VIMER)
|
||||
}
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { mdb.HashExport(m) }},
|
||||
}, CmdHashAction(), mdb.ImportantHashAction())}})
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,9 @@ const (
|
||||
)
|
||||
const MACOS = "macos"
|
||||
|
||||
var Index = &ice.Context{Name: MACOS, Commands: ice.Commands{ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { ice.Info.Load(m).Cmd(FINDER, ice.CTX_INIT) }}}}
|
||||
var Index = &ice.Context{Name: MACOS, Commands: ice.Commands{ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
ice.Info.Load(m).Cmd(FINDER, ice.CTX_INIT)
|
||||
}}}}
|
||||
|
||||
func init() { chat.Index.Register(Index, nil, DESKTOP) }
|
||||
|
||||
|
@ -83,7 +83,7 @@ func init() {
|
||||
CANCEL: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, CANCEL) }},
|
||||
BEGIN: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, PROCESS) }},
|
||||
END: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, FINISH) }},
|
||||
}, mdb.ImportantZoneAction(), mdb.ZoneAction(mdb.FIELD, "begin_time,close_time,id,status,level,score,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||
}, mdb.ImportantZoneAction(mdb.FIELD, "begin_time,close_time,id,status,level,score,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if mdb.ZoneSelect(m, arg...); len(arg) > 0 && arg[0] != "" {
|
||||
status := map[string]int{}
|
||||
m.Table(func(value ice.Maps) { m.PushButton(_task_action(m, value[STATUS])) })
|
||||
|
Loading…
x
Reference in New Issue
Block a user