зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171382 - Add logic to not render empty keyed histograms. r=gfritzsche
This commit is contained in:
Родитель
0ae8f7d2dd
Коммит
aa9e778c8e
|
@ -1593,14 +1593,17 @@ function displayPingData(ping) {
|
|||
let keyedDiv = document.getElementById("keyed-histograms");
|
||||
removeAllChildNodes(keyedDiv);
|
||||
|
||||
setHasData("keyed-histograms-section", false);
|
||||
let keyedHistograms = payload.keyedHistograms;
|
||||
hasData = Object.keys(keyedHistograms).length > 0;
|
||||
setHasData("keyed-histograms-section", hasData);
|
||||
|
||||
if (hasData) {
|
||||
if (keyedHistograms) {
|
||||
let hasData = false;
|
||||
for (let [id, keyed] of Iterator(keyedHistograms)) {
|
||||
KeyedHistogram.render(keyedDiv, id, keyed, {unpacked: true});
|
||||
if (Object.keys(keyed).length > 0) {
|
||||
hasData = true;
|
||||
KeyedHistogram.render(keyedDiv, id, keyed, {unpacked: true});
|
||||
}
|
||||
}
|
||||
setHasData("keyed-histograms-section", hasData);
|
||||
}
|
||||
|
||||
// Show addon histogram data
|
||||
|
|
Загрузка…
Ссылка в новой задаче