@dracul/audit-frontend 1.35.9 → 1.35.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dracul/audit-frontend",
3
- "version": "1.35.9",
3
+ "version": "1.35.11",
4
4
  "description": "Audit frontend",
5
5
  "author": "Cristian Incarnato <cristian.cdi@gmail.com>",
6
6
  "publishConfig": {
@@ -38,5 +38,5 @@
38
38
  "type": "git",
39
39
  "url": "git+https://github.com/draculjs/modular-framework.git"
40
40
  },
41
- "gitHead": "6dcc8ee328f065deb431834da3142fdbec432ccd"
41
+ "gitHead": "750fb29ad6271d5efbb26e8cf063a667e33bac52"
42
42
  }
@@ -105,7 +105,7 @@ const i18nMessages = {
105
105
  read: 'Se ha visualizado el recurso "{resourceID}"',
106
106
  update: 'Se ha modificado el recurso "{resourceID}"',
107
107
  delete: 'Se ha eliminado el recurso "{resourceID}"',
108
- restart: 'Se ha reiniciado el recurso "{resourceID}',
108
+ restart: 'Se ha reiniciado el recurso "{resourceID}"',
109
109
  },
110
110
 
111
111
  changes: {
@@ -161,24 +161,24 @@ const i18nMessages = {
161
161
  actionFor: 'Ação Para',
162
162
  action: 'Ação',
163
163
 
164
- actions: {
165
- create: 'Crear',
166
- read: 'Visualizar',
164
+ ações: {
165
+ create: 'Criar',
166
+ read: 'Display',
167
167
  update: 'Modificar',
168
- delete: 'Eliminar',
168
+ delete: 'Excluir',
169
169
  restart: 'Reiniciar',
170
170
  detailMessages: {
171
- create: 'Se ha creado el recurso "{resourceID}"',
172
- read: 'Se ha visualizado el recurso "{resourceID}"',
173
- update: 'Se ha modificado el recurso "{resourceID}"',
174
- delete: 'Se ha eliminado el recurso "{resourceID}"',
175
- restart: 'Se ha reiniciado el recurso "{resourceID}',
171
+ create: 'O recurso “{resourceID}” foi criado',
172
+ read: 'O recurso “{resourceID}” foi exibido',
173
+ update: 'O recurso “{resourceID}” foi modificado',
174
+ delete: 'O recurso “{resourceID}” foi excluído',
175
+ restart: 'O recurso “{resourceID}” foi reiniciado',
176
176
  },
177
177
 
178
178
  changes: {
179
179
  field: 'Campo',
180
- oldValue: 'Valor anterior',
181
- newValue: 'Valor nuevo',
180
+ oldValue: 'Valor antigo',
181
+ newValue: 'Novo valor',
182
182
  },
183
183
  },
184
184
 
@@ -279,8 +279,21 @@ export default {
279
279
 
280
280
  return actionColors[action]
281
281
  },
282
- getDetailsText(item){
283
- return item.resourceData.Spec.Name ? item.resourceData.Spec.Name : item.details
282
+ getDetailsText(audit){
283
+
284
+ console.log(`audit: ${JSON.stringify(audit, null, 2)}`)
285
+ console.log(`typeof resource data: ${typeof audit.resourceData}`)
286
+
287
+ if (audit && audit.resourceData && audit.resourceData !== '' && typeof audit.resourceData === 'string' && audit.resourceData !== null && audit.resourceData !== undefined) {
288
+ try {
289
+ audit.resourceData = JSON.parse(audit.resourceData)
290
+ } catch {
291
+ console.error('Invalid JSON format in resourceData')
292
+ return []
293
+ }
294
+ }
295
+
296
+ return audit.resourceData?.Spec?.Name || audit.details
284
297
  },
285
298
  performSearch() {
286
299
  this.pageNumber = 1