refactor: update references from Ciphera Analytics to Ciphera Pulse across the application for consistent branding and messaging

This commit is contained in:
Usman Baig
2026-01-19 16:49:42 +01:00
parent d0a13adf36
commit 9dbe74fd9f
19 changed files with 198 additions and 55 deletions

View File

@@ -3,7 +3,7 @@
import { useEffect, useState } from 'react'
import { useParams, useRouter } from 'next/navigation'
import { getSite, type Site } from '@/lib/api/sites'
import { getStats, getRealtime, getDailyStats, getTopPages, getTopReferrers, getCountries, getCities, getRegions, getBrowsers, getOS, getDevices, getScreenResolutions, getEntryPages, getExitPages, getDashboard, type Stats, type DailyStat } from '@/lib/api/stats'
import { getStats, getRealtime, getDailyStats, getTopPages, getTopReferrers, getCountries, getCities, getRegions, getBrowsers, getOS, getDevices, getScreenResolutions, getEntryPages, getExitPages, getDashboard, getPerformanceByPage, type Stats, type DailyStat, type PerformanceByPageStat } from '@/lib/api/stats'
import { formatNumber, formatDuration, getDateRange } from '@/lib/utils/format'
import { toast } from 'sonner'
import LoadingOverlay from '@/components/LoadingOverlay'
@@ -40,6 +40,7 @@ export default function SiteDashboardPage() {
const [devices, setDevices] = useState<any[]>([])
const [screenResolutions, setScreenResolutions] = useState<any[]>([])
const [performance, setPerformance] = useState<{ lcp: number, cls: number, inp: number }>({ lcp: 0, cls: 0, inp: 0 })
const [performanceByPage, setPerformanceByPage] = useState<PerformanceByPageStat[] | null>(null)
const [dateRange, setDateRange] = useState(getDateRange(30))
const [isDatePickerOpen, setIsDatePickerOpen] = useState(false)
const [todayInterval, setTodayInterval] = useState<'minute' | 'hour'>('hour')
@@ -113,6 +114,7 @@ export default function SiteDashboardPage() {
setDevices(Array.isArray(data.devices) ? data.devices : [])
setScreenResolutions(Array.isArray(data.screen_resolutions) ? data.screen_resolutions : [])
setPerformance(data.performance || { lcp: 0, cls: 0, inp: 0 })
setPerformanceByPage(data.performance_by_page ?? null)
} catch (error: any) {
toast.error('Failed to load data: ' + (error.message || 'Unknown error'))
} finally {
@@ -130,7 +132,7 @@ export default function SiteDashboardPage() {
}
if (loading) {
return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Analytics" />
return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Pulse" />
}
if (!site) {
@@ -231,7 +233,14 @@ export default function SiteDashboardPage() {
{/* Performance Stats - Only show if enabled */}
{site.enable_performance_insights && (
<div className="mb-8">
<PerformanceStats stats={performance} />
<PerformanceStats
stats={performance}
performanceByPage={performanceByPage}
siteId={siteId}
startDate={dateRange.start}
endDate={dateRange.end}
getPerformanceByPage={getPerformanceByPage}
/>
</div>
)}

View File

@@ -88,7 +88,7 @@ export default function RealtimePage() {
}
}
if (loading) return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Realtime Analytics" />
if (loading) return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Realtime" />
if (!site) return <div className="p-8">Site not found</div>
return (

View File

@@ -230,7 +230,7 @@ export default function SiteSettingsPage() {
}
if (loading) {
return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Analytics" />
return <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Pulse" />
}
if (!site) {
@@ -785,7 +785,7 @@ export default function SiteSettingsPage() {
For your privacy policy
</h3>
<p className="text-sm text-neutral-500 dark:text-neutral-400">
Copy the text below into your site&apos;s Privacy Policy to describe your use of Ciphera Analytics.
Copy the text below into your site&apos;s Privacy Policy to describe your use of Ciphera Pulse.
It updates automatically based on your saved settings above.
</p>
<p className="text-xs text-amber-600 dark:text-amber-500">