Bug 824577 - about:telemetry addon section was not getting displayed. r=mak, a=bajaj
authorVladan Djeric <vdjeric@mozilla.com>
Tue, 01 Jan 2013 14:10:12 -0500
changeset 119154 1c6db296e99b269cbb5ecbfa54867ce69c085645
parent 119153 a55bc8cb8a8ecf54388d1e0aa859d2dae2181fd8
child 119155 0a7e9ef48589adef0b9067a06a1415d97f377e1f
push id3085
push uservdjeric@mozilla.com
push dateTue, 01 Jan 2013 19:11:27 +0000
treeherdermozilla-aurora@1c6db296e99b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, bajaj
bugs824577
milestone19.0a2
Bug 824577 - about:telemetry addon section was not getting displayed. r=mak, a=bajaj
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -675,20 +675,24 @@ function onLoad() {
   // Show basic system info gathered
   if (Object.keys(ping.info).length) {
     KeyValueTable.render("system-info-table", ping.info);
   } else {
     showEmptySectionMessage("system-info-section");
   }
 
   // Show addon histogram data
-  histograms = Telemetry.addonHistogramSnapshots;
-  if (Object.keys(histograms).length) {
-    let addonDiv = document.getElementById("addon-histograms");
+  let addonDiv = document.getElementById("addon-histograms");
+  let addonHistogramsRendered = false;
+  let addonData = Telemetry.addonHistogramSnapshots;
+  for (let [addon, histograms] of Iterator(addonData)) {
     for (let [name, hgram] of Iterator(histograms)) {
-      Histogram.render(addonDiv, "ADDON_" + name, hgram);
+      addonHistogramsRendered = true;
+      Histogram.render(addonDiv, addon + ": " + name, hgram);
     }
-  } else {
+  }
+
+  if (!addonHistogramsRendered) {
     showEmptySectionMessage("addon-histograms-section");
   }
 }
 
 window.addEventListener("load", onLoad, false);