(s)
| 717 | } |
| 718 | |
| 719 | function doctorTab(s) { |
| 720 | const d = s.doctor; |
| 721 | if (!d) { |
| 722 | return emptyState( |
| 723 | "Environment readiness", |
| 724 | "Check that your machine has the tools the App Modernization workflow needs — a JDK, your build tool, git, and (optionally) Docker and the Azure CLI. This only reads version numbers; nothing is installed or changed.", |
| 725 | btn("Check my environment", "recheck_env", {}, { primary: true }) |
| 726 | ); |
| 727 | } |
| 728 | const tone = d.overall === "ready" ? "b-green" : d.overall === "caution" ? "b-amber" : "b-red"; |
| 729 | const head = |
| 730 | d.overall === "ready" ? "Your environment is ready" : |
| 731 | d.overall === "caution" ? "Almost ready — a couple of things to check" : |
| 732 | "Not ready yet — resolve the blockers below"; |
| 733 | const sub = |
| 734 | d.overall === "ready" ? "All required tools are installed. You're clear to start modernizing." : |
| 735 | d.overall === "caution" ? "The required tools are present; some optional or recommended items need attention." : |
| 736 | "One or more required tools are missing. Fix these before building the project or running tasks."; |
| 737 | |
| 738 | const notAssessed = d.groups.some((g) => g.checks.some((c) => c.id === "assessed" && c.status !== "ok")); |
| 739 | let heroActions = btn("Re-check environment", "recheck_env", {}, { primary: true }); |
| 740 | if (notAssessed) heroActions += btn("Run assessment", "start_assessment", {}); |
| 741 | |
| 742 | let html = |
| 743 | '<div class="hero"><div class="eyebrow">Environment readiness</div>' + |
| 744 | '<div class="htitle">' + esc(head) + ' <span class="badge ' + tone + '">' + esc(d.overall) + "</span></div>" + |
| 745 | '<div class="hbody">' + esc(sub) + "</div>" + |
| 746 | '<div class="actions">' + heroActions + "</div></div>"; |
| 747 | |
| 748 | d.groups.forEach((g) => { |
| 749 | html += '<div class="card"><h2>' + esc(g.name) + "</h2><ul class=\"checks\">"; |
| 750 | g.checks.forEach((c) => { |
| 751 | html += |
| 752 | '<li class="chk ' + esc(c.status) + '">' + |
| 753 | '<span class="ci">' + checkIcon(c.status) + "</span>" + |
| 754 | '<span class="cbody"><span class="clabel">' + esc(c.label) + "</span>" + |
| 755 | '<span class="cdetail">' + esc(c.detail || "") + "</span>" + |
| 756 | (c.fix ? '<span class="cfix">Fix: ' + esc(c.fix) + "</span>" : "") + |
| 757 | "</span>" + |
| 758 | '<span class="crhs">' + checkAction(c) + "</span></li>"; |
| 759 | }); |
| 760 | html += "</ul></div>"; |
| 761 | }); |
| 762 | |
| 763 | html += '<p class="muted" style="margin:2px 2px 0">Probed locally on your machine — version numbers only. Nothing was installed or modified.</p>'; |
| 764 | return html; |
| 765 | } |
| 766 | |
| 767 | function checkIcon(status) { |
| 768 | if (status === "ok") return "✓"; |
nothing calls this directly
no test coverage detected