зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383837 - Remove unused classes in about:telemetry r=chutten
Also : * fix the blacklist of section of the search * Cleanup the html code so that it takes less lines MozReview-Commit-ID: DITHGIqj6LE --HG-- extra : rebase_source : 87f76d9b027f263970a0e5cb6f687290d5cbf004
This commit is contained in:
Родитель
f5b33fd0f0
Коммит
f4d6a4d9dc
|
@ -139,6 +139,10 @@ body {
|
|||
position: relative;
|
||||
}
|
||||
|
||||
section:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#page-description {
|
||||
border: 1px solid threedshadow;
|
||||
margin: 0px;
|
||||
|
@ -146,20 +150,6 @@ body {
|
|||
line-height: 1.2;
|
||||
}
|
||||
|
||||
#settings {
|
||||
border: 1px solid lightgrey;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.change-data-choices-link {
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
.change-data-choices-link:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#ping-explanation > span {
|
||||
cursor: pointer;
|
||||
border-bottom-width: 2px;
|
||||
|
@ -200,20 +190,6 @@ body {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.data-section:not(.has-data),
|
||||
.data-subsection:not(.has-subdata) {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.section-name {
|
||||
font-size: x-large;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.has-data .section-name {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stack-title {
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -1450,7 +1450,7 @@ var Search = {
|
|||
},
|
||||
|
||||
search(text) {
|
||||
let selectedSection = document.querySelector(".data-section.active");
|
||||
let selectedSection = document.querySelector("section.active");
|
||||
if (selectedSection.id === "histograms-section") {
|
||||
let histograms = selectedSection.getElementsByClassName("histogram");
|
||||
this.filterElements(histograms, text);
|
||||
|
@ -1535,8 +1535,9 @@ var GenericSubsection = {
|
|||
|
||||
renderSubsectionHeader(title, hasData, sectionID) {
|
||||
this.addSubSectionToSidebar(sectionID, title);
|
||||
let section = document.createElement("section");
|
||||
let section = document.createElement("div");
|
||||
section.setAttribute("id", sectionID + "-" + title);
|
||||
section.classList.add("sub-section");
|
||||
if (hasData) {
|
||||
section.classList.add("has-subdata");
|
||||
}
|
||||
|
@ -1856,7 +1857,8 @@ function displayProcessesSelector(selectedSection) {
|
|||
function adjustSearchState() {
|
||||
let selectedSection = document.querySelector("section.active").id;
|
||||
let blacklist = [
|
||||
"home",
|
||||
"home-section",
|
||||
"raw-ping-data-section"
|
||||
];
|
||||
// TODO: Implement global search for the Home section
|
||||
let search = document.getElementById("search");
|
||||
|
@ -1891,14 +1893,12 @@ function show(selected) {
|
|||
document.getSelection().empty();
|
||||
|
||||
let selectedValue = selected.getAttribute("value");
|
||||
let current_section = document.querySelector(".active");
|
||||
let current_section = document.querySelector("section.active");
|
||||
let selected_section = document.getElementById(selectedValue);
|
||||
if (current_section == selected_section)
|
||||
return;
|
||||
current_section.classList.remove("active");
|
||||
current_section.hidden = true;
|
||||
selected_section.classList.add("active");
|
||||
selected_section.hidden = false;
|
||||
|
||||
let title = selected.querySelector(".category-name").textContent.trim();
|
||||
document.getElementById("sectionTitle").textContent = title;
|
||||
|
|
|
@ -137,76 +137,66 @@
|
|||
<select id="processes" hidden="true"></select>
|
||||
</div>
|
||||
|
||||
<div id="home-section" class="tab active">
|
||||
<section id="home-section" class="active">
|
||||
<h3 id="page-subtitle"></h3>
|
||||
<p id="home-explanation"></p>
|
||||
<p id="ping-explanation"></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="raw-ping-data-section" class="tab" hidden="true">
|
||||
<section id="raw-ping-data-section">
|
||||
<pre id="raw-ping-data"></pre>
|
||||
</div>
|
||||
|
||||
<section id="general-data-section" class="tab data-section" hidden="true">
|
||||
<div id="general-data" class="data">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="environment-data-section" class="tab data-section" hidden="true">
|
||||
<div id="environment-data" class="data">
|
||||
</div>
|
||||
<section id="general-data-section">
|
||||
<div id="general-data" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="session-info-section" class="tab data-section" hidden="true">
|
||||
<div id="session-info" class="data">
|
||||
</div>
|
||||
<section id="environment-data-section">
|
||||
<div id="environment-data" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="scalars-section" class="tab data-section" hidden="true">
|
||||
<div id="scalars" class="data">
|
||||
</div>
|
||||
<section id="session-info-section">
|
||||
<div id="session-info" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="keyed-scalars-section" class="tab data-section" hidden="true">
|
||||
<div id="keyed-scalars" class="data">
|
||||
</div>
|
||||
<section id="scalars-section">
|
||||
<div id="scalars" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="histograms-section" class="tab data-section" hidden="true">
|
||||
<div id="histograms" class="data">
|
||||
</div>
|
||||
<section id="keyed-scalars-section">
|
||||
<div id="keyed-scalars" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="keyed-histograms-section" class="tab data-section" hidden="true">
|
||||
<div id="keyed-histograms" class="data">
|
||||
</div>
|
||||
<section id="histograms-section">
|
||||
<div id="histograms" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="events-section" class="tab data-section" hidden="true">
|
||||
<div id="events" class="data">
|
||||
</div>
|
||||
<section id="keyed-histograms-section">
|
||||
<div id="keyed-histograms" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="simple-measurements-section" class="tab data-section" hidden="true">
|
||||
<div id="simple-measurements" class="data">
|
||||
</div>
|
||||
<section id="events-section">
|
||||
<div id="events" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="telemetry-log-section" class="tab data-section" hidden="true">
|
||||
<div id="telemetry-log" class="data">
|
||||
</div>
|
||||
<section id="simple-measurements-section">
|
||||
<div id="simple-measurements" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="slow-sql-section" class="tab data-section" hidden="true">
|
||||
<section id="telemetry-log-section">
|
||||
<div id="telemetry-log" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="slow-sql-section">
|
||||
<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" hidden="true">
|
||||
<section id="chrome-hangs-section">
|
||||
<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>
|
||||
<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">
|
||||
|
@ -214,15 +204,14 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section id="thread-hang-stats-section" class="tab data-section" hidden="true">
|
||||
<div id="thread-hang-stats" class="data">
|
||||
</div>
|
||||
<section id="thread-hang-stats-section">
|
||||
<div id="thread-hang-stats" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="late-writes-section" class="tab data-section" hidden="true">
|
||||
<section id="late-writes-section">
|
||||
<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>
|
||||
<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">
|
||||
|
@ -230,15 +219,14 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section id="addon-details-section" class="tab data-section" hidden="true">
|
||||
<div id="addon-details" class="data">
|
||||
</div>
|
||||
<section id="addon-details-section">
|
||||
<div id="addon-details" class="data"></div>
|
||||
</section>
|
||||
|
||||
<section id="captured-stacks-section" class="tab data-section" hidden="true">
|
||||
<section id="captured-stacks-section">
|
||||
<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>
|
||||
<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">
|
||||
|
|
Загрузка…
Ссылка в новой задаче