mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-09 05:48:20 +00:00
Minor changes
This commit is contained in:
parent
e07ae2e8f4
commit
e06422c105
@ -87,8 +87,6 @@ public class DataExportController {
|
|||||||
.header(HttpHeaders.CONTENT_DISPOSITION,
|
.header(HttpHeaders.CONTENT_DISPOSITION,
|
||||||
"attachment; filename=\"export_" + schema.getJavaClass().getSimpleName() + ".xlsx\"")
|
"attachment; filename=\"export_" + schema.getJavaClass().getSimpleName() + ".xlsx\"")
|
||||||
.body(toXlsx(sheetName, results, fields, raw));
|
.body(toXlsx(sheetName, results, fields, raw));
|
||||||
case JSONL:
|
|
||||||
throw new DbAdminException("JSON TODO");
|
|
||||||
default:
|
default:
|
||||||
throw new DbAdminException("Unable to detect export format");
|
throw new DbAdminException("Unable to detect export format");
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package tech.ailef.dbadmin.external.dto;
|
package tech.ailef.dbadmin.external.dto;
|
||||||
|
|
||||||
public enum DataExportFormat {
|
public enum DataExportFormat {
|
||||||
CSV, XLSX, JSONL;
|
CSV,
|
||||||
|
XLSX;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="csvExportModal" tabindex="-1" aria-labelledby="csvExportModalLabel" aria-hidden="true">
|
<div class="modal modal-lg fade" id="csvExportModal" tabindex="-1" aria-labelledby="csvExportModalLabel" aria-hidden="true">
|
||||||
<form th:action="|/${dbadmin_baseUrl}/export/${schema.getClassName()}|" method="GET">
|
<form th:action="|/${dbadmin_baseUrl}/export/${schema.getClassName()}|" method="GET">
|
||||||
<input type="hidden" name="query" th:value="${query}">
|
<input type="hidden" name="query" th:value="${query}">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
@ -65,6 +65,11 @@
|
|||||||
<label class="form-check-label" for="__check_raw">
|
<label class="form-check-label" for="__check_raw">
|
||||||
Export raw values
|
Export raw values
|
||||||
</label>
|
</label>
|
||||||
|
<p class="text-muted">
|
||||||
|
Whether to export the raw values as they appear in the database table
|
||||||
|
or to perform the default processing (e.g., formatting and foreign key
|
||||||
|
resolution) and export what you see with the web interface.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -136,7 +141,7 @@
|
|||||||
[[ ${schema.getTableName()} ]]
|
[[ ${schema.getTableName()} ]]
|
||||||
</span>
|
</span>
|
||||||
<button type="button" class="btn p-0 m-0 ms-3" data-bs-toggle="modal" data-bs-target="#csvExportModal">
|
<button type="button" class="btn p-0 m-0 ms-3" data-bs-toggle="modal" data-bs-target="#csvExportModal">
|
||||||
<i class="bi bi-filetype-csv" style="font-size: 1.5rem;"></i>
|
<i class="bi bi-file-earmark-spreadsheet" style="font-size: 1.5rem;"></i>
|
||||||
</button>
|
</button>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user