diff --git a/resources/views/components/forms/checkbox-alpine.blade.php b/resources/views/components/forms/checkbox-alpine.blade.php deleted file mode 100644 index e9bc4044f..000000000 --- a/resources/views/components/forms/checkbox-alpine.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -@props([ - 'label' => null, - 'disabled' => false, - 'defaultClass' => 'dark:border-neutral-700 text-coolgray-400 dark:bg-coolgray-100 rounded-sm cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-coollabs dark:focus-visible:ring-warning focus-visible:ring-offset-2 dark:focus-visible:ring-offset-base', -]) - -
!$disabled, -])> - -
diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php index 048e64a5a..f6477a882 100644 --- a/resources/views/livewire/project/shared/get-logs.blade.php +++ b/resources/views/livewire/project/shared/get-logs.blade.php @@ -1,12 +1,36 @@
@@ -33,8 +57,6 @@ Refresh -
@@ -43,6 +65,21 @@
+ {{-- + --}}
@if ($outputs)
- -
-
{{ $outputs }}
-
+ @foreach (explode("\n", trim($outputs)) as $line) + @if (!empty(trim($line))) + @php + $lowerLine = strtolower($line); + $isError = + str_contains($lowerLine, 'error') || + str_contains($lowerLine, 'err') || + str_contains($lowerLine, 'failed') || + str_contains($lowerLine, 'exception'); + $isWarning = + str_contains($lowerLine, 'warn') || + str_contains($lowerLine, 'warning') || + str_contains($lowerLine, 'wrn'); + $isDebug = + str_contains($lowerLine, 'debug') || + str_contains($lowerLine, 'dbg') || + str_contains($lowerLine, 'trace'); + $barColor = $isError + ? 'bg-red-500 dark:bg-red-400' + : ($isWarning + ? 'bg-warning-500 dark:bg-warning-400' + : ($isDebug + ? 'bg-purple-500 dark:bg-purple-400' + : 'bg-blue-500 dark:bg-blue-400')); + $bgColor = $isError + ? 'bg-red-50/50 dark:bg-red-900/20 hover:bg-red-100/50 dark:hover:bg-red-800/30' + : ($isWarning + ? 'bg-warning-50/50 dark:bg-warning-900/20 hover:bg-warning-100/50 dark:hover:bg-warning-800/30' + : ($isDebug + ? 'bg-purple-50/50 dark:bg-purple-900/20 hover:bg-purple-100/50 dark:hover:bg-purple-800/30' + : 'bg-blue-50/50 dark:bg-blue-900/20 hover:bg-blue-100/50 dark:hover:bg-blue-800/30')); - -
- @foreach (explode("\n", trim($outputs)) as $line) - @if (!empty(trim($line))) - @php - $lowerLine = strtolower($line); - $isError = - str_contains($lowerLine, 'error') || - str_contains($lowerLine, 'err') || - str_contains($lowerLine, 'failed') || - str_contains($lowerLine, 'exception'); - $isWarning = - str_contains($lowerLine, 'warn') || - str_contains($lowerLine, 'warning') || - str_contains($lowerLine, 'wrn'); - $isDebug = - str_contains($lowerLine, 'debug') || - str_contains($lowerLine, 'dbg') || - str_contains($lowerLine, 'trace'); - $barColor = $isError - ? 'bg-red-500 dark:bg-red-400' - : ($isWarning - ? 'bg-warning-500 dark:bg-warning-400' - : ($isDebug - ? 'bg-purple-500 dark:bg-purple-400' - : 'bg-blue-500 dark:bg-blue-400')); - $bgColor = $isError - ? 'bg-red-50/50 dark:bg-red-900/20 hover:bg-red-100/50 dark:hover:bg-red-800/30' - : ($isWarning - ? 'bg-warning-50/50 dark:bg-warning-900/20 hover:bg-warning-100/50 dark:hover:bg-warning-800/30' - : ($isDebug - ? 'bg-purple-50/50 dark:bg-purple-900/20 hover:bg-purple-100/50 dark:hover:bg-purple-800/30' - : 'bg-blue-50/50 dark:bg-blue-900/20 hover:bg-blue-100/50 dark:hover:bg-blue-800/30')); - - // Check for timestamp at the beginning (ISO 8601 format) - $timestampPattern = '/^(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+/'; - $hasTimestamp = preg_match($timestampPattern, $line, $matches); - $timestamp = $hasTimestamp ? $matches[1] : null; - $logContent = $hasTimestamp ? preg_replace($timestampPattern, '', $line) : $line; - @endphp -
-
-
- @if ($hasTimestamp) - {{ $timestamp }} - {{ $logContent }} - @else - {{ $line }} - @endif -
+ // Check for timestamp at the beginning (ISO 8601 format) + $timestampPattern = '/^(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+/'; + $hasTimestamp = preg_match($timestampPattern, $line, $matches); + $timestamp = $hasTimestamp ? $matches[1] : null; + $logContent = $hasTimestamp ? preg_replace($timestampPattern, '', $line) : $line; + @endphp +
+
+
+ @if ($hasTimestamp) + {{ $timestamp }} + {{ $logContent }} + @else + {{ $line }} + @endif
- @endif - @endforeach -
+
+ @endif + @endforeach
@else
@@ -134,4 +164,4 @@ class="text-xs text-gray-500 dark:text-gray-400 font-mono mr-2">{{ $timestamp }}
-
\ No newline at end of file +