fix: TypeScript error in Portfolio health reports
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
This commit is contained in:
@ -169,18 +169,18 @@ export default function PortfolioPage() {
|
||||
api.checkDomain(domain.domain)
|
||||
.then(() => {
|
||||
// Simulate health report - in production this would come from backend
|
||||
setHealthReports(prev => ({
|
||||
...prev,
|
||||
[domain.id]: {
|
||||
domain_id: domain.id,
|
||||
const simulatedReport: DomainHealthReport = {
|
||||
domain: domain.domain,
|
||||
checked_at: new Date().toISOString(),
|
||||
score: Math.floor(Math.random() * 40) + 60, // Simulated score 60-100
|
||||
status: 'healthy' as HealthStatus,
|
||||
dns: { has_a: true, has_ns: true, is_parked: false },
|
||||
signals: [],
|
||||
recommendations: [],
|
||||
dns: { has_a: true, has_ns: true, has_mx: false, nameservers: [], is_parked: false },
|
||||
http: { is_reachable: true, status_code: 200, is_parked: false },
|
||||
ssl: { has_certificate: true },
|
||||
} as DomainHealthReport
|
||||
}))
|
||||
}
|
||||
setHealthReports(prev => ({ ...prev, [domain.id]: simulatedReport }))
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
@ -195,18 +195,18 @@ export default function PortfolioPage() {
|
||||
try {
|
||||
await api.checkDomain(domainName)
|
||||
// Simulated - in production, this would return real health data
|
||||
setHealthReports(prev => ({
|
||||
...prev,
|
||||
[domainId]: {
|
||||
domain_id: domainId,
|
||||
const simulatedReport: DomainHealthReport = {
|
||||
domain: domainName,
|
||||
checked_at: new Date().toISOString(),
|
||||
score: Math.floor(Math.random() * 40) + 60,
|
||||
status: 'healthy' as HealthStatus,
|
||||
dns: { has_a: true, has_ns: true, is_parked: false },
|
||||
signals: [],
|
||||
recommendations: [],
|
||||
dns: { has_a: true, has_ns: true, has_mx: false, nameservers: [], is_parked: false },
|
||||
http: { is_reachable: true, status_code: 200, is_parked: false },
|
||||
ssl: { has_certificate: true },
|
||||
} as DomainHealthReport
|
||||
}))
|
||||
}
|
||||
setHealthReports(prev => ({ ...prev, [domainId]: simulatedReport }))
|
||||
showToast('Health check complete', 'success')
|
||||
} catch {
|
||||
showToast('Health check failed', 'error')
|
||||
|
||||
Reference in New Issue
Block a user