You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@htrace.apache.org by iw...@apache.org on 2015/04/08 01:23:41 UTC
incubator-htrace git commit: HTRACE-141. Fix nits of swimlane view of
htraced Web UI (iwasakims)
Repository: incubator-htrace
Updated Branches:
refs/heads/master dd71d7cab -> 0557ceaac
HTRACE-141. Fix nits of swimlane view of htraced Web UI (iwasakims)
Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/0557ceaa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/0557ceaa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/0557ceaa
Branch: refs/heads/master
Commit: 0557ceaac18acb78d2f38ea00d6fcd02c4b3e3e7
Parents: dd71d7c
Author: Masatake Iwasaki <iw...@apache.org>
Authored: Wed Apr 8 08:23:24 2015 +0900
Committer: Masatake Iwasaki <iw...@apache.org>
Committed: Wed Apr 8 08:23:24 2015 +0900
----------------------------------------------------------------------
.../src/web/app/views/swimlane/swimlane.js | 30 ++++++++++----------
htrace-core/src/web/index.html | 4 ---
2 files changed, 15 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0557ceaa/htrace-core/src/web/app/views/swimlane/swimlane.js
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/app/views/swimlane/swimlane.js b/htrace-core/src/web/app/views/swimlane/swimlane.js
index 878e2d0..99f0b88 100644
--- a/htrace-core/src/web/app/views/swimlane/swimlane.js
+++ b/htrace-core/src/web/app/views/swimlane/swimlane.js
@@ -19,8 +19,7 @@
app.SwimlaneView = Backbone.Marionette.LayoutView.extend({
"template": "#swimlane-layout-template",
"regions": {
- "swimlane": "div[role='complementary']",
- "content": "div[role='main']"
+ "swimlane": "div[role='main']",
}
});
@@ -34,7 +33,7 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
this.getJsonSync);
},
- render: function() {
+ onShow: function() {
this.appendSVG(this.spans);
},
@@ -77,6 +76,7 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
.domain([new Date(tmin), new Date(tmax)]).range([0, width_span]);
var svg = d3.select("div[role='main']").append("svg")
+ .attr("id", "svg-swimlane")
.attr("width", width_span + margin.process + margin.left + margin.right)
.attr("height", height_screen + margin.top + margin.bottom)
.append("g")
@@ -87,6 +87,15 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
.attr("width", width_span)
.attr("height", height_screen)
.attr("transform", "translate(" + (10 * dmax + margin.process) + ", 0)");
+
+ var axis = d3.svg.axis()
+ .scale(xscale)
+ .orient("top")
+ .tickValues(xscale.domain())
+ .tickFormat(d3.time.format("%x %X.%L"))
+ .tickSize(6, 3);
+
+ bars.append("g").attr("class", "axis").call(axis);
var span_g = bars.selectAll("g.span")
.data(spans)
@@ -135,12 +144,12 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
.enter()
.append("rect")
.style("fill", "red")
+ .attr("class", "timeline")
.attr("height", size_tl)
.attr("width", size_tl)
.attr("transform", function(t) {
return "translate(" + xscale(t.t) + "," + (height_span - 1 - size_tl) + ")";
- })
- .classed("timeline");
+ });
var popup = d3.select("div[role='main']").append("div")
.attr("class", "popup")
@@ -152,7 +161,7 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
var text = "<table>";
d.t.forEach(function (t) {
text += "<tr><td>" + (t.t - tmin) + "</td>";
- text += "<td> : " + t.m + "<td/></tr>";
+ text += "<td> : " + t.m + "</td></tr>";
});
text += "</table>"
popup.html(text)
@@ -165,14 +174,5 @@ app.SwimlaneGraphView = Backbone.Marionette.View.extend({
.on("mouseout", function(d) {
popup.transition().duration(300).style("opacity", 0);
});
-
- var axis = d3.svg.axis()
- .scale(xscale)
- .orient("top")
- .tickValues(xscale.domain())
- .tickFormat(d3.time.format("%x %X.%L"))
- .tickSize(6, 3);
-
- bars.append("g").attr("class", "axis").call(axis);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/0557ceaa/htrace-core/src/web/index.html
----------------------------------------------------------------------
diff --git a/htrace-core/src/web/index.html b/htrace-core/src/web/index.html
index bcfea19..d403860 100644
--- a/htrace-core/src/web/index.html
+++ b/htrace-core/src/web/index.html
@@ -169,10 +169,6 @@
<div class="row">
<div class="col-md-12" role="main"></div>
</div>
-
- <div class="row">
- <div class="col-md-12" role="complementary"></div>
- </div>
</div>
</script>