Backed out changeset bd140659a6b7 (bug 1382331) for eslint failure at aboutTelemetry.js:1353: Strings must use doublequote. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 24 Jul 2017 19:17:16 +0200
changeset 419344 b84484d5c6d57205e38121ddd5ffffbce25f09c7
parent 419343 9dd60bf73988336871b087627eb849f043a43e5c
child 419345 f91d86bb4b2adad09711ce55c82c8d695b8e6ed7
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1382331
milestone56.0a1
backs outbd140659a6b7739cb9cef76a01ceec1a749c2e4a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset bd140659a6b7 (bug 1382331) for eslint failure at aboutTelemetry.js:1353: Strings must use doublequote. r=backout
toolkit/content/aboutTelemetry.css
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.css
+++ b/toolkit/content/aboutTelemetry.css
@@ -232,28 +232,22 @@ body {
 }
 
 #histograms, #thread-hang-stats>div {
   overflow: hidden;
 }
 
 .histogram {
   float: left;
+  border: 1px solid gray;
   white-space: nowrap;
   padding: 10px;
   position: relative; /* required for position:absolute of the contained .copy-node */
-  padding: 12px 20px 12px 20px;
-  border: 1px solid var(--in-content-box-border-color);
-  border-radius: 2px;
-  margin-bottom: 24px;
-  margin-right: 24px;
-  min-height: 284px;
 }
 
-
 body[dir="rtl"] .histogram {
   float: right;
 }
 
 .histogram-title {
   text-overflow: ellipsis;
   width: 100%;
   white-space: nowrap;
@@ -284,23 +278,18 @@ body[dir="rtl"] .histogram {
   font-family: monospace;
 }
 
 body[dir="rtl"] .bar {
   float: right;
 }
 
 .bar-inner {
-  background-color: #0095DD;
-  border: 1px solid #00539F;
-  border-radius: 2px;
-}
-
-.bar:nth-child(even) .long-label  {
-  margin-bottom: 1em;
+  background-color: DeepSkyBlue;
+  border: 1px solid #0000b0;
 }
 
 th, td, table {
   text-align: start;
   border-collapse: collapse;
 }
 
 table {
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -24,17 +24,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const Telemetry = Services.telemetry;
 const bundle = Services.strings.createBundle(
   "chrome://global/locale/aboutTelemetry.properties");
 const brandBundle = Services.strings.createBundle(
   "chrome://branding/locale/brand.properties");
 
 // Maximum height of a histogram bar (in em for html, in chars for text)
-const MAX_BAR_HEIGHT = 8;
+const MAX_BAR_HEIGHT = 18;
 const MAX_BAR_CHARS = 25;
 const PREF_TELEMETRY_SERVER_OWNER = "toolkit.telemetry.server_owner";
 const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
 const PREF_DEBUG_SLOW_SQL = "toolkit.telemetry.debugSlowSql";
 const PREF_SYMBOL_SERVER_URI = "profiler.symbolicationUrl";
 const DEFAULT_SYMBOL_SERVER_URI = "http://symbolapi.mozilla.org";
 const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
 
@@ -1316,22 +1316,21 @@ var Histogram = {
     // If the last label is not the longest string, alignment will break a little
     let labelPadTo = 0;
     if (aHgram.values.length) {
       labelPadTo = String(aHgram.values[aHgram.values.length - 1][0]).length;
     }
     let maxBarValue = aOptions.exponential ? this.getLogValue(aHgram.max) : aHgram.max;
 
     for (let [label, value] of aHgram.values) {
-      label = String(label);
       let barValue = aOptions.exponential ? this.getLogValue(value) : value;
 
       // Create a text representation: <right-aligned-label> |<bar-of-#><value>  <percentage>
       text += EOL
-              + " ".repeat(Math.max(0, labelPadTo - label.length)) + label // Right-aligned label
+              + " ".repeat(Math.max(0, labelPadTo - String(label).length)) + label // Right-aligned label
               + " |" + "#".repeat(Math.round(MAX_BAR_CHARS * barValue / maxBarValue)) // Bar
               + "  " + value // Value
               + "  " + Math.round(100 * value / aHgram.sample_count) + "%"; // Percentage
 
       // Construct the HTML labels + bars
       let belowEm = Math.round(MAX_BAR_HEIGHT * (barValue / maxBarValue) * 10) / 10;
       let aboveEm = MAX_BAR_HEIGHT - belowEm;
 
@@ -1343,20 +1342,16 @@ var Histogram = {
       barDiv.appendChild(document.createTextNode(value ? value : "\u00A0"));
 
       // Create the blue bar
       let bar = document.createElement("div");
       bar.className = "bar-inner";
       bar.style.height = belowEm + "em";
       barDiv.appendChild(bar);
 
-      // Add a special class to move the text down to prevent text overlap
-      if (label.length > 3) {
-          bar.classList.add('long-label');
-      }
       // Add bucket label
       barDiv.appendChild(document.createTextNode(label));
 
       aDiv.appendChild(barDiv);
     }
 
     return text.substr(EOL.length); // Trim the EOL before the first line
   },
@@ -2358,16 +2353,18 @@ function displayRichPingData(ping, updat
   let payloadSelect = document.getElementById("choose-payload");
   let payloadOption = payloadSelect.selectedOptions.item(0);
   let payloadIndex = payloadOption.getAttribute("value");
 
   if (payloadIndex > 0) {
     payload = ping.payload.childPayloads[payloadIndex - 1];
   }
 
+  console.log(payload);
+
   // Show chrome hang stacks
   ChromeHangs.render(payload);
 
   // Show telemetry log.
   TelLog.render(payload);
 
   // Show thread hang stats
   ThreadHangStats.render(payload);