This commit is contained in:
parent
8726c931fa
commit
8c46d091ff
49 changed files with 1607 additions and 712 deletions
|
|
@ -3,10 +3,10 @@ import { useCallback, useEffect, useMemo, useState } from 'react'
|
|||
import { logsApi, type LogType, type LogsResponse } from '../../lib/api'
|
||||
|
||||
const LOG_TYPES: Array<{ value: LogType; label: string }> = [
|
||||
{ value: 'outbound', label: 'Outbound' },
|
||||
{ value: 'inbound', label: 'Inbound' },
|
||||
{ value: 'sms', label: 'SMS' },
|
||||
{ value: 'otp', label: 'OTP' },
|
||||
{ value: 'outbound', label: 'Calls placed' },
|
||||
{ value: 'inbound', label: 'Calls received' },
|
||||
{ value: 'sms', label: 'Text messages' },
|
||||
{ value: 'otp', label: 'Verification codes' },
|
||||
]
|
||||
|
||||
const PAGE_SIZE = 10
|
||||
|
|
@ -134,11 +134,11 @@ export function LogsPage() {
|
|||
case 'sms':
|
||||
return ['From', 'To', 'Template', 'Status', 'Time']
|
||||
case 'otp':
|
||||
return ['To', 'OTP type', 'Project', 'Status', 'Time']
|
||||
return ['To', 'Code type', 'Project', 'Status', 'Time']
|
||||
case 'inbound':
|
||||
return ['From', 'To', 'Status', 'Time']
|
||||
default:
|
||||
return ['From', 'To', 'Socket', 'Status', 'Time']
|
||||
return ['From', 'To', 'Connection', 'Status', 'Time']
|
||||
}
|
||||
}, [logType])
|
||||
|
||||
|
|
@ -148,15 +148,15 @@ export function LogsPage() {
|
|||
return (
|
||||
<div className="logs-page">
|
||||
<div className="account-heading">
|
||||
<span className="eyebrow">Test & observe</span>
|
||||
<h1>Logs</h1>
|
||||
<p>Browse outbound and inbound calls, SMS sends, and OTP deliveries. Default view covers the last week, up to one month.</p>
|
||||
<span className="eyebrow">Insights</span>
|
||||
<h1>Activity history</h1>
|
||||
<p>Review calls, text messages, and verification codes. The default view is the last week, and you can look back up to a month.</p>
|
||||
</div>
|
||||
|
||||
<section className="panel logs-toolbar">
|
||||
<div className="logs-toolbar-row">
|
||||
<label className="logs-field">
|
||||
<span>Log type</span>
|
||||
<span>Activity</span>
|
||||
<select value={logType} onChange={(event) => changeType(event.target.value as LogType)}>
|
||||
{LOG_TYPES.map((item) => (
|
||||
<option key={item.value} value={item.value}>{item.label}</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue