Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Rehome the analytics export machinery to EE audit_app (#79808)

Frasera5af0364337e
diff --git a/enterprise/frontend/src/metabase-enterprise/audit_app/api.ts b/enterprise/frontend/src/metabase-enterprise/audit_app/api.ts
new file mode 100644
index 00000000000..5afff9b2129
--- /dev/null
+++ b/enterprise/frontend/src/metabase-enterprise/audit_app/api.ts
@@ -0,0 +1,50 @@
+import { openSaveDialog } from "metabase/utils/dom";
+import { EnterpriseApi } from "metabase-enterprise/api/api";
+
+export interface ExportAnalyticsResponse {
+ filename: string;
+}
+
+// Passed as fixedCacheKey so every useExportAnalyticsMutation call shares one mutation result.
+export const ANALYTICS_EXPORT_CACHE_KEY = "analytics-export";
+
+export const analyticsExportApi = EnterpriseApi.injectEndpoints({
+ endpoints: (builder) => ({
+ exportAnalytics: builder.mutation<ExportAnalyticsResponse, void>({
+ async queryFn(_arg, { signal }) {
+ try {
+ const response = await fetch(
+ "/api/ee/audit-app/analytics-dev/export",
+ {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ credentials: "include",
+ signal,
+ },
+ );
+
+ if (!response.ok) {
+ return { error: new Error("Export failed") };
+ }
+
+ const contentDisposition = response.headers.get(
+ "Content-Disposition",
+ );
+ const filenameMatch = contentDisposition?.match(/filename="(.+)"/);
+ const filename = filenameMatch?.[1] || "analytics-export.tar.gz";
+
+ const fileContent = await response.blob();
+ openSaveDialog(filename, fileContent);
+
+ return { data: { filename } };
+ } catch (error) {
+ return { error };
+ }
+ },
+ }),
+ }),
+});
+
+export const { useExportAnalyticsMutation } = analyticsExportApi;
diff --git a/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.tsx b/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.tsx
new file mode 100644
index 00000000000..d95b8576e14
--- /dev/null
+++ b/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.tsx
@@ -0,0 +1,52 @@
+import { t } from "ttag";
+
+import ErrorBoundary from "metabase/ErrorBoundary";
+import StatusLarge from "metabase/status/components/StatusLarge";
+import useStatusVisibility from "metabase/status/hooks/use-status-visibility";
+
+import { ANALYTICS_EXPORT_CACHE_KEY, useExportAnalyticsMutation } from "../api";
+
+export const AnalyticsExportStatus = () => {
+ const [, { isLoading, isSuccess, isError, error, reset }] =
+ useExportAnalyticsMutation({ fixedCacheKey: ANALYTICS_EXPORT_CACHE_KEY });
+ const hasStatus = isLoading || isSuccess || isError;
+ const isVisible = useStatusVisibility(hasStatus);
+
+ if (!isVisible || !hasStatus) {
+ return null;
+ }
+
+ const title = isLoading
+ ? t`Exporting analytics content…`
+ : isSuccess
+ ? t`Analytics content exported`
+ : t`Error exporting analytics`;
+
+ const errorMessage = error instanceof Error ? error.message : undefined;
+
+ const status = {
+ title,
+ items: [
+ {
+ title: t`Usage analytics`,
+ icon: "download" as const,
+ description: isError
+ ? (errorMessage ?? t`Failed to export analytics`)
+ : "",
+ isInProgress: isLoading,
+ isCompleted: isSuccess,
+ isAborted: isError,
+ },
+ ],
+ };
+
+ return (
+ <ErrorBoundary>
+ <StatusLarge
+ status={status}
+ isActive={hasStatus}
+ onDismiss={!isLoading ? reset : undefined}
+ />
+ </ErrorBoundary>
+ );
+};
diff --git a/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.unit.spec.tsx
new file mode 100644
index 00000000000..b51c214513b
--- /dev/null
+++ b/enterprise/frontend/src/metabase-enterprise/audit_app/components/AnalyticsExportStatus.unit.spec.tsx
@@ -0,0 +1,155 @@
+import userEvent from "@testing-library/user-event";
+import fetchMock from "fetch-mock";
+
+import { renderWithProviders, screen, waitFor } from "__support__/ui";
+import { openSaveDialog } from "metabase/utils/dom";
+import { defer } from "metabase/utils/promise";
+
+import { AnalyticsExportStatus } from "./AnalyticsExportStatus";
+import { CollectionExportAnalytics } from "./CollectionExportAnalytics";
+
+jest.mock("metabase/utils/dom", () => ({
+ ...jest.requireActual("metabase/utils/dom"),
+ openSaveDialog: jest.fn(),
+}));
+
+const EXPORT_URL = "path:/api/ee/audit-app/analytics-dev/export";
+
+function ExportControls() {
+ return (
+ <>
+ <CollectionExportAnalytics />
+ <AnalyticsExportStatus />
+ </>
+ );
+}
+
+function setup() {
+ return renderWithProviders(<ExportControls />);
+}
+
+describe("AnalyticsExportStatus", () => {
+ it("renders nothing before an export starts", () => {
+ setup();
+
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ });
+
+ it("disables the export button while an export is in progress", async () => {
+ const request = defer<string>();
+ fetchMock.post(EXPORT_URL, () => request.promise);
+ setup();
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+
+ expect(
+ await screen.findByText("Exporting analytics content…"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByRole("button", { name: "Export analytics" }),
+ ).toBeDisabled();
+
+ request.resolve("tarball");
+
+ expect(
+ await screen.findByText("Analytics content exported"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByRole("button", { name: "Export analytics" }),
+ ).toBeEnabled();
+ });
+
+ it("downloads the export using the filename from the response", async () => {
+ fetchMock.post(EXPORT_URL, {
+ headers: {
+ "Content-Disposition": 'attachment; filename="analytics.tar.gz"',
+ },
+ body: "tarball",
+ });
+ setup();
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+
+ expect(
+ await screen.findByText("Analytics content exported"),
+ ).toBeInTheDocument();
+ expect(openSaveDialog).toHaveBeenCalledWith(
+ "analytics.tar.gz",
+ expect.anything(),
+ );
+ });
+
+ it("shows an error when the export fails", async () => {
+ fetchMock.post(EXPORT_URL, 500);
+ setup();
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+
+ expect(
+ await screen.findByText("Error exporting analytics"),
+ ).toBeInTheDocument();
+ expect(screen.getByText("Export failed")).toBeInTheDocument();
+ });
+
+ it("preserves an in-progress export when the controls remount", async () => {
+ const request = defer<string>();
+ fetchMock.post(EXPORT_URL, () => request.promise);
+ const { rerender } = setup();
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+ expect(
+ await screen.findByText("Exporting analytics content…"),
+ ).toBeInTheDocument();
+
+ rerender(<></>);
+ rerender(<ExportControls />);
+
+ expect(
+ screen.getByRole("button", { name: "Export analytics" }),
+ ).toBeDisabled();
+ expect(
+ screen.getByText("Exporting analytics content…"),
+ ).toBeInTheDocument();
+ expect(fetchMock.callHistory.calls(EXPORT_URL)).toHaveLength(1);
+
+ request.resolve("tarball");
+
+ expect(
+ await screen.findByText("Analytics content exported"),
+ ).toBeInTheDocument();
+ });
+
+ it("allows another export after dismissing the result", async () => {
+ fetchMock.post(EXPORT_URL, { body: "tarball" });
+ setup();
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+ expect(
+ await screen.findByText("Analytics content exported"),
+ ).toBeInTheDocument();
+
+ await userEvent.click(screen.getByRole("button", { name: "Dismiss" }));
+ await waitFor(() => {
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ });
+
+ await userEvent.click(
+ screen.getByRole("button", { name: "Export analytics" }),
+ );
+
+ expect(
+ await screen.findByText("Analytics content exported"),
+ ).toBeInTheDocument();
+ expect(fetchMock.callHistory.calls(EXPORT_URL)).toHaveLength(2);
+ });
+});
diff --git a/frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx b/enterprise/frontend/src/metabase-enterprise/audit_app/components/CollectionExportAnalytics.tsx
similarity index 72%
rename from frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx
rename to enterprise/frontend/src/metabase-enterprise/audit_app/components/CollectionExportAnalytics.tsx
index 3d59ad009e0..a13130f343a 100644
--- a/frontend/src/metabase/collections/components/CollectionHeader/CollectionExportAnalytics.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/audit_app/components/CollectionExportAnalytics.tsx
@@ -1,13 +1,13 @@
import { t } from "ttag";
-import { useExportAnalyticsMutation } from "metabase/api";
-import { useSelector } from "metabase/redux";
-import { hasActiveExport } from "metabase/redux/analytics-export";
import { ActionIcon, Box, Icon, Text, Tooltip } from "metabase/ui";
+import { ANALYTICS_EXPORT_CACHE_KEY, useExportAnalyticsMutation } from "../api";
+
export function CollectionExportAnalytics() {
- const [exportAnalytics] = useExportAnalyticsMutation();
- const isExporting = useSelector(hasActiveExport);
+ const [exportAnalytics, { isLoading }] = useExportAnalyticsMutation({
+ fixedCacheKey: ANALYTICS_EXPORT_CACHE_KEY,
+ });
const handleExport = () => {
exportAnalytics();
@@ -33,7 +33,7 @@ export function CollectionExportAnalytics() {
size="2rem"
aria-label={t`Export analytics`}
onClick={handleExport}
- disabled={isExporting}
+ disabled={isLoading}
>
<Icon name="download" />
</ActionIcon>
diff --git a/enterprise/frontend/src/metabase-enterprise/audit_app/index.tsx b/enterprise/frontend/src/metabase-enterprise/audit_app/index.tsx
index 75d5b916e56..63a285d2a5e 100644
--- a/enterprise/frontend/src/metabase-enterprise/audit_app/index.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/audit_app/index.tsx
@@ -16,6 +16,8 @@ import {
import { hasPremiumFeature } from "metabase-enterprise/settings";
import type { User } from "metabase-types/api";
+import { AnalyticsExportStatus } from "./components/AnalyticsExportStatus";
+import { CollectionExportAnalytics } from "./components/CollectionExportAnalytics";
import { InsightsLink } from "./components/InsightsLink";
import { InsightsMenuItem } from "./components/InsightsMenuItem";
import { getUserMenuRoutes } from "./routes";
@@ -46,6 +48,8 @@ export function initializePlugin() {
PLUGIN_AUDIT.isAuditDb = isAuditDb;
PLUGIN_AUDIT.InsightsLink = InsightsLink;
PLUGIN_AUDIT.InsightsMenuItem = InsightsMenuItem;
+ PLUGIN_AUDIT.AnalyticsExportStatus = AnalyticsExportStatus;
+ PLUGIN_AUDIT.CollectionExportAnalytics = CollectionExportAnalytics;
PLUGIN_AUDIT.isAiAuditingEnabled = true;
PLUGIN_AUDIT.getAiAuditingRoutes = hasPremiumFeature("ai_controls")
? getAiAuditingRoutes
diff --git a/frontend/src/metabase/api/analytics.ts b/frontend/src/metabase/api/analytics.ts
index 57c2ce16e5c..6bd8f6df02d 100644
--- a/frontend/src/metabase/api/analytics.ts
+++ b/frontend/src/metabase/api/analytics.ts
@@ -5,60 +5,12 @@ import {
shouldReportSearchTerm,
trackSchemaEvent,
} from "metabase/analytics";
-import { openSaveDialog } from "metabase/utils/dom";
import {
toSnowplowContentTypes,
toSnowplowContext,
} from "metabase-types/analytics";
import type { SearchRequest, SearchResponse } from "metabase-types/api";
-import { Api } from "./api";
-
-export interface ExportAnalyticsResponse {
- filename: string;
-}
-
-export const analyticsApi = Api.injectEndpoints({
- endpoints: (builder) => ({
- exportAnalytics: builder.mutation<ExportAnalyticsResponse, void>({
- async queryFn(_arg, { signal }) {
- try {
- const response = await fetch(
- "/api/ee/audit-app/analytics-dev/export",
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- credentials: "include",
- signal,
- },
- );
-
- if (!response.ok) {
- return { error: new Error("Export failed") };
- }
-
- const contentDisposition = response.headers.get(
- "Content-Disposition",
- );
- const filenameMatch = contentDisposition?.match(/filename="(.+)"/);
- const filename = filenameMatch?.[1] || "analytics-export.tar.gz";
-
- const fileContent = await response.blob();
- openSaveDialog(filename, fileContent);
-
- return { data: { filename } };
- } catch (error) {
- return { error };
- }
- },
- }),
- }),
-});
-
-export const { useExportAnalyticsMutation } = analyticsApi;
-
type SearchRequestFilter = Pick<
SearchRequest,
| "created_by"
diff --git a/frontend/src/metabase/api/index.ts b/frontend/src/metabase/api/index.ts
index 997018ea5e5..380e585953f 100644
--- a/frontend/src/metabase/api/index.ts
+++ b/frontend/src/metabase/api/index.ts
@@ -1,6 +1,5 @@
export * from "./action";
export * from "./activity";
-export * from "./analytics";
export * from "./api";
export * from "./automagic-dashboards";
export * from "./bookmark";
diff --git a/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx b/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx
index 966d8c0f0c5..fb923b7b296 100644
--- a/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx
+++ b/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx
@@ -4,6 +4,7 @@ import {
isLibraryCollection,
isTrashedCollection,
} from "metabase/common/collections/utils";
+import { PLUGIN_AUDIT } from "metabase/plugins";
import { Flex } from "metabase/ui";
import type { Collection, UpdateCollectionRequest } from "metabase-types/api";
@@ -11,7 +12,6 @@ import { CollectionMenu } from "../CollectionMenu";
import CollectionBookmark from "./CollectionBookmark";
import { CollectionCaption } from "./CollectionCaption";
-import { CollectionExportAnalytics } from "./CollectionExportAnalytics";
import S from "./CollectionHeader.module.css";
import { CollectionInfoSidebarToggle } from "./CollectionInfoSidebarToggle";
import { CollectionNewButton } from "./CollectionNewButton";
@@ -96,7 +96,7 @@ export const CollectionHeader = ({
{showTimelinesButton && (
<CollectionTimeline collection={collection} />
)}
- {showExportButton && <CollectionExportAnalytics />}
+ {showExportButton && <PLUGIN_AUDIT.CollectionExportAnalytics />}
{isInstanceAnalytics && (
<CollectionPermissions collection={collection} />
)}
diff --git a/frontend/src/metabase/plugins/oss/audit.ts b/frontend/src/metabase/plugins/oss/audit.ts
index 56efa539bdf..902395e7de3 100644
--- a/frontend/src/metabase/plugins/oss/audit.ts
+++ b/frontend/src/metabase/plugins/oss/audit.ts
@@ -40,17 +40,28 @@ export interface InsightsMenuItemProps {
withDivider?: boolean;
}
-const getDefaultPluginAudit = () => ({
+type AuditPlugin = {
+ isEnabled: boolean;
+ isAuditDb: (db: DatabaseType) => boolean;
+ InsightsLink: ComponentType<InsightsLinkProps>;
+ InsightsMenuItem: ComponentType<InsightsMenuItemProps>;
+ AnalyticsExportStatus: ComponentType;
+ CollectionExportAnalytics: ComponentType;
+ isAiAuditingEnabled: boolean;
+ getAiAuditingRoutes: () => ReactNode;
+ handleMetabotSlashCommand: MetabotSlashCommandHandler;
+};
+
+const getDefaultPluginAudit = (): AuditPlugin => ({
isEnabled: false,
- isAuditDb: (_db: DatabaseType) => false,
- // Unjustified type cast. FIXME
- InsightsLink: PluginPlaceholder as ComponentType<InsightsLinkProps>,
- // Unjustified type cast. FIXME
- InsightsMenuItem: PluginPlaceholder as ComponentType<InsightsMenuItemProps>,
+ isAuditDb: (_db) => false,
+ InsightsLink: PluginPlaceholder,
+ InsightsMenuItem: PluginPlaceholder,
+ AnalyticsExportStatus: PluginPlaceholder,
+ CollectionExportAnalytics: PluginPlaceholder,
isAiAuditingEnabled: false,
- getAiAuditingRoutes: (): ReactNode => null,
- // Unjustified type cast. FIXME
- handleMetabotSlashCommand: ((_args) => false) as MetabotSlashCommandHandler,
+ getAiAuditingRoutes: () => null,
+ handleMetabotSlashCommand: (_args) => false,
});
export const PLUGIN_AUDIT = definePluginSlot(getDefaultPluginAudit);
diff --git a/frontend/src/metabase/reducers-common.ts b/frontend/src/metabase/reducers-common.ts
index 190b83b246e..cd350f57f75 100644
--- a/frontend/src/metabase/reducers-common.ts
+++ b/frontend/src/metabase/reducers-common.ts
@@ -8,7 +8,6 @@ import { documentsReducer as documents } from "metabase/documents/documents.slic
import { explorationsReducer as explorations } from "metabase/explorations/explorations.slice";
import { entitiesReducer } from "metabase/metadata-store";
import * as parameters from "metabase/parameters/reducers";
-import { reducer as analyticsExport } from "metabase/redux/analytics-export";
import app from "metabase/redux/app";
import { reducer as auth } from "metabase/redux/auth";
import { reducer as downloads } from "metabase/redux/downloads";
@@ -29,7 +28,6 @@ export const commonReducers = {
entities: entitiesReducer,
documents,
upload,
- analyticsExport,
auth,
[Api.reducerPath]: Api.reducer,
modal,
diff --git a/frontend/src/metabase/redux/analytics-export.ts b/frontend/src/metabase/redux/analytics-export.ts
deleted file mode 100644
index 473bc927a21..00000000000
--- a/frontend/src/metabase/redux/analytics-export.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { createSlice } from "@reduxjs/toolkit";
-import { t } from "ttag";
-
-import { analyticsApi } from "metabase/api";
-import type { AnalyticsExportState, State } from "metabase/redux/store";
-
-export const getAnalyticsExport = (state: State): AnalyticsExportState =>
- state.analyticsExport;
-
-export const hasActiveExport = (state: State) =>
- getAnalyticsExport(state).status === "in-progress";
-
-const initialState: AnalyticsExportState = {};
-
-const analyticsExportSlice = createSlice({
- name: "metabase/analytics",
- initialState,
- reducers: {
- clearExport: () => initialState,
- },
- extraReducers: (builder) => {
- builder
- .addMatcher(analyticsApi.endpoints.exportAnalytics.matchPending, () => ({
- status: "in-progress" as const,
- }))
- .addMatcher(
- analyticsApi.endpoints.exportAnalytics.matchFulfilled,
- () => ({
- status: "complete" as const,
- }),
- )
- .addMatcher(
- analyticsApi.endpoints.exportAnalytics.matchRejected,
- (state, action) => ({
- status: "error" as const,
- message: action.error.message ?? t`Failed to export analytics`,
- }),
- );
- },
-});
-
-export const { clearExport } = analyticsExportSlice.actions;
-
-export const reducer = analyticsExportSlice.reducer;
diff --git a/frontend/src/metabase/redux/store/analytics-export.ts b/frontend/src/metabase/redux/store/analytics-export.ts
deleted file mode 100644
index ffe6779890e..00000000000
--- a/frontend/src/metabase/redux/store/analytics-export.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export interface AnalyticsExportState {
- status?: "in-progress" | "complete" | "error";
- message?: string;
-}
diff --git a/frontend/src/metabase/redux/store/index.ts b/frontend/src/metabase/redux/store/index.ts
index 12b5a46af4b..6637c2fa431 100644
--- a/frontend/src/metabase/redux/store/index.ts
+++ b/frontend/src/metabase/redux/store/index.ts
@@ -1,5 +1,4 @@
export * from "./admin";
-export * from "./analytics-export";
export * from "./app";
export * from "./auth";
export * from "./collection";
diff --git a/frontend/src/metabase/redux/store/state.ts b/frontend/src/metabase/redux/store/state.ts
index 74c78621e15..2569e429f7d 100644
--- a/frontend/src/metabase/redux/store/state.ts
+++ b/frontend/src/metabase/redux/store/state.ts
@@ -3,7 +3,6 @@ import type { DocumentsState } from "metabase/redux/store/documents";
import type { ExplorationsState } from "metabase/redux/store/explorations";
import type { AdminState } from "./admin";
-import type { AnalyticsExportState } from "./analytics-export";
import type { AppState } from "./app";
import type { AuthState } from "./auth";
import type { DashboardState } from "./dashboard";
@@ -25,7 +24,6 @@ type MetabaseApiState = ReturnType<typeof Api.reducer>;
export interface State {
admin: AdminState;
- analyticsExport: AnalyticsExportState;
app: AppState;
auth: AuthState;
dashboard: DashboardState;
diff --git a/frontend/src/metabase/status/components/AnalyticsExportStatus/AnalyticsExportStatus.tsx b/frontend/src/metabase/status/components/AnalyticsExportStatus/AnalyticsExportStatus.tsx
deleted file mode 100644
index 098c03eda55..00000000000
--- a/frontend/src/metabase/status/components/AnalyticsExportStatus/AnalyticsExportStatus.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import { t } from "ttag";
-
-import ErrorBoundary from "metabase/ErrorBoundary";
-import { useDispatch, useSelector } from "metabase/redux";
-import {
- clearExport,
- getAnalyticsExport,
-} from "metabase/redux/analytics-export";
-
-import useStatusVisibility from "../../hooks/use-status-visibility";
-import StatusLarge from "../StatusLarge";
-
-export const AnalyticsExportStatus = () => {
- const dispatch = useDispatch();
- const exportState = useSelector(getAnalyticsExport);
- const hasStatus = exportState.status != null;
- const isVisible = useStatusVisibility(hasStatus);
-
- const resetExport = () => dispatch(clearExport());
-
- if (!isVisible || !exportState.status) {
- return null;
- }
-
- const hasError = exportState.status === "error";
- const isLoading = exportState.status === "in-progress";
- const isDone = exportState.status === "complete";
-
- const title = isLoading
- ? t`Exporting analytics content…`
- : isDone
- ? t`Analytics content exported`
- : t`Error exporting analytics`;
-
- const status = {
- title,
- items: [
- {
- title: t`Usage analytics`,
- icon: "download" as const,
- description: hasError ? (exportState.message ?? t`Export failed`) : "",
- isInProgress: isLoading,
- isCompleted: isDone,
- isAborted: hasError,
- },
- ],
- };
-
- return (
- <ErrorBoundary>
- <StatusLarge
- status={status}
- isActive={hasStatus}
- onDismiss={!isLoading ? resetExport : undefined}
- />
- </ErrorBoundary>
- );
-};
diff --git a/frontend/src/metabase/status/components/AnalyticsExportStatus/index.ts b/frontend/src/metabase/status/components/AnalyticsExportStatus/index.ts
deleted file mode 100644
index 19ccd36ca0b..00000000000
--- a/frontend/src/metabase/status/components/AnalyticsExportStatus/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { AnalyticsExportStatus } from "./AnalyticsExportStatus";
diff --git a/frontend/src/metabase/status/components/StatusListing/StatusListing.tsx b/frontend/src/metabase/status/components/StatusListing/StatusListing.tsx
index c4baa668259..54c4dae7dfd 100644
--- a/frontend/src/metabase/status/components/StatusListing/StatusListing.tsx
+++ b/frontend/src/metabase/status/components/StatusListing/StatusListing.tsx
@@ -3,6 +3,7 @@ import { t } from "ttag";
import { getUserIsAdmin } from "metabase/current-user";
import {
+ PLUGIN_AUDIT,
PLUGIN_REMOTE_SYNC,
PLUGIN_REPLACEMENT,
PLUGIN_UPLOAD_MANAGEMENT,
@@ -11,7 +12,6 @@ import { useSelector } from "metabase/redux";
import { hasActiveUploads } from "metabase/redux/uploads";
import { useCheckActiveDownloadsBeforeUnload } from "metabase/status/hooks/use-check-active-downloads-before-unload";
-import { AnalyticsExportStatus } from "../AnalyticsExportStatus";
import { DatabaseStatus } from "../DatabaseStatus";
import { DownloadsStatus } from "../DownloadsStatus";
import { FileUploadStatus } from "../FileUploadStatus";
@@ -37,7 +37,7 @@ export const StatusListing = () => {
{isAdmin && <DatabaseStatus />}
{isAdmin && <PLUGIN_REPLACEMENT.SourceReplacementStatus />}
<FileUploadStatus />
- <AnalyticsExportStatus />
+ <PLUGIN_AUDIT.AnalyticsExportStatus />
<DownloadsStatus />
{isAdmin && <PLUGIN_UPLOAD_MANAGEMENT.GdriveSyncStatus />}
</StatusListingRoot>