feat(export): add HTML export for query result grids
This commit is contained in:
1 parent
254b9baaff
commit
dc4764e930
21 files changed
+442
-5
No files matched your search
@@ -516,6 +516,7 @@ export const exportQueryResultXlsx = forward("exportQueryResultXlsx");
|
||||
export const exportQueryResultsXlsx = forward("exportQueryResultsXlsx");
|
||||
export const exportQueryResultJson = forward("exportQueryResultJson");
|
||||
export const exportQueryResultMarkdown = forward("exportQueryResultMarkdown");
|
||||
export const exportQueryResultHtml = forward("exportQueryResultHtml");
|
||||
export const startTableExport = forward("startTableExport");
|
||||
export const cancelTableExport = forward("cancelTableExport");
|
||||
export const startQueryResultExport = forward("startQueryResultExport");
|
||||
|
||||
@@ -3212,6 +3212,11 @@ export async function exportQueryResultMarkdown(filePath: string, columns: strin
|
||||
downloadTextFile(filePath, "export.md", result.content, "text/markdown;charset=utf-8");
|
||||
}
|
||||
|
||||
export async function exportQueryResultHtml(filePath: string, title: string | undefined, columns: string[], rows: readonly (readonly XlsxCellValue[])[]): Promise<void> {
|
||||
const result = await post<{ content: string }>("/api/export/query-result-html", { title, columns, rows });
|
||||
downloadTextFile(filePath, "export.html", result.content, "text/html;charset=utf-8");
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Redis
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -5650,6 +5650,17 @@ export async function exportQueryResultMarkdown(filePath: string, columns: strin
|
||||
});
|
||||
}
|
||||
|
||||
export async function exportQueryResultHtml(filePath: string, title: string | undefined, columns: string[], rows: readonly (readonly XlsxCellValue[])[]): Promise<void> {
|
||||
return invoke("export_query_result_html", {
|
||||
request: {
|
||||
filePath,
|
||||
title,
|
||||
columns,
|
||||
rows,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export * from "@/lib/backend/mq-tauri";
|
||||
export * from "@/lib/backend/mqtt-tauri";
|
||||
export * from "@/lib/backend/nacos-tauri";
|
||||
Reference in new issue
Block a user