/home/techb158/trello.abdallabala.com/public
NameSizeModeActions
assets/-0777rm
.htaccess5330644editdlrm
authorize.html10090666editdlrm
board-dashboard.html7990666editdlrm
board-dashboard.js18510666editdlrm
card-section.html5330666editdlrm
card-section.js19520666editdlrm
client-utils.js15910666editdlrm
index.html5570666editdlrm
index.php71400644editdlrm
powerup.js29410666editdlrm
risk-modal.html54550666editdlrm
risk-modal.js46560666editdlrm
settings.html11130666editdlrm
settings.js10170666editdlrm
styles.css23340666editdlrm
Edit: /home/techb158/trello.abdallabala.com/public/board-dashboard.js (1851B)
import { apiFetch, escapeHtml, powerUpOptions, statusClass } from './client-utils.js'; const t = window.TrelloPowerUp.iframe(powerUpOptions()); const summary = document.getElementById('summary'); const assessmentsNode = document.getElementById('assessments'); function metric(title, value, note = '') { return `

${escapeHtml(title)}

${escapeHtml(value)}

${escapeHtml(note)}

`; } function render(data) { summary.innerHTML = [ metric('Cards assessed', data.cardCount, 'Cards with at least one COSMIC assessment'), metric('Average score', `${data.averageScore}/100`, 'Latest score per card'), metric('Deployment blocked', data.deploymentBlocked, 'Cards failing one or more gate criteria') ].join(''); if (!data.latestAssessments?.length) { assessmentsNode.innerHTML = '

No assessments have been saved for this board yet.

'; return; } assessmentsNode.innerHTML = data.latestAssessments.map((item) => { const score = item.score; return `
Card ${escapeHtml(item.cardId)} ${escapeHtml(score.status)} ${score.score}/100 ${score.gate?.deploymentReady ? 'Gate ready' : 'Gate blocked'}

${escapeHtml(score.interpretation)}

`; }).join(''); } async function load() { const board = await t.board('id', 'name'); const data = await apiFetch(t, `/api/boards/${board.id}/summary`); render(data); } t.render(() => load().catch((error) => { assessmentsNode.innerHTML = `

${escapeHtml(error.message)}

`; }));