function search_page()

in htdocs/js/boxer.js [408:474]


function search_page(canvas, query) {
    canvas.innerHTML = "";
    let header = h1("User search");
    canvas.appendChild(header);
    let inp = document.createElement('input');
    inp.setAttribute('placeholder', "Enter an Apache or GitHub ID");
    inp.value = query;
    canvas.appendChild(inp);
    let table = document.createElement('table');
    table.setAttribute('class', 'striped');

    let tr = document.createElement('tr');
    let th;
    th = document.createElement('th');
    th.innerText = "Apache ID";
    tr.appendChild(th);
    th = document.createElement('th');
    th.innerText = "GitHub ID";
    tr.appendChild(th);
    th = document.createElement('th');
    th.innerText = "MFA";
    tr.appendChild(th);
    th = document.createElement('th');
    th.innerText = "Repos";
    tr.appendChild(th);
    th = document.createElement('th');
    th.innerText = "Status";
    tr.appendChild(th);
    th = document.createElement('th');
    th.innerText = "Actions";
    tr.appendChild(th);
    table.appendChild(tr);
    let results = document.createElement('tbody');
    table.appendChild(results);
    canvas.appendChild(table);
    inp.addEventListener('keyup', (x) => search_result(results, x.target.value));
    if (query && query.length) {
        search_result(results, query);
    }

    let p = document.createElement('p');
    p.innerText = "Detailed debugging help:";
    canvas.appendChild(p);
    let ul = document.createElement('ul');
    ul.setAttribute('class', 'striped');
    ul.style.maxWidth = "800px";
    let li;

    li = document.createElement('li');
    li.innerText = "[0] Accounts linked: All is good, nothing to do here.";
    ul.append(li);

    li = document.createElement('li');
    li.innerText = "[1] Not authed on GitHub: The user exists in LDAP, but has not used the Boxer app to authenticate with GitHub yet (so we don't know their GitHub login). To fix, the user should use boxer to authenticate with GitHub and follow the remaining steps.";
    ul.append(li);

    li = document.createElement('li');
    li.innerText = `[2] Not part of GiHub org: The user has completed the ASF and GitHub OAuth steps, but have not been invited to the ASF GitHub organization yet, or have not accepted the invitation. User should check https://github.com/orgs/${gh_org}/invitation for a pending invite, or follow the boxer guide to sending an invitation.`;
    ul.append(li);

    li = document.createElement('li');
    li.innerText = "[3] MFA not enabled: The user is a part of the Apache GitHub organization, but has not enabled Multi-Factor Authentication yet. This is a required step in order to gain write-access.";
    ul.append(li);

    canvas.appendChild(ul);

}