diff --git a/components/dashboard/src/insights/download/DownloadInsights.tsx b/components/dashboard/src/insights/download/DownloadInsights.tsx
index fcd17806ef4bfe..8477fe9f077687 100644
--- a/components/dashboard/src/insights/download/DownloadInsights.tsx
+++ b/components/dashboard/src/insights/download/DownloadInsights.tsx
@@ -52,7 +52,7 @@ export const DownloadInsightsToast = ({ organizationId, from, to, organizationNa
if (isLoading) {
return (
- Preparing usage export
+ Preparing insights export
Exporting page {progress}
@@ -64,7 +64,7 @@ export const DownloadInsightsToast = ({ organizationId, from, to, organizationNa
-
Error exporting your usage data:
+
Error exporting your insights data:
{error.message}
@@ -72,7 +72,7 @@ export const DownloadInsightsToast = ({ organizationId, from, to, organizationNa
}
if (!data || !data.blob || data.count === 0) {
- return No usage data for the selected period.;
+ return No insights data for the selected period.;
}
const readableSize = prettyBytes(data.blob.size);
@@ -81,7 +81,7 @@ export const DownloadInsightsToast = ({ organizationId, from, to, organizationNa
return (
-
Usage export complete.
+
Insights export complete.
{readableSize} · {formattedCount} {data.count !== 1 ? "entries" : "entry"} exported
diff --git a/components/dashboard/src/insights/download/download-sessions.ts b/components/dashboard/src/insights/download/download-sessions.ts
index 6f1cbc7266e2e1..9a68c3c022bfdc 100644
--- a/components/dashboard/src/insights/download/download-sessions.ts
+++ b/components/dashboard/src/insights/download/download-sessions.ts
@@ -67,20 +67,20 @@ type Args = Pick
onProgress?: (percentage: number) => void;
};
-export type DownloadUsageCSVResponse = {
+export type DownloadInsightsCSVResponse = {
blob: Blob | null;
filename: string;
count: number;
};
-const downloadUsageCSV = async ({
+const downloadInsightsCSV = async ({
organizationId,
from,
to,
organizationName,
signal,
onProgress,
-}: Args): Promise => {
+}: Args): Promise => {
const start = dayjs(from?.toDate()).format("YYYYMMDD");
const end = dayjs(to?.toDate()).format("YYYYMMDD");
const filename = `gitpod-sessions-${organizationName}-${start}-${end}.csv`;
@@ -197,16 +197,16 @@ export const transformSessionRecord = (session: WorkspaceSession) => {
export const useDownloadSessionsCSV = (args: Args) => {
const client = useQueryClient();
- const key = getDownloadUsageCSVQueryKey(args);
+ const key = getDownloadInsightsCSVQueryKey(args);
const abort = useCallback(() => {
client.removeQueries([key]);
}, [client, key]);
- const query = useQuery(
+ const query = useQuery(
key,
async ({ signal }) => {
- return downloadUsageCSV({ ...args, signal });
+ return downloadInsightsCSV({ ...args, signal });
},
{
retry: false,
@@ -221,6 +221,6 @@ export const useDownloadSessionsCSV = (args: Args) => {
};
};
-const getDownloadUsageCSVQueryKey = (args: Args) => {
- return noPersistence(["usage-export", args]);
+const getDownloadInsightsCSVQueryKey = (args: Args) => {
+ return noPersistence(["insights-export", args]);
};