Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: issue-reporter.js

Issue 29587637: Issue 5891 - Add missing subscription information to issue reporter (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Oct. 24, 2017, 12:40 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | messageResponder.js » ('j') | messageResponder.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: issue-reporter.js
===================================================================
--- a/issue-reporter.js
+++ b/issue-reporter.js
@@ -179,35 +179,55 @@ function retrieveTabURL(tabId)
});
}
function retrieveSubscriptions()
{
return browser.runtime.sendMessage({
type: "subscriptions.get",
ignoreDisabled: true,
- downloadable: true
+ downloadable: true,
+ disabledFilters: true
}).then(subscriptions =>
{
let element = reportData.createElement("subscriptions");
for (let subscription of subscriptions)
{
if (!/^(http|https|ftp):/.test(subscription.url))
continue;
let now = Math.round(Date.now() / 1000);
let subscriptionElement = reportData.createElement("subscription");
subscriptionElement.setAttribute("id", subscription.url);
+ if (subscription.version)
+ subscriptionElement.setAttribute("version", subscription.version);
if (subscription.lastDownload)
{
subscriptionElement.setAttribute("lastDownloadAttempt",
subscription.lastDownload - now);
}
+ if (subscription.lastSuccess)
+ {
+ subscriptionElement.setAttribute("lastDownloadSuccess",
+ subscription.lastSuccess - now);
+ }
+ if (subscription.softExpiration)
+ {
+ subscriptionElement.setAttribute("softExpiration",
+ subscription.softExpiration - now);
+ }
+ if (subscription.expires)
+ {
+ subscriptionElement.setAttribute("hardExpiration",
+ subscription.expires - now);
+ }
subscriptionElement.setAttribute("downloadStatus",
subscription.downloadStatus);
+ subscriptionElement.setAttribute("disabledFilters",
+ subscription.disabledFilters.length);
element.appendChild(subscriptionElement);
}
reportData.documentElement.appendChild(element);
});
}
function initDataCollector()
{
« no previous file with comments | « no previous file | messageResponder.js » ('j') | messageResponder.js » ('J')

Powered by Google App Engine
This is Rietveld