Skip to content

Commit 60bcfee

Browse files
cursoragentdobrac
andcommitted
keep old status link
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
1 parent 134048c commit 60bcfee

4 files changed

Lines changed: 6 additions & 19 deletions

File tree

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
7070
### Enable dashboard status indicator feature: set to 1 to enable
7171
### When enabled, the E2B status is read from the incident.io summary API
7272
# NEXT_PUBLIC_INCLUDE_STATUS_INDICATOR=0
73-
# NEXT_PUBLIC_STATUS_PAGE_URL=https://statuspage.incident.io/e2b-service
7473

7574
### Set to 1 to use mock data
7675
# NEXT_PUBLIC_MOCK_DATA=0

src/features/dashboard/layouts/status-indicator.server.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import { LiveDot } from '@/ui/live'
77
import {
88
type AggregateState,
99
getStatusPageStateFromSummary,
10-
getStatusPageSummaryUrl,
11-
getStatusPageUrl,
1210
type IncidentIOStatusPageSummaryResponse,
11+
STATUS_PAGE_LINK_URL,
12+
STATUS_PAGE_SUMMARY_URL,
1313
} from './status-indicator'
1414

15-
export const STATUS_PAGE_URL = getStatusPageUrl()
16-
const STATUS_PAGE_SUMMARY_URL = getStatusPageSummaryUrl(STATUS_PAGE_URL)
1715
const STATUS_PAGE_FETCH_TIMEOUT_MS = 5_000
1816
const STATUS_PAGE_CACHE_SECONDS = 300
1917

@@ -98,7 +96,7 @@ export default async function DashboardStatusBadgeServer() {
9896

9997
return (
10098
<Link
101-
href={STATUS_PAGE_URL}
99+
href={STATUS_PAGE_LINK_URL}
102100
target="_blank"
103101
rel="noopener noreferrer"
104102
className="inline-flex h-5 shrink-0 items-center gap-1.5"

src/features/dashboard/layouts/status-indicator.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,9 @@ export interface IncidentIOStatusPageSummaryResponse {
1717
}>
1818
}
1919

20-
export function getStatusPageUrl() {
21-
return (
22-
process.env.NEXT_PUBLIC_STATUS_PAGE_URL ??
23-
'https://statuspage.incident.io/e2b-service'
24-
)
25-
.trim()
26-
.replace(/\/+$/, '')
27-
}
28-
29-
export function getStatusPageSummaryUrl(statusPageUrl: string) {
30-
return `${statusPageUrl}/api/v2/summary.json`
31-
}
20+
export const STATUS_PAGE_LINK_URL = 'https://status.e2b.dev'
21+
const INCIDENT_IO_STATUS_PAGE_URL = 'https://statuspage.incident.io/e2b-service'
22+
export const STATUS_PAGE_SUMMARY_URL = `${INCIDENT_IO_STATUS_PAGE_URL}/api/v2/summary.json`
3223

3324
function stateFromIndicator(indicator: string | undefined) {
3425
if (indicator === 'none') return 'operational'

src/lib/env.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export const clientSchema = z.object({
5555
NEXT_PUBLIC_INCLUDE_ARGUS: z.string().optional(),
5656
NEXT_PUBLIC_INCLUDE_REPORT_ISSUE: z.string().optional(),
5757
NEXT_PUBLIC_INCLUDE_STATUS_INDICATOR: z.string().optional(),
58-
NEXT_PUBLIC_STATUS_PAGE_URL: z.url().optional(),
5958
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: z.string().optional(),
6059
NEXT_PUBLIC_SCAN: z.string().optional(),
6160
NEXT_PUBLIC_MOCK_DATA: z.string().optional(),

0 commit comments

Comments
 (0)