Repository: incubator-htrace Updated Branches: refs/heads/master 61738b5ab -> 2f86d169e
HTRACE-137. Add Begin, processId, duration fields to htrace search GUI (cmccabe) Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/2f86d169 Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/2f86d169 Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/2f86d169 Branch: refs/heads/master Commit: 2f86d169ee082e71fb4fe2b970ac72efab19a368 Parents: 61738b5 Author: Colin P. Mccabe <[email protected]> Authored: Mon Mar 16 16:26:15 2015 -0700 Committer: Colin P. Mccabe <[email protected]> Committed: Mon Mar 16 16:26:15 2015 -0700 ---------------------------------------------------------------------- htrace-core/src/web/app/setup.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/2f86d169/htrace-core/src/web/app/setup.js ---------------------------------------------------------------------- diff --git a/htrace-core/src/web/app/setup.js b/htrace-core/src/web/app/setup.js index a0c1b07..d210ea6 100644 --- a/htrace-core/src/web/app/setup.js +++ b/htrace-core/src/web/app/setup.js @@ -52,11 +52,45 @@ var Router = Backbone.Marionette.AppRouter.extend({ top.main.show(new Backgrid.Grid({ "collection": this.spansCollection, "columns": [{ + "label": "Begin", + "cell": Backgrid.Cell.extend({ + className: "begin-cell", + formatter: { + fromRaw: function(rawData, model) { + var beginMs = model.get("beginTime") + return moment(beginMs).format('YYYY/MM/DD HH:mm:ss,SSS'); + }, + toRaw: function(formattedData, model) { + return formattedData // data entry not supported for this cell + } + } + }), + "editable": false + }, { "name": "spanId", "label": "ID", "cell": "string", "editable": false }, { + "name": "processId", + "label": "processId", + "cell": "string", + "editable": false + }, { + "label": "Duration", + "cell": Backgrid.Cell.extend({ + className: "duration-cell", + formatter: { + fromRaw: function(rawData, model) { + return model.duration() + " ms" + }, + toRaw: function(formattedData, model) { + return formattedData // data entry not supported for this cell + } + } + }), + "editable": false + }, { "name": "description", "label": "Description", "cell": "string",
