From e9f210decbf165339531575ef66c98cfcc5fe465 Mon Sep 17 00:00:00 2001 From: fs Date: Thu, 23 Apr 2026 23:52:38 +0200 Subject: [PATCH] refactor(audit): system-audit detail view on app-details-card pattern Migrates the event-details section to the .app-details-card summary + container pattern with outcome badge in the summary meta slot, and truncates request ID / IP hash / user-agent hash for readable inline display. Same content, consistent with the rest of the detail-page design language. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../audit/system-audit/view(default).phtml | 147 ++++++++++-------- 1 file changed, 80 insertions(+), 67 deletions(-) diff --git a/modules/audit/pages/audit/system-audit/view(default).phtml b/modules/audit/pages/audit/system-audit/view(default).phtml index 55bee26..30c988c 100644 --- a/modules/audit/pages/audit/system-audit/view(default).phtml +++ b/modules/audit/pages/audit/system-audit/view(default).phtml @@ -22,6 +22,7 @@ if ($metadataJson !== '') { } $requestId = trim((string) ($auditLog['request_id'] ?? '')); +$requestIdDisplay = $requestId !== '' ? substr($requestId, 0, 10) : '-'; $eventType = trim((string) ($auditLog['event_type'] ?? '')); $channel = strtoupper(trim((string) ($auditLog['channel'] ?? ''))); $errorCode = trim((string) ($auditLog['error_code'] ?? '')); @@ -30,7 +31,9 @@ $path = trim((string) ($auditLog['path'] ?? '')); $targetType = trim((string) ($auditLog['target_type'] ?? '')); $targetUuid = trim((string) ($auditLog['target_uuid'] ?? '')); $ipHash = trim((string) ($auditLog['ip_hash'] ?? '')); +$ipHashDisplay = $ipHash !== '' ? substr($ipHash, 0, 16) . '...' : '-'; $userAgentHash = trim((string) ($auditLog['user_agent_hash'] ?? '')); +$userAgentHashDisplay = $userAgentHash !== '' ? substr($userAgentHash, 0, 16) . '...' : '-'; $actorLabel = trim((string) ($auditLog['actor_user_display_name'] ?? '')); $actorEmail = trim((string) ($auditLog['actor_user_email'] ?? '')); @@ -56,87 +59,89 @@ if ($tenantLabel === '') { ?>
-
- -
-
-
- -

+
+ + + + labelToken())); ?> + + +
+
+
+ +

+
+
+ +

+
-
- -

labelToken())); ?>

-
-
-
-
- -

-
-
- -

-
-
-
-

+

- -

+ +

- -
- -
-
- -
-
- -

- - - - - -

-
-
- -

- - - - - -

+ +

-
-
- -

+
+ +
+ + + +
+
+
+ +

+ + + + + +

+
+
+ +

+ + + + + +

+
-
- -

+
+
+ +

+
+
+ +

+
-
-
- -
- +
+ + + +
+
+
@@ -167,17 +172,25 @@ if ($tenantLabel === '') {

- +

-

+

+ + + +

-

+

+ + + +