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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabout(org.springframework.ui.Model model) console()consoleDelete(String queryId, org.springframework.ui.Model model) consoleNew(org.springframework.ui.Model model) consoleRun(org.springframework.ui.Model model, String query, String queryTitle, Integer page, Integer pageSize, String queryId) create(org.springframework.ui.Model model, String className, org.springframework.web.servlet.mvc.support.RedirectAttributes attr) delete(String className, String[] ids, org.springframework.web.servlet.mvc.support.RedirectAttributes attr) delete(String className, String id, org.springframework.web.servlet.mvc.support.RedirectAttributes attr) edit(org.springframework.ui.Model model, String className, String id, org.springframework.web.servlet.mvc.support.RedirectAttributes attr) Home page with list of schemaslist(org.springframework.ui.Model model, String className, Integer page, String query, Integer pageSize, String sortKey, String sortOrder, 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.logs(org.springframework.ui.Model model, LogsSearchRequest searchRequest) Displays information about the schemasettings(org.springframework.ui.Model model) settingsAppearance(org.springframework.ui.Model model) Shows a single itemstore(String className, org.springframework.util.MultiValueMap<String, String> formParams, Map<String, org.springframework.web.multipart.MultipartFile> files, org.springframework.web.servlet.mvc.support.RedirectAttributes attr)
-
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
-
edit
-
delete
-
delete
-
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
-
about
-
consoleNew
-
console
-
consoleDelete
-
consoleRun
@GetMapping("/console/run/{queryId}") public String consoleRun(org.springframework.ui.Model model, @RequestParam(required=false) String query, @RequestParam(required=false) String queryTitle, @RequestParam(required=false) Integer page, @RequestParam(required=false) Integer pageSize, @PathVariable String queryId) -
settingsAppearance
@GetMapping("/settings/appearance") public String settingsAppearance(org.springframework.ui.Model model) -
settings
-