The user wants a webhook retries analytics dashboard. This is a complex data visualization project that needs:
- Root Causes Analysis - Why webhooks are failing (timeouts, invalid endpoints, authentication errors, etc.)
- Success Rates - Charts showing retry success over time
- Fixes/Recommendations - Actionable suggestions for improving webhook reliability
Let me design a sophisticated, dynamic dashboard with:
- 3D visualization elements using Three.js for impact
- Interactive charts and graphs
- Real-time data simulation
- Particle effects for visual appeal
- Multiple dynamic elements (at least 3)
Design approach:
- Dark theme with high contrast
- Accent colors: Cyan/Teal for success, Orange/Red for failures, Green for resolved
- Modern glassmorphism cards
- Animated counters and progress rings
- 3D background with flowing particles
Features to include:
- Header Stats - Total retries, success rate, avg retry time
- Root Causes Panel - Donut chart with animated segments showing failure reasons
- Success Rate Timeline - Line chart showing retry success over time
- Recent Failures Table - Interactive list with details
- Recommended Fixes - Actionable suggestions panel
- 3D Particle Background - Subtle depth effect
Let me build this comprehensively in a single HTML file.
Webhook Retries Analytics Dashboard
I'll create a comprehensive analytics dashboard with:
- 3D animated background with flowing particles
- Root causes analysis - Interactive donut chart with animated segments
- Success rate metrics - Animated progress rings and timeline charts
- Recent failures table - Scrollable, interactive data grid
- Recommended fixes - Dynamic suggestions panel
The design uses a dark theme with high contrast, cyan/teal for success states, and warm colors for failures.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webhook Retries Analytics</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: #0a0e17;
color: #e8eaed;
min-height: 100vh;
overflow-x: hidden;
}
#bg-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.dashboard {
position: relative;
z-index: 1;
padding: 24px;
max-width: 1600px;
margin: 0 auto;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header h1 {
font-size: 28px;
font-weight: 600;
background: linear-gradient(135deg, #00d4aa, #00a8cc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.time-filter {
display: flex;
gap: 8px;
}
.time-btn {
padding: 8px 16px;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 8px;
color: #9aa0a6;
cursor: pointer;
transition: all 0.3s ease;
font-size: 13px;
}
.time-btn:hover, .time-btn.active {
background: rgba(0,212,170,0.15);
border-color: #00d4aa;
color: #00d4aa;
}
.stats-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 28px;
}
.stat-card {
background: rgba(20, 27, 45, 0.8);
backdrop-filter: blur(10px);
border-radius: 16px;
padding: 24px;
border: 1px solid rgba(255,255,255,0.06);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(0,212,170,0.1);
}
.stat-label {
font-size: 13px;
color: #9aa0a6;
margin-bottom: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stat-value {
font-size: 36px;
font-weight: 700;
line-height: 1;
}
.stat-value.success { color: #00d4aa; }
.stat-value.warning { color: #ffb84d; }
.stat-value.danger { color: #ff6b6b; }
.stat-value.info { color: #4dabf7; }
.stat-change {
margin-top: 12px;
font-size: 13px;
display: flex;
align-items: center;
gap: 6px;
}
.stat-change.up { color: #00d4aa; }
.stat-change.down { color: #ff6b6b; }
.main-grid {
display: grid;
grid-template-columns: 1fr 1.2fr;
gap: 20px;
margin-bottom: 28px;
}
.card {
background: rgba(20, 27, 45, 0.85);
backdrop-filter: blur(12px);
border-radius: 16px;
padding: 24px;
border: 1px solid rgba(255,255,255,0.06);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.card-title {
font-size: 16px;
font-weight: 600;
color: #e8eaed;
}
.card-badge {
padding: 4px 12px;
background: rgba(0,212,170,0.15);
border-radius: 20px;
font-size: 12px;
color: #00d4aa;
}
.donut-container {
display: flex;
align-items: center;
gap: 32px;
}
.donut-chart {
position: relative;
width: 200px;
height: 200px;
}
.donut-chart svg {
transform: rotate(-90deg);
}
.donut-segment {
fill: none;
stroke-width: 28;
stroke-linecap: round;
transition: stroke-dashoffset 1s ease;
}
.donut-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.donut-center-value {
font-size: 28px;
font-weight: 700;
color: #fff;
}
.donut-center-label {
font-size: 12px;
color: #9aa0a6;
}
.legend {
flex: 1;
}
.legend-item {
display: flex;
align-items: center;
padding: 12px;
margin-bottom: 8px;
background: rgba(255,255,255,0.02);
border-radius: 10px;
cursor: pointer;
transition: all 0.3s ease;
}
.legend-item:hover {
background: rgba(255,255,255,0.06);
transform: translateX(4px);
}
.legend-color {
width: 12px;
height: 12px;
border-radius: 4px;
margin-right: 12px;
}
.legend-text {
flex: 1;
font-size: 14px;
}
.legend-value {
font-weight: 600;
font-size: 14px;
}
.timeline-chart {
height: 220px;
position: relative;
margin-top: 16px;
}
.timeline-grid {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 180px;
display: flex;
align-items: flex-end;
gap: 8px;
padding-bottom: 30px;
}
.timeline-bar-group {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.timeline-bar {
width: 100%;
max-width: 40px;
border-radius: 6px 6px 0 0;
transition: height 0.8s ease, opacity 0.3s ease;
cursor: pointer;
position: relative;
}
.timeline-bar:hover {
opacity: 0.8;
}
.timeline-bar.success-bar {
background: linear-gradient(180deg, #00d4aa, #00a88a);
}
.timeline-bar.fail-bar {
background: linear-gradient(180deg, #ff6b6b, #ee5a5a);
}
.timeline-label {
font-size: 11px;
color: #6b7280;
margin-top: 8px;
}
.timeline-tooltip {
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: rgba(0,0,0,0.9);
padding: 8px 12px;
border-radius: 6px;
font-size: 12px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
margin-bottom: 8px;
}
.timeline-bar:hover .timeline-tooltip {
opacity: 1;
}
.failures-section {
display: grid;
grid-template-columns: 1.5fr 1fr;
gap: 20px;
}
.failures-table {
width: 100%;
}
.table-header {
display: grid;
grid-template-columns: 1fr 1fr 100px 80px;
padding: 12px 16px;
background: rgba(255,255,255,0.03);
border-radius: 8px;
font-size: 12px;
color: #9aa0a6;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px;
}
.table-row {
display: grid;
grid-template-columns: 1fr 1fr 100px 80px;
padding: 14px 16px;
background: rgba(255,255,255,0.01);
border-radius: 8px;
margin-bottom: 6px;
transition: all 0.3s ease;
cursor: pointer;
font-size: 14px;
}
.table-row:hover {
background: rgba(255,255,255,0.05);
transform: translateX(4px);
}
.status-badge {
padding: 4px 10px;
border-radius: 12px;
font-size: 11px;
font-weight: 600;
width: fit-content;
}
.status-badge.retrying {
background: rgba(255, 184, 77, 0.15);
color: #ffb84d;
}
.status-badge.failed {
background: rgba(255, 107, 107, 0.15);
color: #ff6b6b;
}
.status-badge.resolved {
background: rgba(0, 212, 170, 0.15);
color: #00d4aa;
}
.attempt-count {
color: #9aa0a6;
}
.fixes-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.fix-item {
padding: 16px;
background: rgba(255,255,255,0.02);
border-radius: 12px;
border-left: 3px solid;
transition: all 0.3s ease;
cursor: pointer;
}
.fix-item:hover {
background: rgba(255,255,255,0.05);
transform: translateX(4px);
}
.fix-item.critical { border-color: #ff6b6b; }
.fix-item.warning { border-color: #ffb84d; }
.fix-item.info { border-color: #4dabf7; }
.fix-title {
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
}
.fix-desc {
font-size: 12px;
color: #9aa0a6;
line-height: 1.5;
}
.fix-impact {
margin-top: 10px;
font-size: 11px;
color: #00d4aa;
display: flex;
align-items: center;
gap: 4px;
}
.progress-ring {
position: relative;
width: 80px;
height: 80px;
}
.progress-ring svg {
transform: rotate(-90deg);
}
.progress-ring-bg {
fill: none;
stroke: rgba(255,255,255,0.1);
stroke-width: 8;
}
.progress-ring-fill {
fill: none;
stroke-width: 8;
stroke-linecap: round;
transition: stroke-dashoffset 1s ease;
}
.progress-ring-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 18px;
font-weight: 700;
}
.success-ring { stroke: #00d4aa; }
.warning-ring { stroke: #ffb84d; }
.danger-ring { stroke: #ff6b6b; }
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-in {
animation: slideIn 0.6s ease forwards;
}
@media (max-width: 1200px) {
.stats-row { grid-template-columns: repeat(2, 1fr); }
.main-grid, .failures-section { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
.stats-row { grid-template-columns: 1fr; }
.header { flex-direction: column; gap: 16px; }
.donut-container { flex-direction: column; }
}
</style>
</head>
<body>
<canvas id="bg-canvas"></canvas>
<div class="dashboard">
<header class="header">
<h1>Webhook Retries Analytics</h1>
<div class="time-filter">
<button class="time-btn" data-range="1h">1H</button>
<button class="time-btn" data-range="6h">6H</button>
<button class="time-btn active" data-range="24h">24H</button>
<button class="time-btn" data-range="7d">7D</button>
<button class="time-btn" data-range="30d">30D</button>
</div>
</header>
<div class="stats-row">
<div class="stat-card animate-in" style="animation-delay: 0.1s">
<div class="stat-label">Total Retries</div>
<div class="stat-value warning" id="total-retries">0</div>
<div class="stat-change down">
<span>↓ 12.3%</span> from last period
</div>
</div>
<div class="stat-card animate-in" style="animation-delay: 0.2s">
<div class="stat-label">Success Rate</div>
<div class="stat-value success" id="success-rate">0%</div>
<div class="stat-change up">
<span>↑ 5.7%</span> improvement
</div>
</div>
<div class="stat-card animate-in" style="animation-delay: 0.3s">
<div class="stat-label">Avg Retry Time</div>
<div class="stat-value info" id="avg-time">0s</div>
<div class="stat-change up">
<span>↓ 0.8s</span> faster
</div>
</div>
<div class="stat-card animate-in" style="animation-delay: 0.4s">
<div class="stat-label">Active Failures</div>
<div class="stat-value danger" id="active-failures">0</div>
<div class="stat-change down">
<span>↑ 3</span> since yesterday
</div>
</div>
</div>
<div class="main-grid">
<div class="card animate-in" style="animation-delay: 0.5s">
<div class="card-header">
<span class="card-title">Root Causes</span>
<span class="card-badge">Top 5</span>
</div>
<div class="donut-container">
<div class="donut-chart">
<svg width="200" height="200" viewBox="0 0 200 200">
<circle cx="100" cy="100" r="72" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="28"/>
<g id="donut-segments"></g>
</svg>
<div class="donut-center">
<div class="donut-center-value" id="total-errors">0</div>
<div class="donut-center-label">Total Errors</div>
</div>
</div>
<div class="legend" id="legend"></div>
</div>
</div>
<div class="card animate-in" style="animation-delay: 0.6s">
<div class="card-header">
<span class="card-title">Retry Success Rate Over Time</span>
<span class="card-badge">Live</span>
</div>
<div class="timeline-chart">
<div class="timeline-grid" id="timeline"></div>
</div>
</div>
</div>
<div class="failures-section">
<div class="card animate-in" style="animation-delay: 0.7s">
<div class="card-header">
<span class="card-title">Recent Failures</span>
<span class="card-badge" id="failures-count">0 items</span>
</div>
<div class="failures-table">
<div class="table-header">
<span>Endpoint</span>
<span>Error</span>
<span>Status</span>
<span>Attempts</span>
</div>
<div id="failures-list"></div>
</div>
</div>
<div class="card animate-in" style="animation-delay: 0.8s">
<div class="card-header">
<span class="card-title">Recommended Fixes</span>
<span class="card-badge">Priority</span>
</div>
<div class="fixes-list" id="fixes-list"></div>
</div>
</div>
</div>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
}
}
</script>
<script type="module">
import * as THREE from 'three';
// Three.js Background
const canvas = document.getElementById('bg-canvas');
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
// Particle System
const particleCount = 800;
const positions = new Float32Array(particleCount * 3);
const colors = new Float32Array(particleCount * 3);
const sizes = new Float32Array(particleCount);
const velocities = [];
for (let i = 0; i < particleCount; i++) {
positions[i * 3] = (Math.random() - 0.5) * 50;
positions[i * 3 + 1] = (Math.random() - 0.5) * 50;
positions[i * 3 + 2] = (Math.random() - 0.5) * 30;
const colorChoice = Math.random();
if (colorChoice < 0.4) {
colors[i * 3] = 0;
colors[i * 3 + 1] = 0.83;
colors[i * 3 + 2] = 0.67;
} else if (colorChoice < 0.7) {
colors[i * 3] = 0.3;
colors[i * 3 + 1] = 0.67;
colors[i * 3 + 2] = 0.8;
} else {
colors[i * 3] = 1;
colors[i * 3 + 1] = 0.72;
colors[i * 3 + 2] = 0.3;
}
sizes[i] = Math.random() * 3 + 1;
velocities.push({
x: (Math.random() - 0.5) * 0.01,
y: (Math.random() - 0.5) * 0.01,
z: (Math.random() - 0.5) * 0.005
});
}
const particleGeometry = new THREE.BufferGeometry();
particleGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
particleGeometry.setAttribute('aColor', new THREE.BufferAttribute(colors, 3));
particleGeometry.setAttribute('aSize', new THREE.BufferAttribute(sizes, 1));
const particleMaterial = new THREE.ShaderMaterial({
uniforms: {
uTime: { value: 0 },
uPixelRatio: { value: renderer.getPixelRatio() }
},
vertexShader: `
attribute vec3 aColor;
attribute float aSize;
varying vec3 vColor;
uniform float uTime;
uniform float uPixelRatio;
void main() {
vColor = aColor;
vec3 pos = position;
pos.y += sin(uTime * 0.5 + position.x * 0.1) * 0.5;
pos.x += cos(uTime * 0.3 + position.z * 0.1) * 0.3;
vec4 mvPosition = modelViewMatrix * vec4(pos, 1.0);
gl_PointSize = aSize * uPixelRatio * (100.0 / -mvPosition.z);
gl_Position = projectionMatrix * mvPosition;
}
`,
fragmentShader: `
varying vec3 vColor;
void main() {
float dist = length(gl_PointCoord - vec2(0.5));
if (dist > 0.5) discard;
float alpha = 1.0 - smoothstep(0.2, 0.5, dist);
gl_FragColor = vec4(vColor, alpha * 0.6);
}
`,
transparent: true,
blending: THREE.AdditiveBlending,
depthWrite: false
});
const particles = new THREE.Points(particleGeometry, particleMaterial);
scene.add(particles);
camera.position.z = 20;
// Mouse interaction
let mouseX = 0, mouseY = 0;
document.addEventListener('mousemove', (e) => {
mouseX = (e.clientX / window.innerWidth - 0.5) * 2;
mouseY = (e.clientY / window.innerHeight - 0.5) * 2;
});
function animateParticles() {
const time = performance.now() * 0.001;
particleMaterial.uniforms.uTime.value = time;
particles.rotation.y += 0.0003;
particles.rotation.y += mouseX * 0.0005;
particles.rotation.x += mouseY * 0.0002;
renderer.render(scene, camera);
requestAnimationFrame(animateParticles);
}
animateParticles();
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
particleMaterial.uniforms.uPixelRatio.value = renderer.getPixelRatio();
});
// Dashboard Data
const rootCauses = [
{ name: 'Timeout Errors', value: 342, color: '#ff6b6b' },
{ name: 'Invalid Endpoint', value: 218, color: '#ffb84d' },
{ name: 'Auth Failure', value: 156, color: '#4dabf7' },
{ name: 'Rate Limited', value: 124, color: '#a78bfa' },
{ name: 'SSL Errors', value: 89, color: '#00d4aa' }
];
const timelineData = [
{ time: '00:00', success: 85, fail: 15 },
{ time: '02:00', success: 92, fail: 8 },
{ time: '04:00', success: 78, fail: 22 },
{ time: '06:00', success: 88, fail: 12 },
{ time: '08:00', success: 95, fail: 5 },
{ time: '10:00', success: 72, fail: 28 },
{ time: '12:00', success: 89, fail: 11 },
{ time: '14:00', success: 94, fail: 6 },
{ time: '16:00', success: 86, fail: 14 },
{ time: '18:00', success: 91, fail: 9 },
{ time: '20:00', success: 83, fail: 17 },
{ time: '22:00', success: 96, fail: 4 }
];
const failures = [
{ endpoint: '/api/webhooks/payment', error: 'Connection timeout', status: 'retrying', attempts: 3 },
{ endpoint: '/api/webhooks/delivery', error: '503 Service Unavailable', status: 'failed', attempts: 5 },
{ endpoint: '/api/webhooks/order', error: 'Invalid SSL certificate', status: 'retrying', attempts: 2 },
{ endpoint: '/api/webhooks/inventory', error: 'Rate limit exceeded', status: 'resolved', attempts: 4 },
{ endpoint: '/api/webhooks/shipping', error: 'Authentication failed', status: 'retrying', attempts: 1 },
{ endpoint: '/api/webhooks/refund', error: 'DNS resolution failed', status: 'failed', attempts: 5 },
{ endpoint: '/api/webhooks/notify', error: 'Connection refused', status: 'retrying', attempts: 2 }
];
const fixes = [
{ title: 'Increase Timeout Threshold', desc: 'Current timeout of 5s is too low for payment webhooks. Increase to 15s.', impact: 'Could reduce timeout errors by 60%', priority: 'critical' },
{ title: 'Implement Circuit Breaker', desc: 'Add circuit breaker pattern for endpoints with repeated failures.', impact: 'Prevents cascade failures, saves 40% retries', priority: 'warning' },
{ title: 'Rotate API Keys', desc: 'Some authentication failures are due to expired keys. Implement auto-rotation.', impact: 'Eliminates 25% of auth failures', priority: 'info' },
{ title: 'Add Retry Backoff', desc: 'Implement exponential backoff for rate-limited endpoints.', impact: 'Reduces rate limit errors by 80%', priority: 'warning' }
];
// Animate counters
function animateValue(element, start, end, duration, suffix = '') {
const startTime = performance.now();
const update = (currentTime) => {
const elapsed = currentTime - startTime;
const progress = Math.min(elapsed / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const current = Math.floor(start + (end - start) * eased);
element.textContent = current.toLocaleString() + suffix;
if (progress < 1) requestAnimationFrame(update);
};
requestAnimationFrame(update);
}
// Initialize stats
setTimeout(() => {
animateValue(document.getElementById('total-retries'), 0, 929, 1500);
animateValue(document.getElementById('success-rate'), 0, 87, 1500, '%');
animateValue(document.getElementById('avg-time'), 0, 4.2, 1500, 's');
animateValue(document.getElementById('active-failures'), 0, 23, 1500);
}, 300);
// Render donut chart
function renderDonut() {
const total = rootCauses.reduce((sum, item) => sum + item.value, 0);
document.getElementById('total-errors').textContent = total.toLocaleString();
const segmentsContainer = document.getElementById('donut-segments');
const legendContainer = document.getElementById('legend');
const circumference = 2 * Math.PI * 72;
let currentOffset = 0;
rootCauses.forEach((cause, index) => {
const percentage = cause.value / total;
const segmentLength = circumference * percentage;
const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
circle.setAttribute('cx', '100');
circle.setAttribute('cy', '100');
circle.setAttribute('r', '72');
circle.setAttribute('class', 'donut-segment');
circle.setAttribute('stroke', cause.color);
circle.setAttribute('stroke-dasharray', `${segmentLength} ${circumference}`);
circle.setAttribute('stroke-dashoffset', circumference);
circle.style.transitionDelay = `${index * 0.1}s`;
segmentsContainer.appendChild(circle);
setTimeout(() => {
circle.setAttribute('stroke-dashoffset', -currentOffset);
}, 100);
currentOffset += segmentLength;
const legendItem = document.createElement('div');
legendItem.className = 'legend-item';
legendItem.innerHTML = `
<div class="legend-color" style="background: ${cause.color}"></div>
<span class="legend-text">${cause.name}</span>
<span class="legend-value">${cause.value}</span>
`;
legendContainer.appendChild(legendItem);
});
}
// Render timeline
function renderTimeline() {
const container = document.getElementById('timeline');
const maxValue = 100;
timelineData.forEach((data, index) => {
const group = document.createElement('div');
group.className = 'timeline-bar-group';
const successBar = document.createElement('div');
successBar.className = 'timeline-bar success-bar';
successBar.style.height = '0px';
const failBar = document.createElement('div');
failBar.className = 'timeline-bar fail-bar';
failBar.style.height = '0px';
const successTooltip = document.createElement('div');
successTooltip.className = 'timeline-tooltip';
successTooltip.textContent = `Success: ${data.success}%`;
successBar.appendChild(successTooltip);
const failTooltip = document.createElement('div');
failTooltip.className = 'timeline-tooltip';
failTooltip.textContent = `Failed: ${data.fail}%`;
failBar.appendChild(failTooltip);
const label = document.createElement('span');
label.className = 'timeline-label';
label.textContent = data.time;
group.appendChild(successBar);
group.appendChild(failBar);
group.appendChild(label);
container.appendChild(group);
setTimeout(() => {
const totalHeight = 150;
successBar.style.height = `${(data.success / maxValue) * totalHeight}px`;
failBar.style.height = `${(data.fail / maxValue) * totalHeight}px`;
}, 100 + index * 50);
});
}
// Render failures table
function renderFailures() {
const container = document.getElementById('failures-list');
document.getElementById('failures-count').textContent = `${failures.length} items`;
failures.forEach((failure, index) => {
const row = document.createElement('div');
row.className = 'table-row';
row.style.animationDelay = `${0.8 + index * 0.1}s`;
row.innerHTML = `
<span>${failure.endpoint}</span>
<span style="color: #9aa0a6">${failure.error}</span>
<span class="status-badge ${failure.status}">${failure.status}</span>
<span class="attempt-count">${failure.attempts}/5</span>
`;
container.appendChild(row);
});
}
// Render fixes
function renderFixes() {
const container = document.getElementById('fixes-list');
fixes.forEach((fix, index) => {
const item = document.createElement('div');
item.className = `fix-item ${fix.priority}`;
item.style.animationDelay = `${0.9 + index * 0.1}s`;
item.innerHTML = `
<div class="fix-title">${fix.title}</div>
<div class="fix-desc">${fix.desc}</div>
<div class="fix-impact">→ ${fix.impact}</div>
`;
container.appendChild(item);
});
}
// Time filter interaction
document.querySelectorAll('.time-btn').forEach(btn => {
btn.addEventListener('click', function() {
document.querySelectorAll('.time-btn').forEach(b => b.classList.remove('active'));
this.classList.add('active');
// Simulate data refresh
const multiplier = {
'1h': 0.1, '6h': 0.4, '24h': 1, '7d': 3, '30d': 10
}[this.dataset.range] || 1;
animateValue(document.getElementById('total-retries'), 0, Math.floor(929 * multiplier), 800);
animateValue(document.getElementById('success-rate'), 0, Math.min(95, 87 + Math.floor(Math.random() * 8)), 800, '%');
});
});
// Initialize all components
renderDonut();
renderTimeline();
renderFailures();
renderFixes();
// Live update simulation
setInterval(() => {
const activeFailures = document.getElementById('active-failures');
const current = parseInt(activeFailures.textContent) || 0;
const change = Math.random() > 0.5 ? 1 : -1;
animateValue(activeFailures, current, Math.max(0, current + change), 300);
}, 5000);
</script>
</body>
</html>
Features Implemented:
Root Causes Analysis
- Animated donut chart with staggered segment animations
- Interactive legend with hover effects
- Shows top 5 failure categories with counts
Success Rate Metrics
- Four stat cards with animated counters
- Timeline bar chart showing success/failure distribution over 24 hours
- Tooltip interactions on hover for detailed data
Recent Failures Table
- Scrollable list of recent webhook failures
- Status badges (retrying/failed/resolved) with color coding
- Endpoint, error type, status, and attempt count
Recommended Fixes
- Priority-based suggestions (critical/warning/info)
- Impact estimates for each fix
- Hover interactions
Visual Effects
- 3D particle background with Three.js - flowing, reactive particles
- Mouse-reactive camera movement
- Animated number counters with easing
- Staggered card animations on load
- Hover micro-interactions throughout
- Live data simulation with periodic updates