From 85004d547c82deaeacbd4f6af685efa1bf13e9b7 Mon Sep 17 00:00:00 2001 From: Cyril Dubuisson Date: Sun, 16 Feb 2020 13:06:54 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20:=20deactivate=20mvc=20controlle?= =?UTF-8?q?rs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/codeka/gaia/config/security/SecurityConfig.java | 2 +- .../gaia/dashboard/controller/IndexController.java | 2 +- .../codeka/gaia/login/controller/LoginController.java | 2 +- .../gaia/modules/controller/ModulesMVCController.java | 8 ++++---- .../gaia/settings/controller/SettingsController.java | 2 +- .../codeka/gaia/stacks/controller/StackController.java | 10 +++++----- .../gaia/teams/controller/UsersMVCController.java | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/io/codeka/gaia/config/security/SecurityConfig.java b/src/main/java/io/codeka/gaia/config/security/SecurityConfig.java index 6626f22bd..df6acf34c 100644 --- a/src/main/java/io/codeka/gaia/config/security/SecurityConfig.java +++ b/src/main/java/io/codeka/gaia/config/security/SecurityConfig.java @@ -39,7 +39,7 @@ protected void configure(HttpSecurity http) throws Exception { .antMatchers("/css/**", "/js/**", "/favicon.ico", "/images/**").permitAll() .antMatchers("/**").authenticated() .and() - .formLogin().loginPage("/login").successHandler(successHandler).permitAll() + .formLogin().successHandler(successHandler).permitAll() .and() .logout().permitAll(); } diff --git a/src/main/java/io/codeka/gaia/dashboard/controller/IndexController.java b/src/main/java/io/codeka/gaia/dashboard/controller/IndexController.java index da8e4fa0a..17818624a 100644 --- a/src/main/java/io/codeka/gaia/dashboard/controller/IndexController.java +++ b/src/main/java/io/codeka/gaia/dashboard/controller/IndexController.java @@ -21,7 +21,7 @@ public IndexController(TerraformModuleRepository moduleRepository, StackReposito this.stackRepository = stackRepository; } - @GetMapping("/") +// @GetMapping("/") public String index(Model model, User user, Team userTeam){ long moduleCount = 0; long runningStackCount = 0; diff --git a/src/main/java/io/codeka/gaia/login/controller/LoginController.java b/src/main/java/io/codeka/gaia/login/controller/LoginController.java index cea606d4c..b89f8231d 100644 --- a/src/main/java/io/codeka/gaia/login/controller/LoginController.java +++ b/src/main/java/io/codeka/gaia/login/controller/LoginController.java @@ -16,7 +16,7 @@ public void setOAuth2ClientProperties(OAuth2ClientProperties oAuth2ClientPropert this.oAuth2ClientProperties = oAuth2ClientProperties; } - @GetMapping("/login") +// @GetMapping("/login") public String login(Model model) { if (oAuth2ClientProperties != null) { model.addAttribute("clients", oAuth2ClientProperties.getRegistration().keySet()); diff --git a/src/main/java/io/codeka/gaia/modules/controller/ModulesMVCController.java b/src/main/java/io/codeka/gaia/modules/controller/ModulesMVCController.java index ada6efa74..6a5dcd034 100644 --- a/src/main/java/io/codeka/gaia/modules/controller/ModulesMVCController.java +++ b/src/main/java/io/codeka/gaia/modules/controller/ModulesMVCController.java @@ -30,17 +30,17 @@ public ModulesMVCController( this.terraformModuleGitRepository = terraformModuleGitRepository; } - @GetMapping("/modules") +// @GetMapping("/modules") public String modulesList(){ return "modules"; } - @GetMapping("/modules/import") +// @GetMapping("/modules/import") public String importModule() { return "modules_import"; } - @GetMapping("/modules/{id}") +// @GetMapping("/modules/{id}") public String module(@PathVariable String id, Model model, User user){ var module = terraformModuleRepository.findById(id).orElseThrow(ModuleNotFoundException::new); if(!module.isAuthorizedFor(user)){ @@ -50,7 +50,7 @@ public String module(@PathVariable String id, Model model, User user){ return "module"; } - @GetMapping("/modules/{id}/description") +// @GetMapping("/modules/{id}/description") public String description(@PathVariable String id, Model model) { model.addAttribute("module", terraformModuleRepository.findById(id).orElseThrow()); return "module_description"; diff --git a/src/main/java/io/codeka/gaia/settings/controller/SettingsController.java b/src/main/java/io/codeka/gaia/settings/controller/SettingsController.java index 56fc1fb9f..e34e2ee8e 100644 --- a/src/main/java/io/codeka/gaia/settings/controller/SettingsController.java +++ b/src/main/java/io/codeka/gaia/settings/controller/SettingsController.java @@ -27,7 +27,7 @@ public SettingsController(Settings settings, SettingsRepository settingsReposito this.settingsRepository = settingsRepository; } - @GetMapping("/settings") +// @GetMapping("/settings") public String settings(Model model){ model.addAttribute("settings", settings); diff --git a/src/main/java/io/codeka/gaia/stacks/controller/StackController.java b/src/main/java/io/codeka/gaia/stacks/controller/StackController.java index 103c07df6..c0ee5d332 100644 --- a/src/main/java/io/codeka/gaia/stacks/controller/StackController.java +++ b/src/main/java/io/codeka/gaia/stacks/controller/StackController.java @@ -33,18 +33,18 @@ public StackController(StackRepository stackRepository, StackRunner stackRunner, this.jobRepository = jobRepository; } - @GetMapping("/modules/{moduleId}/run") +// @GetMapping("/modules/{moduleId}/run") public String newStack(@PathVariable String moduleId, Model model) { model.addAttribute("moduleId", moduleId); return "new_stack"; } - @GetMapping("/stacks") +// @GetMapping("/stacks") public String listStacks() { return "stacks"; } - @GetMapping("/stacks/{stackId}") +// @GetMapping("/stacks/{stackId}") public String editStack(@PathVariable String stackId, Model model) { // checking if the stack exists // TODO throw an exception (404) if not @@ -54,7 +54,7 @@ public String editStack(@PathVariable String stackId, Model model) { return "stack"; } - @GetMapping("/stacks/{stackId}/{jobType}") +// @GetMapping("/stacks/{stackId}/{jobType}") public String launchJob(@PathVariable String stackId, @PathVariable JobType jobType, Model model, User user) { // get the stack var stack = this.stackRepository.findById(stackId).orElseThrow(StackNotFoundException::new); @@ -72,7 +72,7 @@ public String launchJob(@PathVariable String stackId, @PathVariable JobType jobT return "job"; } - @GetMapping("/stacks/{stackId}/jobs/{jobId}") +// @GetMapping("/stacks/{stackId}/jobs/{jobId}") public String viewJob(@PathVariable String stackId, @PathVariable String jobId, Model model) { // checking if the stack exists // TODO throw an exception (404) if not diff --git a/src/main/java/io/codeka/gaia/teams/controller/UsersMVCController.java b/src/main/java/io/codeka/gaia/teams/controller/UsersMVCController.java index 263ac1652..8e52e6c64 100644 --- a/src/main/java/io/codeka/gaia/teams/controller/UsersMVCController.java +++ b/src/main/java/io/codeka/gaia/teams/controller/UsersMVCController.java @@ -8,7 +8,7 @@ @Secured("ROLE_ADMIN") public class UsersMVCController { - @GetMapping("/users") +// @GetMapping("/users") public String users(){ return "users"; }