[openstack-dev] [ThirdParty][CI] [patch] Status page at http://ci-watch.tintri.com/project

Philipp Marek philipp.marek at linbit.com
Mon Dec 21 14:20:48 UTC 2015


Hi all,

I quite like the page at http://ci-watch.tintri.com/project - it gives 
a very quick overview about the failures one should look into, and which to 
ignore ;)


Please let me state before anything else that I don't know any of the 
restrictions that may have led into the current design - it's very likely 
that I'm just missing a few points, and that some or all of my comments 
below are invalid anyway. As always, take enough salt!


One thing about that page that is bothering me is the performance... my 
(current) Firefox asks me several times whether I'd like to stop the JS,
or whether it should be allowed to continue.

With this patch (and a local exported copy of the page) I don't get asked 
about that any more; it seems to give me a speedup of ~200, as no 
intermediate lists need to be built and filtered any more:

$ diff -u verified.js.orig verified.js
--- verified.js.orig    2015-12-21 15:03:45.614529924 +0100
+++ verified.js 2015-12-21 15:03:36.114432601 +0100
@@ -33,9 +33,9 @@
 $(document).ready(function () {
   $("colgroup").each(function (i, elem) {
     if ($(elem).hasClass("verified-1")) {
-      $("#results").find("td").filter(":nth-child(" + (i + 1) + ")").addClass("verified-1");
+      $("#results td:nth-child(" + (i + 1) + ")").addClass("verified-1");
     } else if ($(elem).hasClass("verified1")) {
-      $("#results").find("td").filter(":nth-child(" + (i + 1) + ")").addClass("verified1");
+      $("#results td:nth-child(" + (i + 1) + ")").addClass("verified1");
     }
   });
   $("#verified1-button").on("click", toggle_verified_plus);


Furthermore, I'm wondering whether

    <td class="result verified1">
        <a href="...">
            <p class="success"><span class="glyphicon glyphicon-ok"></span></p>
        </a>
    </td>

couldn't be simplified to

    <td class="">
        <a href="..." data-success="1">
        </a>
    </td>

with the rest being done via CSS? Perhaps a <p></p> would be needed within 
the <a> to get the vertical size right, but everything else should be 
possible via CSS, I believe.

This change should reduce the size of the generated HTML big some 50% or 
so, too.



Thanks for listening - if you disagree, please ignore and continue working 
on something else ;)


Regards,

Phil




More information about the OpenStack-dev mailing list