@growy/strapi-plugin-encrypted-field 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/pages/AuditLogs.jsx +37 -34
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Box, Typography, Table, Pagination, Badge } from '@strapi/design-system';
|
|
3
3
|
import { useNotification } from '@strapi/strapi/admin';
|
|
4
4
|
|
|
5
5
|
const AuditLogs = () => {
|
|
@@ -76,44 +76,47 @@ const AuditLogs = () => {
|
|
|
76
76
|
];
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
79
|
+
<Box padding={8}>
|
|
80
|
+
<Box paddingBottom={4}>
|
|
81
|
+
<Typography variant="alpha">Logs de Auditoría - Campos Cifrados</Typography>
|
|
82
|
+
<Typography variant="epsilon" textColor="neutral600">
|
|
83
|
+
Registro de acciones realizadas sobre campos cifrados
|
|
84
|
+
</Typography>
|
|
85
|
+
</Box>
|
|
86
|
+
|
|
87
|
+
{loading ? (
|
|
88
|
+
<Box>Cargando...</Box>
|
|
89
|
+
) : (
|
|
90
|
+
<>
|
|
91
|
+
<Table
|
|
92
|
+
headers={tableHeaders}
|
|
93
|
+
rows={logs.map(log => ({
|
|
94
|
+
timestamp: formatTimestamp(log.timestamp),
|
|
95
|
+
user: log.user,
|
|
96
|
+
action: (
|
|
97
|
+
<Badge color={getBadgeColor(log.action)}>
|
|
98
|
+
{log.action === 'view' && 'Vista'}
|
|
99
|
+
{log.action === 'copy' && 'Copiado'}
|
|
100
|
+
{log.action === 'decrypt' && 'Descifrado'}
|
|
101
|
+
</Badge>
|
|
102
|
+
),
|
|
103
|
+
field: log.field,
|
|
104
|
+
collection: log.collection,
|
|
105
|
+
entry_id: log.entry_id,
|
|
106
|
+
}))}
|
|
107
|
+
/>
|
|
108
|
+
{pagination.total > pagination.pageSize && (
|
|
109
|
+
<Box paddingTop={4}>
|
|
107
110
|
<Pagination
|
|
108
111
|
activePage={pagination.page}
|
|
109
112
|
pageCount={pagination.pageCount}
|
|
110
113
|
onPageChange={handlePageChange}
|
|
111
114
|
/>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
</
|
|
115
|
+
</Box>
|
|
116
|
+
)}
|
|
117
|
+
</>
|
|
118
|
+
)}
|
|
119
|
+
</Box>
|
|
117
120
|
);
|
|
118
121
|
};
|
|
119
122
|
|