agusantoso / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

Single-page waterfalls aren't expanded in the preview #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

    I created an example at http://www.brianp.net/demo/waterfall7/

What is the expected output? What do you see instead?

    I thought the waterfall would be expanded automatically, based on
    this code in webapp/scripts/preview/pageList.js:

            // Expand appended page by default, only if there is only one page
            // Note that there can be more page-lists (pageTable elements)
            var len1 = table.firstChild.childNodes.length;
            var len2 = table.parentNode.childNodes.length;
            if (len1 == 1 && len2 == 1)
                this.toggleRow(table.firstChild.firstChild);

    However, the waterfall isn't expanded. I have to click the "+" button to expand it.

What version of the product are you using? On what operating system?

    harviewer 2.0.14

Please provide any additional information below.

    The "len2==1" condition in that code fails because len2 is 2. I think
    that's because the HarPreview initialization code creates a div (to hold
    a top-level menu) before it creates the table.

    It works (i.e., the waterfall is expanded) if I change that line of pageList.js to this:
            if (len1 == 1 && len2 == 2)

Original issue reported on code.google.com by bri...@brianp.net on 12 Sep 2011 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by odva...@gmail.com on 13 Sep 2011 at 10:21

GoogleCodeExporter commented 9 years ago
Patch committed at R392

Test at R393

Honza

Original comment by odva...@gmail.com on 18 Sep 2011 at 9:40

GoogleCodeExporter commented 9 years ago
This issue is fixed in HAR Viewer 2.0.15
http://www.softwareishard.com/har/viewer/

Please let me know if it works for you.

Thanks!
Honza

Original comment by odva...@gmail.com on 13 Nov 2011 at 2:34