Nuevos graficos

This commit is contained in:
kvilches1410
2026-04-04 00:35:55 -03:00
parent a2d49b441e
commit c8806a6701
5 changed files with 316 additions and 395 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
/**
* js/api.js
* Centraliza la comunicación con el Backend (Vercel Serverless Function)
* Centraliza la comunicación con el Backend (Netlify Functions)
*/
export const api = {
@@ -11,6 +11,7 @@ export const api = {
* @param {boolean} forceRefresh - Forzar bypassing de la caché del backend
*/
async fetchDashboardData(forceRefresh = false, period = '90d') {
// Para Netlify Functions + Redirección en netlify.toml
let url = `/api/data?period=${period}`;
if (forceRefresh) url += '&refresh=1';
@@ -28,4 +29,4 @@ export const api = {
throw e;
}
}
};
};
+2 -1
View File
@@ -125,11 +125,12 @@ function renderHealthWarnings(warnings = []) {
list.innerHTML = warnings.map(w => {
let text = '';
let badge = w.type;
const link = `<a href="${getJiraUrl(w.key)}" target="_blank" class="jira-link">${w.key}</a>`;
const link = w.key ? `<a href="${getJiraUrl(w.key)}" target="_blank" class="jira-link">${w.key}</a>` : '';
if(w.type === 'stalled') { badge = 'ESTANCADO'; text = `🎟️ [${link}] ${w.summary.slice(0,50)}... (${w.devs.join(', ')})`; }
if(w.type === 'done_no_sp') { badge = 'SIN SP'; text = `🎟️ [${link}] ${w.summary.slice(0,50)}... (Completado sin estimación)`; }
if(w.type === 'unassigned_sp') { badge = 'HUÉRFANO'; text = `🎟️ [${link}] ${w.summary.slice(0,50)}... (${w.sp} SP sin dueño)`; }
if(w.type === 'free_dev') { badge = 'DEV LIBRE'; text = `👤 ${w.summary}`; }
return `<li class="warning-item" title="${w.summary}"><span class="badge" style="width:90px;text-align:center;">${badge}</span> <span class="title" style="font-size:11px;">${text}</span></li>`;
}).join('');