Class DefaultDbAdminController

java.lang.Object
tech.ailef.dbadmin.external.controller.DefaultDbAdminController

@Controller @RequestMapping({"/${dbadmin.baseUrl}","/${dbadmin.baseUrl}/"}) public class DefaultDbAdminController extends Object
The main DbAdmin controller that register most of the routes of the web interface.
  • Constructor Details

    • DefaultDbAdminController

      public DefaultDbAdminController()
  • Method Details

    • index

      @GetMapping public String index(org.springframework.ui.Model model, @RequestParam(required=false) String query)
      Home page with list of schemas
      Parameters:
      model -
      query -
      Returns:
    • list

      @GetMapping("/model/{className}") public String list(org.springframework.ui.Model model, @PathVariable String className, @RequestParam(required=false) Integer page, @RequestParam(required=false) String query, @RequestParam(required=false) Integer pageSize, @RequestParam(required=false) String sortKey, @RequestParam(required=false) String sortOrder, @RequestParam org.springframework.util.MultiValueMap<String,String> otherParams, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Lists the items of a schema by applying a variety of filters: - query: fuzzy search - otherParams: filterable fields Includes pagination and sorting options.
      Parameters:
      model -
      className -
      page -
      query -
      pageSize -
      sortKey -
      sortOrder -
      otherParams -
      request -
      response -
      Returns:
    • schema

      @GetMapping("/model/{className}/schema") public String schema(org.springframework.ui.Model model, @PathVariable String className)
      Displays information about the schema
      Parameters:
      model -
      className -
      Returns:
    • show

      @GetMapping("/model/{className}/show/{id}") public String show(org.springframework.ui.Model model, @PathVariable String className, @PathVariable String id)
      Shows a single item
      Parameters:
      model -
      className -
      id -
      Returns:
    • create

      @GetMapping("/model/{className}/create") public String create(org.springframework.ui.Model model, @PathVariable String className, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
    • edit

      @GetMapping("/model/{className}/edit/{id}") public String edit(org.springframework.ui.Model model, @PathVariable String className, @PathVariable String id, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
    • delete

      @PostMapping("/model/{className}/delete/{id}") public String delete(@PathVariable String className, @PathVariable String id, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
    • delete

      @PostMapping("/model/{className}/delete") public String delete(@PathVariable String className, @RequestParam String[] ids, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
    • store

      @PostMapping("/model/{className}/create") public String store(@PathVariable String className, @RequestParam org.springframework.util.MultiValueMap<String,String> formParams, @RequestParam Map<String,org.springframework.web.multipart.MultipartFile> files, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
    • logs

      @GetMapping("/logs") public String logs(org.springframework.ui.Model model, LogsSearchRequest searchRequest)
    • settings

      @GetMapping("/settings") public String settings(org.springframework.ui.Model model)
    • about

      @GetMapping("/help") public String about(org.springframework.ui.Model model)
    • settingsAppearance

      @GetMapping("/settings/appearance") public String settingsAppearance(org.springframework.ui.Model model)
    • settings

      @PostMapping("/settings") public String settings(@RequestParam Map<String,String> params, org.springframework.ui.Model model)