"19.07.1": "../misc/19.07.1/overview.json",
"18.06.7": "../misc/18.06.7/overview.json",
},
+ // Pre-selected version
+ //default_version: "19.07.1",
// Build custom images
// See https://github.com/aparcar/asu
//asu_url: 'https://chef.libremesh.org'
}
function setupSelectList(select, items, onselection) {
- for (const item of items) {
+ for (const item of items.sort().reverse()) {
const option = document.createElement("OPTION");
option.innerHTML = item;
select.appendChild(option);
}
+ // pre-select version from config.json
+ const preselect = config.default_version;
+ if (preselect) {
+ $("#versions").value = preselect;
+ }
+
select.addEventListener("change", () => {
onselection(items[select.selectedIndex]);
});