From 6093641c6aff3d6ee4d93d29dbe1c6f4ba3368d4 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 24 Jun 2024 08:28:53 +0000 Subject: [PATCH] fix(nc-gui): some pr review changes --- .../nc-gui/components/workspace/AuditLogs.vue | 135 +++++++++++++----- packages/nc-gui/components/workspace/View.vue | 8 +- 2 files changed, 107 insertions(+), 36 deletions(-) diff --git a/packages/nc-gui/components/workspace/AuditLogs.vue b/packages/nc-gui/components/workspace/AuditLogs.vue index db9fa7bb4f..3ba2d2e821 100644 --- a/packages/nc-gui/components/workspace/AuditLogs.vue +++ b/packages/nc-gui/components/workspace/AuditLogs.vue @@ -182,6 +182,8 @@ const handleUpdateBaseQuery = (baseId?: string, sourceId?: string) => { } const updateOrderBy = (field: 'created_at' | 'user') => { + if (!audits.value?.length) return + if (auditLogsQuery.value.orderBy?.[field] === 'asc') { auditLogsQuery.value.orderBy[field] = 'desc' } else if (auditLogsQuery.value.orderBy?.[field] === 'desc') { @@ -335,12 +337,15 @@ onMounted(async () => { Audit Logs : {{ bases.get(baseId)?.title }} - - -
- -
-
+ + + + +
+ +
+
+
Track and monitor any changes made to any base in your workspace.
@@ -353,9 +358,24 @@ onMounted(async () => { >
-
+
User: - + + + {{ (auditLogsQuery.user && (collaboratorsMap.get(auditLogsQuery.user)?.display_name || @@ -364,7 +384,7 @@ onMounted(async () => { ?.email?.slice(0, collaboratorsMap.get(auditLogsQuery.user)?.email.indexOf('@')))) || 'All' }} - +
@@ -460,11 +480,14 @@ onMounted(async () => { >
-
+
Base: - + + {{ (auditLogsQuery.baseId && bases.get(auditLogsQuery.baseId)?.title) || 'All' }} - +
@@ -551,11 +574,14 @@ onMounted(async () => { >
-
+
Type: - + + {{ auditLogsQuery.type ? auditOperationTypeLabels[auditLogsQuery.type] : 'All' }} - +
@@ -631,11 +657,18 @@ onMounted(async () => {
-
+
Range: - + + {{ auditLogsQuery.dateRange ? auditLogsQuery.dateRangeLabel : 'All Time' }} - +
@@ -736,7 +769,13 @@ onMounted(async () => {
-
+
User
{
-
+
-
Time stamp
+
Time
{
Type
Sub-type
Description
-
IP
+
IP Address
@@ -787,18 +832,33 @@ onMounted(async () => {
- + + {{ collaboratorsMap.get(audit.user)?.display_name || collaboratorsMap .get(audit.user) ?.email?.slice(0, collaboratorsMap.get(audit.user)?.email.indexOf('@')) }} - +
- + + {{ collaboratorsMap.get(audit.user)?.email }} - +
@@ -812,9 +872,17 @@ onMounted(async () => {
-
+ + {{ bases.get(audit.base_id)?.title }} -
+ +
ID: {{ audit.base_id }}
-
- -
@@ -864,9 +929,15 @@ onMounted(async () => { >
- Loading... + {{ $t('general.loading') }}
+
+ +
{ -