Show number of reports and estimated number of users in the dashboard
This commit is contained in:
Родитель
679572dadd
Коммит
eae3539da6
|
@ -41,6 +41,8 @@
|
||||||
<table id="table">
|
<table id="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Rank</th>
|
<th>Rank</th>
|
||||||
|
<th>Users</th>
|
||||||
|
<th>Reports</th>
|
||||||
<th>Signature</th>
|
<th>Signature</th>
|
||||||
<th>Bug(s)</th>
|
<th>Bug(s)</th>
|
||||||
<th>Evolution</th>
|
<th>Evolution</th>
|
||||||
|
|
14
dashboard.js
14
dashboard.js
|
@ -198,7 +198,13 @@ function addRow(signature, obj) {
|
||||||
let rank = row.insertCell(0);
|
let rank = row.insertCell(0);
|
||||||
rank.appendChild(document.createTextNode(obj.tc_rank));
|
rank.appendChild(document.createTextNode(obj.tc_rank));
|
||||||
|
|
||||||
let key = row.insertCell(1);
|
let usersVolume = row.insertCell(1);
|
||||||
|
usersVolume.appendChild(document.createTextNode(obj.estimated_user_count));
|
||||||
|
|
||||||
|
let reportsVolume = row.insertCell(2);
|
||||||
|
reportsVolume.appendChild(document.createTextNode(obj.crash_count));
|
||||||
|
|
||||||
|
let key = row.insertCell(3);
|
||||||
|
|
||||||
let startupImage = document.createElement('img');
|
let startupImage = document.createElement('img');
|
||||||
startupImage.title = (obj.startup_percent * 100).toFixed(2) + ' %';
|
startupImage.title = (obj.startup_percent * 100).toFixed(2) + ' %';
|
||||||
|
@ -232,7 +238,7 @@ function addRow(signature, obj) {
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
let three_days_ago = new Date().setDate(today.getDate() - 3);
|
let three_days_ago = new Date().setDate(today.getDate() - 3);
|
||||||
let ten_days_ago = new Date().setDate(today.getDate() - 10);
|
let ten_days_ago = new Date().setDate(today.getDate() - 10);
|
||||||
let bugs = row.insertCell(2);
|
let bugs = row.insertCell(4);
|
||||||
obj.bugs
|
obj.bugs
|
||||||
.sort((bug1, bug2) => new Date(bug2.last_change_time) - new Date(bug1.last_change_time))
|
.sort((bug1, bug2) => new Date(bug2.last_change_time) - new Date(bug1.last_change_time))
|
||||||
.forEach(function(bug) {
|
.forEach(function(bug) {
|
||||||
|
@ -281,12 +287,12 @@ function addRow(signature, obj) {
|
||||||
bugs.appendChild(document.createElement('br'));
|
bugs.appendChild(document.createElement('br'));
|
||||||
});
|
});
|
||||||
|
|
||||||
let graph = row.insertCell(3);
|
let graph = row.insertCell(5);
|
||||||
|
|
||||||
let svgElem = document.createElementNS(d3.ns.prefix.svg, 'svg');
|
let svgElem = document.createElementNS(d3.ns.prefix.svg, 'svg');
|
||||||
|
|
||||||
let margin = { top: 20, right: 20, bottom: 30, left: 50 };
|
let margin = { top: 20, right: 20, bottom: 30, left: 50 };
|
||||||
let width = 700;
|
let width = 500;
|
||||||
let height = 200;
|
let height = 200;
|
||||||
|
|
||||||
if (getOption('graphType') === 'Crashes per usage hours') {
|
if (getOption('graphType') === 'Crashes per usage hours') {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче