Spaces:
Running

undefined / dashboard.html
Marwuko's picture
add the backend
5e523a1 verified
Raw History Blame Contribute Delete
14.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AVA Dashboard</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.gradient-text {
background: linear-gradient(90deg, #6d28d9 0%, #a855f7 50%, #7c3aed 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.stats-card {
transition: all 0.3s ease;
}
.stats-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="bg-gray-50">
<div class="min-h-screen flex flex-col">
<!-- Header -->
<header class="bg-white shadow-sm border-b border-gray-200">
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
<div class="flex items-center space-x-3">
<i data-feather="zap" class="text-purple-600 w-6 h-6"></i>
<span class="text-xl font-bold gradient-text">AVA Dashboard</span>
</div>
<nav class="flex space-x-6 items-center">
<a href="index.html" class="text-gray-600 hover:text-purple-600 font-medium transition-colors">Home</a>
<a href="index.html#features" class="text-gray-600 hover:text-purple-600 font-medium transition-colors">Features</a>
<a href="index.html#integrations" class="text-gray-600 hover:text-purple-600 font-medium transition-colors">Integrations</a>
<a href="backend.html" class="text-gray-600 hover:text-purple-600 font-medium transition-colors">API</a>
<div class="flex items-center space-x-3">
<span class="text-sm text-gray-600">Welcome back, User</span>
<div class="w-8 h-8 bg-purple-600 rounded-full flex items-center justify-center text-white text-sm font-medium">U</span>
</div>
</nav>
</div>
</header>
<!-- Main Dashboard -->
<main class="flex-grow">
<div class="container mx-auto px-6 py-8">
<!-- Stats Overview -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="stats-card bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600 font-medium">Workflows Executed</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">1,247</h3>
<p class="text-xs text-green-600 mt-1">+12% this week</p>
</div>
<div class="bg-purple-100 p-3 rounded-lg">
<i data-feather="play" class="w-5 h-5 text-purple-600"></i>
</div>
</div>
</div>
<div class="stats-card bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600 font-medium">Active Automations</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">23</h3>
<p class="text-xs text-blue-600 mt-1">running</p>
</div>
<div class="bg-blue-100 p-3 rounded-lg">
<i data-feather="refresh-cw" class="w-5 h-5 text-blue-600"></i>
</div>
</div>
</div>
<div class="stats-card bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600 font-medium">Time Saved</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">342h</h3>
<p class="text-xs text-green-600 mt-1">total</p>
</div>
<div class="bg-green-100 p-3 rounded-lg">
<i data-feather="clock" class="w-5 h-5 text-green-600"></i>
</div>
</div>
</div>
<div class="stats-card bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600 font-medium">Success Rate</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">98.7%</h3>
<p class="text-xs text-green-600 mt-1">average</p>
</div>
<div class="bg-yellow-100 p-3 rounded-lg">
<i data-feather="trending-up" class="w-5 h-5 text-yellow-600"></i>
</div>
</div>
</div>
</div>
<!-- Recent Activity & Quick Actions -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Recent Activity -->
<div class="bg-white rounded-lg shadow-sm border border-gray-100 p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-6">Recent Activity</h3>
<div class="space-y-4">
<div class="flex items-center justify-between p-4 bg-green-50 rounded-lg border border-green-200">
<div class="flex items-center space-x-3">
<div class="bg-green-500 p-2 rounded-lg">
<i data-feather="check-circle" class="w-4 h-4 text-white"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">Excel Report Generated</p>
<p class="text-sm text-gray-600 mt-1">Q3 Sales Analysis</p>
<p class="text-xs text-gray-500 mt-1">Completed 2 min ago</p>
</div>
<button class="text-purple-600 hover:text-purple-700 text-sm font-medium">View</button>
</div>
</div>
<div class="flex items-center justify-between p-4 bg-blue-50 rounded-lg border border-blue-200">
<div class="flex items-center space-x-3">
<div class="bg-blue-500 p-2 rounded-lg">
<i data-feather="mail" class="w-4 h-4 text-white"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">Email Campaign Sent</p>
<p class="text-sm text-gray-600 mt-1">Monthly Newsletter</p>
<p class="text-xs text-gray-500 mt-1">Completed 15 min ago</p>
</div>
<button class="text-purple-600 hover:text-purple-700 text-sm font-medium">Details</button>
</div>
</div>
<div class="flex items-center justify-between p-4 bg-purple-50 rounded-lg border border-purple-200">
<div class="flex items-center space-x-3">
<div class="bg-purple-500 p-2 rounded-lg">
<i data-feather="bar-chart-2" class="w-4 h-4 text-white"></i>
</div>
<div class="flex-1">
<p class="font-medium text-gray-800">Dashboard Updated</p>
<p class="text-sm text-gray-600 mt-1">Real-time Metrics</p>
<p class="text-xs text-gray-500 mt-1">Updated 1 hour ago</p>
</div>
<button class="text-purple-600 hover:text-purple-700 text-sm font-medium">Open</button>
</div>
</div>
</div>
</div>
<!-- Quick Actions -->
<div class="bg-white rounded-lg shadow-sm border border-gray-100 p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-6">Quick Actions</h3>
<div class="grid grid-cols-2 gap-4">
<button onclick="createNewWorkflow()" class="bg-purple-600 hover:bg-purple-700 text-white p-4 rounded-lg font-medium transition-colors flex flex-col items-center space-y-2">
<i data-feather="plus" class="w-5 h-5"></i>
<span class="text-sm">New Workflow</span>
</button>
<button onclick="scheduleTask()" class="bg-blue-600 hover:bg-blue-700 text-white p-4 rounded-lg font-medium transition-colors flex flex-col items-center space-y-2">
<i data-feather="calendar" class="w-5 h-5"></i>
<span class="text-sm">Schedule Task</span>
</button>
<button onclick="viewAnalytics()" class="bg-green-600 hover:bg-green-700 text-white p-4 rounded-lg font-medium transition-colors flex flex-col items-center space-y-2">
<i data-feather="trending-up" class="w-5 h-5"></i>
<span class="text-sm">Analytics</span>
</button>
<button onclick="manageIntegrations()" class="bg-yellow-600 hover:bg-yellow-700 text-white p-4 rounded-lg font-medium transition-colors flex flex-col items-center space-y-2">
<i data-feather="settings" class="w-5 h-5"></i>
<span class="text-sm">Settings</span>
</button>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-white border-t border-gray-200 py-6">
<div class="container mx-auto px-6 text-center">
<p class="text-gray-600 text-sm">© 2023 AVA AI. All rights reserved.</p>
</div>
</footer>
</div>
<script>
// Dashboard functions
function createNewWorkflow() {
showNotification('Opening Workflow Builder - Create your automation with drag & drop components!', 'info');
}
function scheduleTask() {
showNotification('Task Scheduler opened - Set up recurring automations and monitoring.', 'success');
}
function viewAnalytics() {
showNotification('Analytics Dashboard loading - View performance metrics and insights.', 'info');
}
function manageIntegrations() {
showNotification('Integration Manager opened - Connect AVA with your favorite tools.', 'info');
}
function showNotification(message, type) {
const notification = document.createElement('div');
const bgColor = type === 'success' ? 'bg-green-500' :
type === 'error' ? 'bg-red-500' :
'bg-blue-500';
notification.className = `fixed top-4 right-4 p-4 rounded-lg shadow-lg z-50 transform transition-all duration-300 ${bgColor} text-white flex items-center space-x-3`;
const icon = type === 'success' ? 'check-circle' :
type === 'error' ? 'alert-circle' :
'info';
notification.innerHTML = `
<i data-feather="${icon}" class="w-5 h-5"></i>
<span>${message}</span>
`;
document.body.appendChild(notification);
feather.replace();
// Animate in
anime({
targets: notification,
translateX: [100, 0],
opacity: [0, 1],
duration: 500,
easing: 'easeOutExpo'
});
setTimeout(() => {
// Animate out
anime({
targets: notification,
translateX: 100,
opacity: 0,
duration: 500,
easing: 'easeInExpo',
complete: function() {
notification.remove();
}
});
}, 4000);
}
// Initialize on load
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
// Add hover animations
document.querySelectorAll('.stats-card, button').forEach(element => {
element.addEventListener('mouseenter', function() {
anime({
targets: element,
scale: [1, 1.02],
duration: 200,
easing: 'easeOutQuad'
});
});
element.addEventListener('mouseleave', function() {
anime({
targets: element,
scale: 1,
duration: 200,
easing: 'easeOutQuad'
});
});
});
});
</script>
</body>
</html>