|
1 | | -<h2 class="text-2xl">Client-Side Errors</h2> |
2 | | -<div class="p-card px-3 py-3 flex flex-col gap-2"> |
3 | | - <div *ngFor="let error of errorLog; last as isLast" class="flex flex-col w-full"> |
4 | | - <div class="flex justify-between items-center w-full"> |
5 | | - <h3 class="m-0 text-lg">{{ error.message }}</h3> |
6 | | - <p class="m-0 text-sm text-gray-500 font-mono">{{ error.date | date: 'short' }}</p> |
7 | | - </div> |
8 | | - <p *ngIf="error.location" class="m-0 text-sm text-gray-500 font-mono">Occurred in {{error.location}}</p> |
9 | | - <div> |
10 | | - <pre *ngIf="error.error && (error.error | json) !== '{}'" |
11 | | - class="p-2 rounded-md text-sm overflow-x-auto bg-surface-0 text-red-400">{{ error.error | json }}</pre> |
12 | | - </div> |
13 | | - <p-divider *ngIf="!isLast" /> |
14 | | - </div> |
15 | | -</div> |
| 1 | + |
| 2 | +<p-tabView styleClass="mt-4"> |
| 3 | + <p-tabPanel header="Client-Side Errors"> |
| 4 | + <h2 class="text-2xl">Client-Side Errors</h2> |
| 5 | + <div class="p-card px-3 py-3 flex flex-col gap-2"> |
| 6 | + <div *ngFor="let error of errorLog; last as isLast" class="flex flex-col w-full"> |
| 7 | + <div class="flex justify-between items-center w-full"> |
| 8 | + <h3 class="m-0 text-lg">{{ error.message }}</h3> |
| 9 | + <p class="m-0 text-sm text-gray-500 font-mono">{{ error.date | date: 'short' }}</p> |
| 10 | + </div> |
| 11 | + <p *ngIf="error.location" class="m-0 text-sm text-gray-500 font-mono">Occurred in {{error.location}}</p> |
| 12 | + <div> |
| 13 | + <pre *ngIf="error.error && (error.error | json) !== '{}'" |
| 14 | + class="p-2 rounded-md text-sm overflow-x-auto bg-surface-0 text-red-400">{{ error.error | json }}</pre> |
| 15 | + </div> |
| 16 | + <p-divider *ngIf="!isLast" /> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | + </p-tabPanel> |
| 20 | + <p-tabPanel header="Build Logs"> |
| 21 | + <h2>Build Logs</h2> |
| 22 | + <div> |
| 23 | + <div class="flex gap-2"> |
| 24 | + <p-button |
| 25 | + *ngFor="let action of actionsList" |
| 26 | + size="small" |
| 27 | + (click)="fetchBuildLogs(action)" |
| 28 | + label="{{ action.file }}"></p-button> |
| 29 | + </div> |
| 30 | + <p class="mt-2 opacity-70 text-sm">Click on the buttons above to view job details and the most recent build logs.</p> |
| 31 | + |
| 32 | + <p-divider class="flex my-2" /> |
| 33 | + |
| 34 | + <div *ngIf="currentAction"> |
| 35 | + <h3>{{ currentAction.name }}</h3> |
| 36 | + <p class="text-sm italic m-0 opacity-70"> |
| 37 | + {{ currentAction.description }} |
| 38 | + <br> |
| 39 | + <span class="font-bold">Links: </span> |
| 40 | + <a href="https://github.com/Lissy93/domain-locker/actions/workflows/{{currentAction.file}}" target="_blank" rel="nofollow">View all Runs</a> |
| 41 | + | |
| 42 | + <a href="https://github.com/Lissy93/domain-locker/blob/main/.github/workflows/{{currentAction.file}}" target="_blank" rel="nofollow">View Source</a> |
| 43 | + </p> |
| 44 | + <pre *ngIf="currentLogs" class="p-2 bg-bluegray-900 text-bluegray-100 rounded-sm text-xs overflow-x-hidden overflow-y-auto max-h-72">{{ currentLogs }}</pre> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + </p-tabPanel> |
| 48 | + <p-tabPanel header="Server Logs"> |
| 49 | + <div class="p-1"> |
| 50 | + <h2 class="text-2xl mb-3">Reading Runtime Logs</h2> |
| 51 | + |
| 52 | + <div class="mb-3"> |
| 53 | + <h3 class="text-lg font-semibold flex items-center gap-2"> |
| 54 | + <span>🐳</span> Runtime Logs in Docker |
| 55 | + </h3> |
| 56 | + <ol class="list-decimal list-inside ml-4 mt-1"> |
| 57 | + <li>Open your terminal</li> |
| 58 | + <li> |
| 59 | + Run: |
| 60 | + <pre class="bg-surface-0 p-2 rounded text-xs my-1">docker compose logs -f</pre> |
| 61 | + </li> |
| 62 | + <li> |
| 63 | + To target a specific service (e.g. <code>web</code>, <code>api</code>): |
| 64 | + <pre class="bg-surface-0 p-2 rounded text-xs my-1">docker compose logs -f domain-locker</pre> |
| 65 | + </li> |
| 66 | + <li> |
| 67 | + To see only the last 100 lines: |
| 68 | + <pre class="bg-surface-0 p-2 rounded text-xs my-1">docker compose logs --tail=100 domain-locker</pre> |
| 69 | + </li> |
| 70 | + </ol> |
| 71 | + </div> |
| 72 | + |
| 73 | + <div class="mb-3"> |
| 74 | + <h3 class="text-lg font-semibold flex items-center gap-2"> |
| 75 | + <span>▲</span> Runtime Logs in Vercel |
| 76 | + </h3> |
| 77 | + <ol class="list-decimal list-inside ml-4 mt-1"> |
| 78 | + <li> |
| 79 | + Go to your project at |
| 80 | + <a href="https://vercel.com/dashboard" target="_blank" rel="noopener">vercel.com/dashboard</a> |
| 81 | + </li> |
| 82 | + <li>Click the latest deployment</li> |
| 83 | + <li>Scroll down to the <strong>Logs</strong> section to see real-time output</li> |
| 84 | + <li>Errors, warnings, and console output will be shown here</li> |
| 85 | + </ol> |
| 86 | + </div> |
| 87 | + |
| 88 | + <div class="mb-3"> |
| 89 | + <h3 class="text-lg font-semibold flex items-center gap-2"> |
| 90 | + <span>💻</span> Runtime Logs from Source (Local Dev) |
| 91 | + </h3> |
| 92 | + <ol class="list-decimal list-inside ml-4 mt-1"> |
| 93 | + <li>Start the dev server (<code>npm run dev</code> or <code>pnpm dev</code>)</li> |
| 94 | + <li>Logs will appear directly in your terminal</li> |
| 95 | + <li>Look for errors, warnings, or stack traces</li> |
| 96 | + <li>Add <code>console.log()</code> or <code>console.error()</code> in code for debugging</li> |
| 97 | + </ol> |
| 98 | + </div> |
| 99 | + |
| 100 | + <div class="mb-3"> |
| 101 | + <h3 class="text-lg font-semibold flex items-center gap-2"> |
| 102 | + <span>🐘</span> Runtime Logs (Supabase Functions) |
| 103 | + </h3> |
| 104 | + <ol class="list-decimal list-inside ml-4 mt-1"> |
| 105 | + <li> |
| 106 | + Go to your project at |
| 107 | + <a href="https://app.supabase.com" target="_blank" rel="noopener">app.supabase.com</a> |
| 108 | + </li> |
| 109 | + <li>Click <strong>Functions → Logs</strong></li> |
| 110 | + <li>View real-time logs for each Edge Function execution</li> |
| 111 | + </ol> |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + </p-tabPanel> |
| 115 | +</p-tabView> |
| 116 | + |
| 117 | + |
| 118 | + |
0 commit comments