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

ASF GitHub Bot commented on STORM-370:
--------------------------------------

Github user kishorvpatil commented on a diff in the pull request:

    https://github.com/apache/incubator-storm/pull/160#discussion_r14151166
  
    --- Diff: storm-core/src/ui/public/component.html ---
    @@ -73,22 +73,32 @@
                 
componentSummary.append(Mustache.render($(template).filter("#component-summary-template").html(),response));
                 if(response["componentType"] == "spout") {
                     
componentStatsDetail.append(Mustache.render($(template).filter("#spout-stats-detail-template").html(),response));
    -                $("#spout-stats-table").tablesorter({ sortList: [[0,0]], 
headers: {0: { sorter: "stormtimestr"}}});
    +                if(response["spoutSummary"].length > 0) {
    +                    $("#spout-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {0: { sorter: "stormtimestr"}}});
    +                }
                     
outputStats.append(Mustache.render($(template).filter("#output-stats-template").html(),response));
    -                $("#output-stats-table").tablesorter({ sortList: [[0,0]], 
headers: {0: { sorter: "stormtimestr"}}});
    +                if(response["outputStats"].length > 0) {
    +                    $("#output-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {0: { sorter: "stormtimestr"}}});
    +                }
                     
executorStats.append(Mustache.render($(template).filter("#executor-stats-template").html(),response));
    -                $("#executor-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {1: { sorter: "stormtimestr"}}});
    +                if(response["executorStats"].length > 0) {
    +                    $("#executor-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {1: { sorter: "stormtimestr"}}});
    +                }
                 } else {
                     
componentStatsDetail.append(Mustache.render($(template).filter("#bolt-stats-template").html(),response));
    -                $("#bolt-stats-table").tablesorter({ sortList: [[0,0]], 
headers: {0: { sorter: "stormtimestr"}}});
    +                if(response["boltStats"].length > 0) {
    +                    $("#bolt-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {0: { sorter: "stormtimestr"}}});
    +                }
                     
inputStats.append(Mustache.render($(template).filter("#bolt-input-stats-template").html(),response));
                     if (response["inputStats"].length > 0) {
                         $("#bolt-input-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {}});
                     }
                     
outputStats.append(Mustache.render($(template).filter("#bolt-output-stats-template").html(),response));
    -                $("#bolt-output-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {}});
    -                
executorStats.append(Mustache.render($(template).filter("#bolt-executor-template").html(),response));
                     if(response["outputStats"].length > 0) {
    +                    $("#bolt-output-stats-table").tablesorter({ sortList: 
[[0,0]], headers: {}});
    +                }
    +                
executorStats.append(Mustache.render($(template).filter("#bolt-executor-template").html(),response));
    +                if(response["executorStats"].length > 0) {
    --- End diff --
    
    It was wrong before .The ```bolt-executor-table``` table loops over dataset 
```#executorStats``` while we were checking ```outputStats```


> Component page UI details are blank
> -----------------------------------
>
>                 Key: STORM-370
>                 URL: https://issues.apache.org/jira/browse/STORM-370
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>            Reporter: Kishor Patil
>              Labels: master, security
>
> Symptom: On component page - most of the details are blank. If the component
> json response has some of list elements empty ( e.g. boltStats, executors
> or spoutStats, outputStats inputStats).
> In such situation, I noticed earlier the component page call to js
> tablesorter  throws exception ( - wherever table has 0 rows). This
> exception stops further rendering of elements.  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to