[ 
https://issues.apache.org/jira/browse/AVRO-2004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715549#comment-16715549
 ] 

ASF GitHub Bot commented on AVRO-2004:
--------------------------------------

dkulp closed pull request #202: AVRO-2004: fix IPC charts for stats
URL: https://github.com/apache/avro/pull/202
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/avro.css 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/avro.css
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/avro.css
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/avro.css
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/avro.js 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/avro.js
similarity index 81%
rename from lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/avro.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/avro.js
index 30da1b017..1d0f09772 100644
--- a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/avro.js
+++ b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/avro.js
@@ -44,7 +44,7 @@ function makeDotChart(yVals) {
        vis.add(pv.Rule)
            .data(y.ticks())
            .bottom(y)
-           .strokeStyle(function(d) d ? "#eee" : "#000")
+           .strokeStyle(function(d) {return d ? "#eee" : "#000"})
          .anchor("left").add(pv.Label)
            .text(y.tickFormat);
 
@@ -53,11 +53,11 @@ function makeDotChart(yVals) {
        vis.add(pv.Panel)
            .data(data)
            .add(pv.Dot)
-           .left(function(d) x(d.x))
-           .bottom(function(d) y(d.y))
-           .strokeStyle(function(d) dotColors[d.x % 20])
-           .fillStyle(function() this.strokeStyle().alpha(1))
-           .title(function(d) d.y)
+           .left(function(d) {return x(d.x)})
+           .bottom(function(d) {return y(d.y)})
+           .strokeStyle(function(d) {return dotColors[d.x % 20]})
+           .fillStyle(function() {return this.strokeStyle().alpha(1)})
+           .title(function(d) {return d.y})
            .event("mouseover", pv.Behavior.tipsy({gravity: "n", 
              fade: false, delayIn: 0}));
        vis.render();
@@ -86,7 +86,7 @@ function makeBarChart(labels, boundries, data) {
            .width(10)
            .bottom(0)
            .height(y)
-           .fillStyle(function(d) "#1f77b4")
+           .fillStyle(function(d) {return "#1f77b4"})
            .title(function() { return boundries[this.index]; })
            .event("mouseover", pv.Behavior.tipsy({gravity: "n", 
              fade: false, delayIn: 0}));
@@ -94,17 +94,17 @@ function makeBarChart(labels, boundries, data) {
        bar.anchor("bottom").add(pv.Label)
        .textMargin(5)
                .textBaseline("top")
-               .text(function() (this.index % 4 == 0) ? labels[this.index]: 
"");               
+               .text(function() {return (this.index % 4 == 0) ? 
labels[this.index]: ""});
        
        vis.add(pv.Rule)
            .data(y.ticks())
-           .bottom(function(d) Math.round(y(d)) - .5)
-           .strokeStyle(function(d) d ? "rgba(255,255,255,.3)" : "#000")
+           .bottom(function(d) {return Math.round(y(d)) - .5})
+           .strokeStyle(function(d) {return d ? "rgba(255,255,255,.3)" : 
"#000"})
          .add(pv.Rule)
            .left(0)
            .width(5)
            .strokeStyle("#000")
          .anchor("left").add(pv.Label)
-           .text(function(d) d.toFixed(1));
+           .text(function(d) {return d.toFixed(1)});
        vis.render();
-}
\ No newline at end of file
+}
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/g.bar.js 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/g.bar.js
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/g.bar.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/g.bar.js
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery-1.4.2.min.js
 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-1.4.2.min.js
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery-1.4.2.min.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery-1.4.2.min.js
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery.tipsy.js 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery.tipsy.js
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery.tipsy.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/jquery.tipsy.js
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/protovis-r3.2.js 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/protovis-r3.2.js
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/protovis-r3.2.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/protovis-r3.2.js
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/tipsy.css 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/tipsy.css
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/tipsy.css
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/tipsy.css
diff --git 
a/lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/tipsy.js 
b/lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/tipsy.js
similarity index 100%
rename from 
lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/tipsy.js
rename to 
lang/java/ipc/src/main/velocity/org/apache/avro/ipc/stats/static/tipsy.js


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Stats View is not working
> -------------------------
>
>                 Key: AVRO-2004
>                 URL: https://issues.apache.org/jira/browse/AVRO-2004
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.8.1
>            Reporter: Ken Dombeck
>            Assignee: Ken Dombeck
>            Priority: Minor
>             Fix For: 1.9.0
>
>         Attachments: WorkingStatsPage.png
>
>
> When trying to view the IPC stats page the charts are not being displayed.
> The issue is that the CSS and JS resources are not being included in the jar 
> artifact.
> There are 2 possible solutions that I see to this.
> # Move the CSS and JS resources to be with the Velocity template that 
> generates the HTML.
> # Change Maven to include the resources where they currently are.
> Github [pull request|https://github.com/apache/avro/pull/202] has been 
> created for option 1.
> This relates to the feature created in 
> [AVRO-587|https://issues.apache.org/jira/browse/AVRO-587]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to