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)
|
api.checkDomain(domain.domain)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Simulate health report - in production this would come from backend
|
// Simulate health report - in production this would come from backend
|
||||||
setHealthReports(prev => ({
|
const simulatedReport: DomainHealthReport = {
|
||||||
...prev,
|
domain: domain.domain,
|
||||||
[domain.id]: {
|
|
||||||
domain_id: domain.id,
|
|
||||||
checked_at: new Date().toISOString(),
|
checked_at: new Date().toISOString(),
|
||||||
score: Math.floor(Math.random() * 40) + 60, // Simulated score 60-100
|
score: Math.floor(Math.random() * 40) + 60, // Simulated score 60-100
|
||||||
status: 'healthy' as HealthStatus,
|
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 },
|
http: { is_reachable: true, status_code: 200, is_parked: false },
|
||||||
ssl: { has_certificate: true },
|
ssl: { has_certificate: true },
|
||||||
} as DomainHealthReport
|
}
|
||||||
}))
|
setHealthReports(prev => ({ ...prev, [domain.id]: simulatedReport }))
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@ -195,18 +195,18 @@ export default function PortfolioPage() {
|
|||||||
try {
|
try {
|
||||||
await api.checkDomain(domainName)
|
await api.checkDomain(domainName)
|
||||||
// Simulated - in production, this would return real health data
|
// Simulated - in production, this would return real health data
|
||||||
setHealthReports(prev => ({
|
const simulatedReport: DomainHealthReport = {
|
||||||
...prev,
|
domain: domainName,
|
||||||
[domainId]: {
|
|
||||||
domain_id: domainId,
|
|
||||||
checked_at: new Date().toISOString(),
|
checked_at: new Date().toISOString(),
|
||||||
score: Math.floor(Math.random() * 40) + 60,
|
score: Math.floor(Math.random() * 40) + 60,
|
||||||
status: 'healthy' as HealthStatus,
|
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 },
|
http: { is_reachable: true, status_code: 200, is_parked: false },
|
||||||
ssl: { has_certificate: true },
|
ssl: { has_certificate: true },
|
||||||
} as DomainHealthReport
|
}
|
||||||
}))
|
setHealthReports(prev => ({ ...prev, [domainId]: simulatedReport }))
|
||||||
showToast('Health check complete', 'success')
|
showToast('Health check complete', 'success')
|
||||||
} catch {
|
} catch {
|
||||||
showToast('Health check failed', 'error')
|
showToast('Health check failed', 'error')
|
||||||
|
|||||||
Reference in New Issue
Block a user