CR + Tooltips + Promedios
This commit is contained in:
@@ -70,6 +70,7 @@ async function loadAndRender(forceRefresh = false) {
|
||||
|
||||
renderCurrentSection();
|
||||
renderHistorySection();
|
||||
renderCRSection();
|
||||
renderQASection();
|
||||
|
||||
} catch(e) {
|
||||
@@ -280,6 +281,17 @@ function renderHistorySection() {
|
||||
});
|
||||
}
|
||||
|
||||
// Delivery KPIs
|
||||
if (data.deliveryData) {
|
||||
const { avgLeadTime, avgCycleTime, spOriginal, spFinal, spDeviationPct } = data.deliveryData;
|
||||
document.getElementById('kpi-lead-time').textContent = avgLeadTime;
|
||||
document.getElementById('kpi-cycle-time').textContent = avgCycleTime;
|
||||
|
||||
const deviationPrefix = spDeviationPct > 0 ? '+' : '';
|
||||
document.getElementById('kpi-sp-deviation').textContent = `${deviationPrefix}${spDeviationPct}%`;
|
||||
document.getElementById('kpi-sp-deviation-sub').textContent = `${spOriginal} orig. → ${spFinal} fin.`;
|
||||
}
|
||||
|
||||
// Gráfico de Velocidad Mensual
|
||||
const months = Object.keys(data.monthlyDone).sort();
|
||||
const allDevsInHistory = [...new Set(months.flatMap(m => Object.keys(data.monthlyDone[m])))];
|
||||
@@ -294,6 +306,34 @@ function renderHistorySection() {
|
||||
})), { plugins:{ legend:{ position:'bottom'} }, scales:{ x:{stacked:true,grid:{display:false}}, y:{stacked:true} } });
|
||||
}
|
||||
|
||||
// ── CODE REVIEW SECTION ────────────────────────────────────────────────────
|
||||
function renderCRSection() {
|
||||
const data = api.data;
|
||||
if (!data || !data.crData) return;
|
||||
|
||||
const cr = data.crData;
|
||||
|
||||
document.getElementById('kpi-cr-tickets').textContent = cr.tickets ?? '—';
|
||||
document.getElementById('kpi-cr-avg').textContent = cr.avgTimeCr != null ? cr.avgTimeCr + 'hs' : '—';
|
||||
document.getElementById('kpi-cr-stalled').textContent = (cr.stalledIssues?.length) || '0';
|
||||
|
||||
const crMonths = Object.keys(cr.monthlyAvgCr || {}).sort();
|
||||
chartsManager.drawLineChart(
|
||||
'crMonthly', 'chartCrMonthly',
|
||||
crMonths,
|
||||
[{
|
||||
label: 'Prom. tiempo en CR (hs)',
|
||||
data: crMonths.map(m => cr.monthlyAvgCr[m] || 0),
|
||||
borderColor: '#00b8d9',
|
||||
backgroundColor: 'rgba(0,184,217,.12)',
|
||||
fill: true,
|
||||
pointBackgroundColor: '#00b8d9',
|
||||
borderWidth: 2,
|
||||
}],
|
||||
{ plugins:{ legend:{ display:false } }, scales:{ x:{grid:{display:false}}, y:{ beginAtZero:true } } }
|
||||
);
|
||||
}
|
||||
|
||||
// ── QA SECTION ─────────────────────────────────────────────────────────────
|
||||
function renderQASection() {
|
||||
const data = api.data;
|
||||
@@ -379,7 +419,8 @@ function renderQASection() {
|
||||
return;
|
||||
}
|
||||
|
||||
sorted.forEach(i => {
|
||||
const top5 = sorted.slice(0, 5);
|
||||
top5.forEach(i => {
|
||||
const isCritical = i.timeQa > 4;
|
||||
const isReturned = i.timesReturned > 1;
|
||||
const jiraUrl = `https://${host}/browse/${i.key}`;
|
||||
|
||||
Reference in New Issue
Block a user