|
@ -314,8 +314,8 @@ function changeFilterHandler() { |
|
|
// Initialize request filters as per user settings:
|
|
|
// Initialize request filters as per user settings:
|
|
|
// https://github.com/gorhill/httpswitchboard/issues/49
|
|
|
// https://github.com/gorhill/httpswitchboard/issues/49
|
|
|
var statsFilters = cachedUserSettings.statsFilters; |
|
|
var statsFilters = cachedUserSettings.statsFilters; |
|
|
uDom('input[id^="show-"][type="checkbox"]').toArray().forEach(function() { |
|
|
|
|
|
var input = uDom(this); |
|
|
|
|
|
|
|
|
uDom('input[id^="show-"][type="checkbox"]').toArray().forEach(function(elem) { |
|
|
|
|
|
var input = uDom(elem); |
|
|
statsFilters[input.attr('id')] = !!input.prop('checked'); |
|
|
statsFilters[input.attr('id')] = !!input.prop('checked'); |
|
|
}); |
|
|
}); |
|
|
changeUserSettings('statsFilters', statsFilters); |
|
|
changeUserSettings('statsFilters', statsFilters); |
|
@ -396,8 +396,8 @@ uDom.onLoad(function(){ |
|
|
// init ui as per user settings
|
|
|
// init ui as per user settings
|
|
|
uDom('#max-logged-requests').val(userSettings.maxLoggedRequests); |
|
|
uDom('#max-logged-requests').val(userSettings.maxLoggedRequests); |
|
|
var statsFilters = userSettings.statsFilters; |
|
|
var statsFilters = userSettings.statsFilters; |
|
|
uDom('input[id^="show-"][type="checkbox"]').toArray().forEach(function() { |
|
|
|
|
|
var input = uDom(this); |
|
|
|
|
|
|
|
|
uDom('input[id^="show-"][type="checkbox"]').toArray().forEach(function(elem) { |
|
|
|
|
|
var input = uDom(elem); |
|
|
var filter = statsFilters[input.attr('id')]; |
|
|
var filter = statsFilters[input.attr('id')]; |
|
|
input.prop('checked', filter === undefined || filter === true); |
|
|
input.prop('checked', filter === undefined || filter === true); |
|
|
}); |
|
|
}); |
|
|