Bug 1383837 - Remove old statebox r=chutten
authorflyingrub <flyinggrub@gmail.com>
Mon, 24 Jul 2017 20:16:29 +0200
changeset 420373 ebc577da908c2b80572feae80b2edf813537650c
parent 420372 06cffb11dedacd9a8f2e062887a9a4194aa3659f
child 420374 f8637a01b5c8fea085ffab03eb2cb95d070371cc
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)
reviewerschutten
bugs1383837
milestone56.0a1
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
Bug 1383837 - Remove old statebox r=chutten We don't need the statebox that were designed for the old about:telemetry anymore. MozReview-Commit-ID: LL6nzjKalE1
toolkit/content/aboutTelemetry.js
toolkit/content/aboutTelemetry.xhtml
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -1836,22 +1836,16 @@ function setHasData(aSectionID, aHasData
 function toggleSection(aEvent) {
   let parentElement = aEvent.target.parentElement;
   if (!parentElement.classList.contains("has-data") &&
       !parentElement.classList.contains("has-subdata")) {
     return; // nothing to toggle
   }
 
   parentElement.classList.toggle("expanded");
-
-  // Store section opened/closed state in a hidden checkbox (which is then used on reload)
-  let statebox = parentElement.getElementsByClassName("statebox")[0];
-  if (statebox) {
-    statebox.checked = parentElement.classList.contains("expanded");
-  }
 }
 
 /**
  * Sets the text of the page header based on a config pref + bundle strings
  */
 function setupPageHeader() {
   let serverOwner = Preferences.get(PREF_TELEMETRY_SERVER_OWNER, "Mozilla");
   let brandName = brandBundle.GetStringFromName("brandFullName");
@@ -2042,22 +2036,17 @@ function onLoad() {
 
   // Set up event listeners
   setupListeners();
 
   // Render settings.
   Settings.render();
 
   // Restore sections states
-  let stateboxes = document.getElementsByClassName("statebox");
-  for (let box of stateboxes) {
-    if (box.checked) { // Was open. Will still display as empty if not has-data
-        box.parentElement.classList.add("expanded");
-    }
-  }
+  // TODO
 
   // Update ping data when async Telemetry init is finished.
   Telemetry.asyncFetchTelemetryData(() => PingPicker.update());
 }
 
 var LateWritesSingleton = {
   renderHeader: function LateWritesSingleton_renderHeader(aIndex) {
     StackRenderer.renderHeader("late-writes", [aIndex + 1]);
--- a/toolkit/content/aboutTelemetry.xhtml
+++ b/toolkit/content/aboutTelemetry.xhtml
@@ -143,120 +143,104 @@
         <p id="ping-explanation"></p>
       </div>
 
       <div id="raw-ping-data-section" class="tab" hidden="true">
         <pre id="raw-ping-data"></pre>
       </div>
 
       <section id="general-data-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="general-data" class="data">
         </div>
       </section>
 
       <section id="environment-data-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="environment-data" class="data">
         </div>
       </section>
 
       <section id="session-info-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="session-info" class="data">
         </div>
       </section>
 
       <section id="scalars-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="scalars" class="data">
         </div>
       </section>
 
       <section id="keyed-scalars-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="keyed-scalars" class="data">
         </div>
       </section>
 
       <section id="histograms-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="histograms" class="data">
         </div>
       </section>
 
       <section id="keyed-histograms-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="keyed-histograms" class="data">
         </div>
       </section>
 
       <section id="events-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="events" class="data">
         </div>
       </section>
 
       <section id="simple-measurements-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="simple-measurements" class="data">
         </div>
       </section>
 
       <section id="telemetry-log-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="telemetry-log" class="data">
         </div>
       </section>
 
       <section id="slow-sql-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="slow-sql-tables" class="data">
           <p id="sql-warning" class="hidden">&aboutTelemetry.fullSqlWarning;</p>
         </div>
       </section>
 
       <section id="chrome-hangs-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="chrome-hangs" class="data">
           <a id="chrome-hangs-fetch-symbols" href="#">&aboutTelemetry.fetchStackSymbols;</a>
           <a id="chrome-hangs-hide-symbols" class="hidden" href="#">&aboutTelemetry.hideStackSymbols;</a>
           <br/>
           <br/>
           <div id="chrome-hangs-data">
           </div>
         </div>
       </section>
 
       <section id="thread-hang-stats-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="thread-hang-stats" class="data">
         </div>
       </section>
 
       <section id="late-writes-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="late-writes" class="data">
           <a id="late-writes-fetch-symbols" href="#">&aboutTelemetry.fetchStackSymbols;</a>
           <a id="late-writes-hide-symbols" class="hidden" href="#">&aboutTelemetry.hideStackSymbols;</a>
           <br/>
           <br/>
           <div id="late-writes-data">
           </div>
         </div>
       </section>
 
       <section id="addon-details-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="addon-details" class="data">
         </div>
       </section>
 
       <section id="captured-stacks-section" class="tab data-section expanded" hidden="true">
-        <input type="checkbox" class="statebox"/>
         <div id="captured-stacks" class="data">
           <a id="captured-stacks-fetch-symbols" href="#">&aboutTelemetry.fetchStackSymbols;</a>
           <a id="captured-stacks-hide-symbols" class="hidden" href="#">&aboutTelemetry.hideStackSymbols;</a>
           <br/>
           <br/>
           <div id="captured-stacks-data">
           </div>
         </div>