MCPcopy
hub / github.com/github/awesome-copilot / findingCard

Function findingCard

extensions/java-modernization-studio/renderer.mjs:455–465  ·  view source on GitHub ↗
(x, ord)

Source from the content-addressed store, hash-verified

453 }
454
455 function findingCard(x, ord) {
456 const locked = isFindingLocked(x, ord);
457 let h = '<div class="finding sev-' + esc(x.severity || "P3") + (locked ? " locked" : "") + '">';
458 h += '<div class="ftitle"><span class="badge ' + sevBadgeClass(x.severity) + '">' + esc(x.severity || "—") + "</span>" + esc(x.title) + "</div>";
459 if (x.detail) h += '<div class="fdetail">' + esc(x.detail) + "</div>";
460 if (x.files && x.files.length) {
461 h += '<div class="ffiles">' + x.files.map((p) => "<code>" + esc(p) + "</code>").join("") + "</div>";
462 }
463 h += '<div class="actions">' + findingActions(x, ord) + "</div>";
464 return h + "</div>";
465 }
466
467 function sevRank(sev) {
468 const m = { P0: 1, P1: 2, P2: 3, P3: 4 };

Callers 1

assessmentTabFunction · 0.85

Calls 4

isFindingLockedFunction · 0.85
escFunction · 0.85
sevBadgeClassFunction · 0.85
findingActionsFunction · 0.85

Tested by

no test coverage detected