mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 981842 - Show details about current and past teleemtry experiments in about:support, r=bsmedberg
This commit is contained in:
parent
41fe25a964
commit
8d8727e145
@ -111,6 +111,21 @@ let snapshotFormatters = {
|
||||
}));
|
||||
},
|
||||
|
||||
experiments: function experiments(data) {
|
||||
$.append($("experiments-tbody"), data.map(function (experiment) {
|
||||
return $.new("tr", [
|
||||
$.new("td", experiment.name),
|
||||
$.new("td", experiment.id),
|
||||
$.new("td", experiment.description),
|
||||
$.new("td", experiment.active),
|
||||
$.new("td", experiment.endDate),
|
||||
$.new("td", [
|
||||
$.new("a", experiment.detailURL, null, {href : experiment.detailURL,})
|
||||
]),
|
||||
]);
|
||||
}));
|
||||
},
|
||||
|
||||
modifiedPreferences: function modifiedPreferences(data) {
|
||||
$.append($("prefs-tbody"), sortedArrayFromObject(data).map(
|
||||
function ([name, value]) {
|
||||
|
@ -317,6 +317,39 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 class="major-section">
|
||||
&aboutSupport.experimentsTitle;
|
||||
</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
&aboutSupport.experimentName;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.experimentId;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.experimentDescription;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.experimentActive;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.experimentEndDate;
|
||||
</th>
|
||||
<th>
|
||||
&aboutSupport.experimentHomepage;
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="experiments-tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@ -15,6 +15,13 @@ Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/CrashReports.jsm");
|
||||
#endif
|
||||
|
||||
let Experiments;
|
||||
try {
|
||||
Experiments = Cu.import("resource:///modules/experiments/Experiments.jsm").Experiments;
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
// We use a preferences whitelist to make sure we only show preferences that
|
||||
// are useful for support and won't compromise the user's privacy. Note that
|
||||
// entries are *prefixes*: for example, "accessibility." applies to all prefs
|
||||
@ -174,6 +181,18 @@ let dataProviders = {
|
||||
});
|
||||
},
|
||||
|
||||
experiments: function experiments(done) {
|
||||
if (Experiments === undefined) {
|
||||
done([]);
|
||||
return;
|
||||
}
|
||||
|
||||
// getExperiments promises experiment history
|
||||
Experiments.instance().getExperiments().then(
|
||||
experiments => done(experiments)
|
||||
);
|
||||
},
|
||||
|
||||
modifiedPreferences: function modifiedPreferences(done) {
|
||||
function getPref(name) {
|
||||
let table = {};
|
||||
|
Loading…
Reference in New Issue
Block a user