mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
Bug 1389030 - Go to home when section has no data in about:telemetry r=chutten
When switching to a ping that hasn't data for the current section go to home section. MozReview-Commit-ID: 2zTZUiyHe0M --HG-- extra : rebase_source : 2abe235c99cf2b0b6579c9fbac940b5bc8a0a532
This commit is contained in:
parent
c0706372d9
commit
dad19047d2
@ -1899,6 +1899,13 @@ function adjustSearchState() {
|
||||
}
|
||||
}
|
||||
|
||||
function adjustSection() {
|
||||
let selectedCategory = document.querySelector(".category.selected");
|
||||
if (!selectedCategory.classList.contains("has-data")) {
|
||||
PingPicker._showStructuredPingData();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the url according to the current section displayed
|
||||
* e.g about:telemetry#general-data
|
||||
@ -2360,11 +2367,12 @@ function displayPingData(ping, updatePayloadList = false) {
|
||||
try {
|
||||
PingPicker.render();
|
||||
displayRichPingData(ping, updatePayloadList);
|
||||
adjustSearchState();
|
||||
adjustSection();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
PingPicker._showRawPingData();
|
||||
}
|
||||
adjustSearchState();
|
||||
}
|
||||
|
||||
function displayRichPingData(ping, updatePayloadList) {
|
||||
|
Loading…
Reference in New Issue
Block a user