Skip to content

Commit 93df2b0

Browse files
committed
chore: wip
1 parent 4782c21 commit 93df2b0

File tree

1 file changed

+24
-126
lines changed
  • storage/framework/defaults/views/dashboard/logs

1 file changed

+24
-126
lines changed

storage/framework/defaults/views/dashboard/logs/index.vue

Lines changed: 24 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const projects: Project[] = [
109109
{ id: 'vite-plugin-local', name: 'vite-plugin-local', color: 'amber' },
110110
]
111111
112-
// Updated sample logs with project information
112+
// Updated sample logs with project information and CLI samples
113113
const sampleLogs: Log[] = [
114114
{
115115
id: '1',
@@ -129,120 +129,6 @@ const sampleLogs: Log[] = [
129129
metadata: { file: './components/Header.vue', line: 42 },
130130
project: 'rpx'
131131
},
132-
{
133-
id: '11',
134-
timestamp: new Date(Date.now() - 2000).toISOString(),
135-
type: 'mail',
136-
source: 'Mail',
137-
message: 'Email delivered successfully',
138-
metadata: { delivery_id: 'msg_123456' },
139-
project: 'stacks',
140-
email: {
141-
subject: 'Your account has been created',
142-
sender: 'noreply@stacksjs.org',
143-
recipient: 'user@example.com',
144-
messageId: '<msg_123456@mail.stacksjs.org>',
145-
size: '24.5KB',
146-
provider: 'SendGrid',
147-
attachments: [
148-
{ name: 'welcome.pdf', type: 'application/pdf', size: '12KB' }
149-
],
150-
authResults: {
151-
spf: 'pass',
152-
dkim: 'pass',
153-
dmarc: 'pass'
154-
},
155-
userInteraction: {
156-
opened: true,
157-
openedAt: new Date(Date.now() - 1000).toISOString(),
158-
clicked: true,
159-
clickedAt: new Date(Date.now() - 500).toISOString(),
160-
links: ['https://app.stacksjs.org/verify']
161-
}
162-
}
163-
},
164-
{
165-
id: '12',
166-
timestamp: new Date(Date.now() - 30000).toISOString(),
167-
type: 'error',
168-
source: 'Mail',
169-
message: 'Failed to deliver email',
170-
metadata: { delivery_id: 'msg_789012', error: 'Recipient mailbox full' },
171-
project: 'stacks',
172-
email: {
173-
subject: 'Your weekly report',
174-
sender: 'reports@stacksjs.org',
175-
recipient: 'user@example.com',
176-
messageId: '<msg_789012@mail.stacksjs.org>',
177-
size: '156KB',
178-
provider: 'SendGrid',
179-
bounceInfo: {
180-
reason: 'Mailbox full',
181-
code: '552',
182-
timestamp: new Date(Date.now() - 30000).toISOString()
183-
},
184-
authResults: {
185-
spf: 'pass',
186-
dkim: 'pass',
187-
dmarc: 'pass'
188-
}
189-
}
190-
},
191-
{
192-
id: '13',
193-
timestamp: new Date(Date.now() - 150000).toISOString(),
194-
type: 'warning',
195-
source: 'Mail',
196-
message: 'Email delayed',
197-
metadata: { delivery_id: 'msg_345678', delay: '30s' },
198-
project: 'stacks',
199-
email: {
200-
subject: 'Password reset request',
201-
sender: 'security@stacksjs.org',
202-
recipient: 'user@example.com',
203-
messageId: '<msg_345678@mail.stacksjs.org>',
204-
size: '8.2KB',
205-
provider: 'Mailgun'
206-
}
207-
},
208-
{
209-
id: '14',
210-
timestamp: new Date(Date.now() - 200000).toISOString(),
211-
type: 'mail',
212-
source: 'Notification',
213-
message: 'Notification email sent',
214-
metadata: { notification_id: 'notif_123', channel: 'email' },
215-
project: 'stacks',
216-
email: {
217-
subject: 'New comment on your post',
218-
sender: 'notifications@stacksjs.org',
219-
recipient: 'user@example.com',
220-
messageId: '<notif_123@mail.stacksjs.org>',
221-
size: '12.8KB',
222-
provider: 'Postmark',
223-
attachments: []
224-
}
225-
},
226-
{
227-
id: '15',
228-
timestamp: new Date(Date.now() - 250000).toISOString(),
229-
type: 'mail',
230-
source: 'Mail',
231-
message: 'Bulk email campaign completed',
232-
metadata: { campaign_id: 'camp_456', recipients: 1250, delivered: 1245, failed: 5 },
233-
project: 'stacks',
234-
email: {
235-
subject: 'May Newsletter',
236-
sender: 'newsletter@stacksjs.org',
237-
recipient: 'multiple-recipients',
238-
size: '45.2KB',
239-
provider: 'Mailchimp',
240-
attachments: [
241-
{ name: 'newsletter.pdf', type: 'application/pdf', size: '32KB' },
242-
{ name: 'banner.png', type: 'image/png', size: '8KB' }
243-
]
244-
}
245-
},
246132
{
247133
id: '3',
248134
timestamp: new Date(Date.now() - 15000).toISOString(),
@@ -267,7 +153,8 @@ const sampleLogs: Log[] = [
267153
metadata: {
268154
migration: 'create_users_table',
269155
database: 'production',
270-
user: 'deploy@stacksjs.org'
156+
user: 'deploy@stacksjs.org',
157+
command: 'buddy db:migrate'
271158
},
272159
project: 'stacks'
273160
},
@@ -294,7 +181,8 @@ const sampleLogs: Log[] = [
294181
metadata: {
295182
duration: '12.5s',
296183
assets: ['main.js', 'vendor.js', 'app.css'],
297-
size: '2.3MB'
184+
size: '2.3MB',
185+
command: 'buddy build --production'
298186
},
299187
project: 'stacks'
300188
},
@@ -316,12 +204,13 @@ const sampleLogs: Log[] = [
316204
id: '8',
317205
timestamp: new Date(Date.now() - 300000).toISOString(),
318206
type: 'success',
319-
source: 'File',
207+
source: 'CLI',
320208
message: 'Configuration cache cleared',
321209
metadata: {
322210
triggered_by: 'deployment',
323211
cache_size: '156KB',
324-
duration: '0.8s'
212+
duration: '0.8s',
213+
command: 'buddy config:clear'
325214
},
326215
project: 'stacks'
327216
},
@@ -335,7 +224,8 @@ const sampleLogs: Log[] = [
335224
suite: 'Integration Tests',
336225
total_tests: 156,
337226
parallel: true,
338-
ci: true
227+
ci: true,
228+
command: 'buddy test --suite=integration'
339229
},
340230
project: 'stacks'
341231
},
@@ -475,13 +365,13 @@ const getLogIconColor = (type: Log['type']) => {
475365
const getLogRowClass = (type: Log['type']) => {
476366
switch (type) {
477367
case 'error':
478-
return 'bg-red-50'
368+
return 'bg-red-50 bg-opacity-50'
479369
case 'success':
480-
return 'bg-green-50'
370+
return 'bg-green-50 bg-opacity-50'
481371
case 'warning':
482-
return 'bg-amber-50'
372+
return 'bg-amber-50 bg-opacity-50'
483373
case 'mail':
484-
return 'bg-purple-50'
374+
return 'bg-purple-50 bg-opacity-50'
485375
default:
486376
return ''
487377
}
@@ -814,8 +704,8 @@ watch(timeRange, async () => {
814704
</span>
815705
</td>
816706
<td class="px-6 py-4 whitespace-nowrap text-right">
817-
<button class="text-blue-600 hover:text-blue-900">
818-
View
707+
<button class="text-gray-400 hover:text-blue-500 transition-colors duration-150">
708+
<i class="i-hugeicons-view h-5 w-5" aria-hidden="true" />
819709
</button>
820710
</td>
821711
</tr>
@@ -1079,6 +969,14 @@ watch(timeRange, async () => {
1079969
</ul>
1080970
</div>
1081971
</div>
972+
973+
<!-- CLI Command -->
974+
<div v-if="selectedLog.source === 'CLI' && selectedLog.metadata?.command" class="mt-4">
975+
<label class="block text-sm font-medium text-gray-700">Command</label>
976+
<div class="mt-2 p-3 bg-gray-50 rounded-md font-mono text-sm">
977+
{{ selectedLog.metadata.command }}
978+
</div>
979+
</div>
1082980
</div>
1083981

1084982
<div>

0 commit comments

Comments
 (0)