Move temporary availableOs list

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2022-05-08 05:10:49 +02:00
parent 8b21823002
commit 486d683cd0
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -35,17 +35,16 @@ public class WebApplication {
static ArrayList<String> availableOs = new ArrayList<String>(); static ArrayList<String> availableOs = new ArrayList<String>();
private void genOsList() { public static void main(String[] args) {
SpringApplication.run(WebApplication.class, args);
//to-do: move this to some config file or database
availableOs.add("archlinux"); availableOs.add("archlinux");
availableOs.add("opensuse-leap"); availableOs.add("opensuse-leap");
availableOs.add("opensuse-tumbleweed"); availableOs.add("opensuse-tumbleweed");
availableOs.add("ubuntu"); availableOs.add("ubuntu");
} }
public static void main(String[] args) {
SpringApplication.run(WebApplication.class, args);
}
@GetMapping("/") @GetMapping("/")
public String index() { public String index() {
return "external"; return "external";
@ -94,7 +93,6 @@ public class WebApplication {
model.addAttribute("docker_images", images); model.addAttribute("docker_images", images);
model.addAttribute("docker_containers", containers); model.addAttribute("docker_containers", containers);
genOsList();
model.addAttribute("availableOs", availableOs); model.addAttribute("availableOs", availableOs);
return("admin"); return("admin");
@ -141,7 +139,6 @@ public class WebApplication {
model.addAttribute("docker_images", images); model.addAttribute("docker_images", images);
model.addAttribute("docker_containers", containers); model.addAttribute("docker_containers", containers);
genOsList();
model.addAttribute("availableOs", availableOs); model.addAttribute("availableOs", availableOs);
return("portal"); return("portal");