(x, ord)
| 475 | } |
| 476 | |
| 477 | function findingActions(x, ord) { |
| 478 | const act = x.action; |
| 479 | if (isFindingLocked(x, ord)) { |
| 480 | const why = '<span class="smuted lockwhy">🔒 fix ' + esc(shortPhase(ord.activePhase)) + " issues first</span>"; |
| 481 | if (act && act.kind && act.kind !== "fix_finding") { |
| 482 | return why + btn(act.label || "Run this step", act.kind, act.payload || {}) + btn("Help me fix this", "fix_finding", findingCtx(x)); |
| 483 | } |
| 484 | return why + btn((act && act.label) || "Help me fix this", "fix_finding", findingCtx(x)); |
| 485 | } |
| 486 | if (act && act.kind && act.kind !== "fix_finding") { |
| 487 | return btn(act.label || "Run this step", act.kind, act.payload || {}, { primary: true }) + btn("Help me fix this", "fix_finding", findingCtx(x)); |
| 488 | } |
| 489 | return btn((act && act.label) || "Help me fix this", "fix_finding", findingCtx(x), { primary: true }); |
| 490 | } |
| 491 | |
| 492 | function findingCtx(x) { |
| 493 | return { title: x.title, detail: x.detail, files: x.files, severity: x.severity }; |
no test coverage detected