bug 512479 - make pending crash reports more identifiable, r?ted
MozReview-Commit-ID: H0c1CC4s3Vw
--- a/toolkit/crashreporter/content/crashes.js
+++ b/toolkit/crashreporter/content/crashes.js
@@ -72,17 +72,16 @@ function populateReportList() {
document.getElementById("clear-reports").style.display = "none";
document.getElementById("reportList").style.display = "none";
document.getElementById("noReports").style.display = "block";
return;
}
var formatter = Cc["@mozilla.org/intl/scriptabledateformat;1"].
createInstance(Ci.nsIScriptableDateFormat);
- var body = document.getElementById("tbody");
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var reportURI = ios.newURI(reportURL, null, null);
// resolving this URI relative to /report/index
var aboutThrottling = ios.newURI("../../about/throttling", null, reportURI);
for (var i = 0; i < reports.length; i++) {
var row = document.createElement("tr");
@@ -112,17 +111,21 @@ function populateReportList() {
cell = document.createElement("td");
var timestr = formatter.FormatTime("",
Ci.nsIScriptableDateFormat.timeFormatNoSeconds,
date.getHours(),
date.getMinutes(),
date.getSeconds());
cell.appendChild(document.createTextNode(timestr));
row.appendChild(cell);
- body.appendChild(row);
+ if (reports[i].pending) {
+ document.getElementById("unsubmitted").appendChild(row);
+ } else {
+ document.getElementById("submitted").appendChild(row);
+ }
}
}
var clearReports = Task.async(function*() {
let bundle = Services.strings.createBundle("chrome://global/locale/crashes.properties");
if (!Services.
prompt.confirm(window,
--- a/toolkit/crashreporter/content/crashes.xhtml
+++ b/toolkit/crashreporter/content/crashes.xhtml
@@ -84,25 +84,40 @@ td:last-child {
<link rel="stylesheet" media="screen, projection" type="text/css"
href="chrome://global/skin/in-content/common.css"/>
<script type="application/javascript;version=1.8" src="chrome://global/content/crashes.js"/>
<title>&crashes.title;</title>
</head><body onload="populateReportList()" dir="&locale.dir;">
<button chromedir="&locale.dir;" id="clear-reports"
onclick="clearReports().then(null, Cu.reportError)">&clearAllReports.label;</button>
-<h1>&crashes.title;</h1>
<div id="reportList">
- <table>
- <thead>
- <tr>
- <th chromedir="&locale.dir;">&id.heading;</th>
- <th chromedir="&locale.dir;" colspan="2">&date.heading;</th>
- </tr>
- </thead>
- <tbody id="tbody">
- </tbody>
- </table>
+ <div id="reportListUnsubmitted">
+ <h1>&crashesUnsubmitted.label;</h1>
+ <table>
+ <thead>
+ <tr>
+ <th chromedir="&locale.dir;">&id.heading;</th>
+ <th chromedir="&locale.dir;" colspan="2">&dateCrashed.heading;</th>
+ </tr>
+ </thead>
+ <tbody id="unsubmitted">
+ </tbody>
+ </table>
+ </div>
+ <div id="reportListSubmitted">
+ <h1>&crashesSubmitted.label;</h1>
+ <table>
+ <thead>
+ <tr>
+ <th chromedir="&locale.dir;">&id.heading;</th>
+ <th chromedir="&locale.dir;" colspan="2">&dateSubmitted.heading;</th>
+ </tr>
+ </thead>
+ <tbody id="submitted">
+ </tbody>
+ </table>
+ </div>
</div>
<p id="noReports" style="display: none">&noReports.label;</p>
<p id="noConfig" style="display: none">&noConfig.label;</p>
</body>
</html>
--- a/toolkit/locales/en-US/crashreporter/crashes.dtd
+++ b/toolkit/locales/en-US/crashreporter/crashes.dtd
@@ -1,11 +1,14 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<!ENTITY crashes.title "Submitted Crash Reports">
+<!ENTITY crashes.title "Crash Reports">
+<!ENTITY crashesUnsubmitted.label "Unsubmitted Crash Reports">
+<!ENTITY crashesSubmitted.label "Submitted Crash Reports">
<!ENTITY id.heading "Report ID">
-<!ENTITY date.heading "Date Submitted">
+<!ENTITY dateCrashed.heading "Date Crashed">
+<!ENTITY dateSubmitted.heading "Date Submitted">
<!ENTITY noReports.label "No crash reports have been submitted.">
<!ENTITY noConfig.label "This application has not been configured to display crash reports. The preference <code>breakpad.reportURL</code> must be set.">
<!ENTITY clearAllReports.label "Remove All Reports">