@extends('backendTools.layouts.backend') @section('title', '工程 LOG') @section('header')

工程 LOG

@endsection @push('styles') @endpush @php if (!function_exists('pretty_json_for_blade')) { function pretty_json_for_blade($data) { if (is_string($data)) { $decoded = json_decode($data, true); if (json_last_error() === JSON_ERROR_NONE) { return json_encode($decoded, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } } // Fallback for non-string data or invalid JSON string return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } } @endphp @section('content')
@if ($logs->isEmpty()) @else
@foreach ($logs as $log) @endforeach
# cagent UID (執行) 動作類型 內容 IP 位址 目標 UID 目標類型 時間
{{ $log->uid }} {{ $log->cagent_uid }} @php $actionClasses = [ 'create' => 'bg-success', 'update' => 'bg-warning text-dark', 'delete' => 'bg-danger', 'login' => 'bg-info', 'logout' => 'bg-secondary', ]; $class = $actionClasses[strtolower($log->action_type)] ?? 'bg-primary'; @endphp {{ $log->action_type }} {{ $log->ip_address }} {{ $log->target_uid }} {{ $log->target_type }} {{ $log->created_at }}
@endif
@foreach ($logs as $log) @endforeach @endsection @push('scripts') @endpush