async function confluence_seed_project_list()

in htdocs/js/selfserve.js [321:335]


async function confluence_seed_project_list() {
  // get project name from url parameters
  const qsProject = new URLSearchParams(document.location.search).get('project')
  // Seeds the dropdown with current projects
  const projectlist = document.getElementById('project');
  const pubresp = await GET("/api/public");
  const pubdata = await pubresp.json();
  for (project of pubdata.projects) {
    const opt = document.createElement("option");
    opt.text = project;
    opt.value = project;
    opt.selected = project == qsProject;
    projectlist.appendChild(opt);
  }
}