mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-08 21:38:21 +00:00
Options based on enum values
This commit is contained in:
parent
49a81b47e2
commit
e64a787b01
@ -87,7 +87,7 @@ public class DataExportController {
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION,
|
||||
"attachment; filename=\"export_" + schema.getJavaClass().getSimpleName() + ".xlsx\"")
|
||||
.body(toXlsx(sheetName, results, fields, raw));
|
||||
case JSON:
|
||||
case JSONL:
|
||||
throw new DbAdminException("JSON TODO");
|
||||
default:
|
||||
throw new DbAdminException("Unable to detect export format");
|
||||
|
@ -1,5 +1,5 @@
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
|
||||
public enum DataExportFormat {
|
||||
CSV, XLSX, JSON;
|
||||
CSV, XLSX, JSONL;
|
||||
}
|
||||
|
@ -54,8 +54,9 @@
|
||||
</div>
|
||||
<h5 class="fw-bold mt-3">Export format</h3>
|
||||
<select name="format" class="form-select">
|
||||
<option value="csv">CSV</option>
|
||||
<option value="xlsx">XLSX</option>
|
||||
<option th:each="format : ${T(tech.ailef.dbadmin.external.dto.DataExportFormat).values()}"
|
||||
th:value="${format}" th:text="${format}">
|
||||
</option>
|
||||
</select>
|
||||
<div class="form-check mt-3">
|
||||
<input class="form-check-input" type="checkbox"
|
||||
|
Loading…
x
Reference in New Issue
Block a user