diff --git a/app/app.vue b/app/app.vue
index c607ce3..32c89b7 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -7,9 +7,20 @@
storage
r9t
-
-
vpn_key
-
{{ accessKey }}
+
+
+
+ vpn_key
+ {{ accessKey }}
+
@@ -81,6 +92,7 @@
import { ref, computed, watch, onMounted } from 'vue'
import { Popup, PopupSize } from '~/utils/popup'
import UploadPopup from '~/components/popup/UploadPopup.vue'
+import { saveBlob } from '~/utils/download'
import type { S3Bucket, S3Object } from '~/utils/s3xml'
useHead({ title: 'r9t · Object Storage' })
@@ -88,7 +100,7 @@ useHead({ title: 'r9t · Object Storage' })
const config = useRuntimeConfig()
const accessKey = config.public.s3AccessKey
-const { listBuckets, listObjects } = useS3Client()
+const { listBuckets, listObjects, downloadAuditLogs } = useS3Client()
const buckets = ref
([])
const objects = ref([])
@@ -99,6 +111,7 @@ const loadingObjects = ref(false)
const errorMessage = ref(null)
const objectsError = ref(null)
const toastMessage = ref(null)
+const downloadingAuditLogs = ref(false)
const filteredObjects = computed(() => {
if (!search.value) {
@@ -141,6 +154,19 @@ function openUploadPopup() {
)
}
+async function downloadAuditLogCsv() {
+ downloadingAuditLogs.value = true
+ try {
+ saveBlob(await downloadAuditLogs(), 'audit-logs.csv')
+ }
+ catch {
+ notify('Audit Logs konnten nicht heruntergeladen werden.')
+ }
+ finally {
+ downloadingAuditLogs.value = false
+ }
+}
+
async function loadBuckets() {
errorMessage.value = null
try {
diff --git a/app/components/ObjectDetail.vue b/app/components/ObjectDetail.vue
index 2d9b501..d3e62f7 100644
--- a/app/components/ObjectDetail.vue
+++ b/app/components/ObjectDetail.vue
@@ -84,6 +84,7 @@