From 486d683cd072aa18cc6b68785d47d77bd9ae4bdb Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 8 May 2022 05:10:49 +0200 Subject: Move temporary availableOs list Signed-off-by: Georg Pfuetzenreuter --- src/main/java/net/libertacasa/pubsh/web/WebApplication.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java index ed517e4..87c4682 100644 --- a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java +++ b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java @@ -35,15 +35,14 @@ public class WebApplication { static ArrayList availableOs = new ArrayList(); - 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("opensuse-leap"); availableOs.add("opensuse-tumbleweed"); - availableOs.add("ubuntu"); - } - - public static void main(String[] args) { - SpringApplication.run(WebApplication.class, args); + availableOs.add("ubuntu"); } @GetMapping("/") @@ -94,7 +93,6 @@ public class WebApplication { model.addAttribute("docker_images", images); model.addAttribute("docker_containers", containers); - genOsList(); model.addAttribute("availableOs", availableOs); return("admin"); @@ -141,7 +139,6 @@ public class WebApplication { model.addAttribute("docker_images", images); model.addAttribute("docker_containers", containers); - genOsList(); model.addAttribute("availableOs", availableOs); return("portal"); -- cgit v1.2.3