feat: add CSV export to audit log

This commit is contained in:
hsiegeln
2026-04-09 18:43:46 +02:00
parent 2ede06f32a
commit 605c8ad270
8 changed files with 130 additions and 77 deletions

View File

@@ -10,7 +10,6 @@ import {
MonoText,
SectionHeader,
Select,
Spinner,
StatusDot,
Tabs,
Toggle,
@@ -40,6 +39,7 @@ import type { CatalogApp, CatalogRoute } from '../../api/queries/catalog';
import { DeploymentProgress } from '../../components/DeploymentProgress';
import { timeAgo } from '../../utils/format-utils';
import { applyTracedProcessorUpdate, applyRouteRecordingUpdate } from '../../utils/config-draft-utils';
import { PageLoader } from '../../components/PageLoader';
import styles from './AppsTab.module.css';
import sectionStyles from '../../styles/section-card.module.css';
import tableStyles from '../../styles/table-section.module.css';
@@ -117,7 +117,7 @@ function AppListView({ selectedEnv, environments }: { selectedEnv: string | unde
},
], [selectedEnv]);
if (isLoading) return <Spinner size="md" />;
if (isLoading) return <PageLoader />;
return (
<div className={styles.container}>
@@ -512,7 +512,7 @@ function AppDetailView({ appId: appSlug, environments, selectedEnv }: { appId: s
const envMap = useMemo(() => new Map(environments.map((e) => [e.id, e])), [environments]);
const sortedVersions = useMemo(() => [...versions].sort((a, b) => b.version - a.version), [versions]);
if (!app) return <Spinner size="md" />;
if (!app) return <PageLoader />;
const env = envMap.get(app.environmentId);
@@ -522,7 +522,7 @@ function AppDetailView({ appId: appSlug, environments, selectedEnv }: { appId: s
try {
const v = await uploadJar.mutateAsync({ appId: appSlug, file });
toast({ title: `Version ${v.version} uploaded`, description: file.name, variant: 'success' });
} catch { toast({ title: 'Upload failed', variant: 'error', duration: 86_400_000 }); }
} catch { toast({ title: 'Failed to upload JAR', variant: 'error', duration: 86_400_000 }); }
if (fileInputRef.current) fileInputRef.current.value = '';
}
@@ -530,7 +530,7 @@ function AppDetailView({ appId: appSlug, environments, selectedEnv }: { appId: s
try {
await createDeployment.mutateAsync({ appId: appSlug, appVersionId: versionId, environmentId });
toast({ title: 'Deployment started', variant: 'success' });
} catch { toast({ title: 'Deploy failed', variant: 'error', duration: 86_400_000 }); }
} catch { toast({ title: 'Failed to deploy application', variant: 'error', duration: 86_400_000 }); }
}
function handleStop(deploymentId: string) {
@@ -542,7 +542,7 @@ function AppDetailView({ appId: appSlug, environments, selectedEnv }: { appId: s
try {
await stopDeployment.mutateAsync({ appId: appSlug, deploymentId: stopTarget.id });
toast({ title: 'Deployment stopped', variant: 'warning' });
} catch { toast({ title: 'Stop failed', variant: 'error', duration: 86_400_000 }); }
} catch { toast({ title: 'Failed to stop deployment', variant: 'error', duration: 86_400_000 }); }
setStopTarget(null);
}