diff --git a/frame.js b/frame.js index 874453cf..3a20b0b3 100644 --- a/frame.js +++ b/frame.js @@ -119,14 +119,12 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { value && (value = can.user.trans(sub, value, null, html.INPUT)) return can.page.SelectArgs(can, action, key, value)[0] }, - Option: function(key, value) { - value && (value = can.user.trans(sub, value, null, html.INPUT)) + Option: function(key, value) { value && (value = can.user.trans(sub, value, null, html.INPUT)) return can.page.SelectArgs(can, option, key, value)[0] }, - Update: function(event, cmds, cb, silent) { event = event||{} - sub.request(event, {_toast: event.isTrusted? ice.PROCESS: ""}, can.core.Value(sub, "sub.db._checkbox"))._caller(), sub.onappend._output0(sub, sub.Conf(), event||{}, cmds||sub.Input([], !silent), cb, silent); return true }, + Update: function(event, cmds, cb, silent) { event = event||{}, sub.request(event, {_toast: event.isTrusted? ice.PROCESS: ""}, + can.core.Value(sub, "sub.db._checkbox"))._caller(), sub.onappend._output0(sub, sub.Conf(), event||{}, cmds||sub.Input([], !silent), cb, silent); return true }, Focus: function() { can.page.SelectOne(can, option, html.INPUT_ARGS, function(target) { target.focus() }) }, - Input: function(cmds, save, opts) { cmds = cmds && cmds.length > 0? cmds: can.page.SelectArgs(sub), cmds && cmds[0] != ctx.ACTION && (cmds = can.base.trim(cmds)) - cmds._opts = opts + Input: function(cmds, save, opts) { cmds = cmds && cmds.length > 0? cmds: can.page.SelectArgs(sub), cmds && cmds[0] != ctx.ACTION && (cmds = can.base.trim(cmds)), cmds._opts = opts return !save || cmds[0] == ctx.ACTION || can.base.Eq(sub._history[sub._history.length-1], cmds) || sub._history.push(cmds), cmds }, Clone: function() { meta.args = can.page.SelectArgs(can), can.onappend._init(can, meta, list, function(sub) { can.base.isFunc(cb) && cb(sub, true), can.onmotion.delay(can, sub.Focus) }, target) }, @@ -277,9 +275,15 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { if (can.base.beginWith(item.value, nfs.PS, ice.HTTP)) { item.value = can.page.Format(html.A, item.value, item.value.split("?")[0]) } if (keys[item.name]) { return can.Status(item.name, item.value) } keys[item.name] = item msg && item.name == cli.COST && (item.value = msg.Option(ice.MSG_COST)||item.value) + msg && item.name == nfs.SIZE && (item.value = can.base.Size(item.value||msg._xhr.responseText.length)) can.page.Append(can, status, [{view: html.ITEM, list: [ {text: [can.page.Color(can.user.trans(can, item.name, null, html.INPUT)), html.LABEL]}, {text: [": ", html.LABEL]}, {text: [(item.value == undefined? "": (item.value+"").trim())+"", html.SPAN, item.name]}, - ], onclick: function(event) { can.user.copy(event, can, item.value) }}]) + ], onclick: function(event) { + can.user.copy(event, can, item.value) + if (item.name == ice.LOG_TRACEID) { + can.onappend._float(can, web.CODE_XTERM, ["sh", item.value, "grep "+item.value+" var/log/bench.log | grep -v grep | grep -v "+item.value+"$"]) + } + }}]) }) }, diff --git a/plugin/table.js b/plugin/table.js index b91810cc..8dd4307d 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -180,7 +180,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear( can.core.Next(list.reverse(), function(meta, next) { can.base.isString(meta) && (meta = {index: meta}), meta.mode = html.FLOAT can.onimport.plug(can, meta, function(sub) { sub.onexport.output = function() { can.page.style(can, sub._output, html.MAX_HEIGHT, "", html.HEIGHT, "", html.WIDTH, "", html.MAX_WIDTH, "") - var height = can.base.Min(html.PLUG_HEIGHT, 240, can._output.offsetHeight), width = can.base.Max(html.PLUG_WIDTH, can.ConfWidth()-html.PROJECT_WIDTH) + var height = can.base.Max(html.PLUG_HEIGHT, can._output.offsetHeight, 240), width = can.base.Max(html.PLUG_WIDTH, can.ConfWidth()-html.PROJECT_WIDTH) // var height = can.base.Min(html.PLUG_HEIGHT, 240, can.ConfHeight()-html.ACTION_HEIGHT), width = can.base.Max(html.PLUG_WIDTH, can.ConfWidth()-html.PROJECT_WIDTH) sub.onimport.size(sub, height, width, false), can.onmotion.delay(can, function() { sub.onimport.size(sub, height, width, false) }) }