asdasd / index.html
BrandonMoodaley's picture
Objective:
c1ef35c verified
Raw History Blame Contribute Delete
23.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ticket Analytics Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.sidebar {
transition: all 0.3s ease;
}
.chart-container {
background-color: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
}
.file-upload {
border: 2px dashed rgba(156, 163, 175, 0.5);
transition: all 0.3s ease;
}
.file-upload:hover {
border-color: rgba(99, 102, 241, 0.8);
background-color: rgba(99, 102, 241, 0.05);
}
.ticket-card {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ticket-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-indigo-800 text-white w-64 flex-shrink-0 flex flex-col">
<div class="p-4 border-b border-indigo-700 flex items-center">
<i data-feather="bar-chart-2" class="mr-2"></i>
<h1 class="text-xl font-bold">Ticket Analytics</h1>
</div>
<nav class="flex-1 p-4 space-y-2">
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg bg-indigo-700">
<i data-feather="home"></i>
<span>Dashboard</span>
</a>
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-indigo-700">
<i data-feather="upload"></i>
<span>Import Data</span>
</a>
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-indigo-700">
<i data-feather="clock"></i>
<span>Response Times</span>
</a>
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-indigo-700">
<i data-feather="users"></i>
<span>Team Performance</span>
</a>
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-indigo-700">
<i data-feather="trending-up"></i>
<span>Trend Analysis</span>
</a>
<a href="#" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-indigo-700">
<i data-feather="settings"></i>
<span>Settings</span>
</a>
</nav>
<div class="p-4 border-t border-indigo-700">
<div class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center">
<i data-feather="user"></i>
</div>
<div>
<p class="text-sm font-medium">Admin User</p>
<p class="text-xs text-indigo-300">admin@example.com</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Top Navigation -->
<header class="bg-white border-b border-gray-200 flex items-center justify-between p-4">
<div class="flex items-center space-x-4">
<button class="md:hidden">
<i data-feather="menu"></i>
</button>
<h2 class="text-lg font-semibold">Dashboard Overview</h2>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<button class="p-2 rounded-full hover:bg-gray-100">
<i data-feather="bell"></i>
</button>
</div>
</header>
<!-- Main Content Area -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<!-- File Upload Section -->
<div class="mb-8">
<div class="file-upload rounded-xl p-8 text-center cursor-pointer">
<div class="mx-auto w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-4">
<i data-feather="upload" class="text-indigo-600 w-8 h-8"></i>
</div>
<h3 class="text-lg font-medium mb-1">Upload Ticket Data</h3>
<p class="text-gray-500 mb-4">Drag & drop your Excel file here or click to browse</p>
<input type="file" id="file-upload" class="hidden" accept=".xlsx, .xls">
<label for="file-upload" class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 cursor-pointer">
<i data-feather="file" class="mr-2"></i>
Select File
</label>
<p class="text-xs text-gray-400 mt-2">Supports .xlsx and .xls files with required columns</p>
</div>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="ticket-card bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm font-medium text-gray-500">Total Tickets</p>
<h3 class="text-2xl font-bold mt-1">1,248</h3>
</div>
<div class="p-2 rounded-lg bg-indigo-100 text-indigo-600">
<i data-feather="inbox"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i data-feather="trending-up" class="mr-1"></i>
<span>12% from last month</span>
</div>
</div>
</div>
<div class="ticket-card bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm font-medium text-gray-500">Avg. Resolution Time</p>
<h3 class="text-2xl font-bold mt-1">3.2 <span class="text-sm font-normal">days</span></h3>
</div>
<div class="p-2 rounded-lg bg-green-100 text-green-600">
<i data-feather="clock"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-red-500">
<i data-feather="trending-down" class="mr-1"></i>
<span>8% improvement</span>
</div>
</div>
</div>
<div class="ticket-card bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm font-medium text-gray-500">SLA Compliance</p>
<h3 class="text-2xl font-bold mt-1">92%</h3>
</div>
<div class="p-2 rounded-lg bg-blue-100 text-blue-600">
<i data-feather="check-circle"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i data-feather="trending-up" class="mr-1"></i>
<span>5% from last quarter</span>
</div>
</div>
</div>
<div class="ticket-card bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-sm font-medium text-gray-500">Top Performer</p>
<h3 class="text-2xl font-bold mt-1">Team A</h3>
</div>
<div class="p-2 rounded-lg bg-purple-100 text-purple-600">
<i data-feather="award"></i>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-gray-500">
<i data-feather="zap" class="mr-1"></i>
<span>98% resolution rate</span>
</div>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="chart-container bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Tickets Closed Over Time</h3>
<div class="flex space-x-2">
<button class="px-3 py-1 text-xs bg-gray-100 rounded-lg">Week</button>
<button class="px-3 py-1 text-xs bg-indigo-100 text-indigo-600 rounded-lg">Month</button>
<button class="px-3 py-1 text-xs bg-gray-100 rounded-lg">Quarter</button>
</div>
</div>
<div class="h-64">
<canvas id="ticketsOverTimeChart"></canvas>
</div>
</div>
<div class="chart-container bg-white rounded-xl p-6 shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Tickets by Priority</h3>
<button class="text-indigo-600 text-sm flex items-center">
<i data-feather="download" class="mr-1 w-4 h-4"></i>
Export
</button>
</div>
<div class="h-64">
<canvas id="priorityChart"></canvas>
</div>
</div>
</div>
<!-- Recent Tickets Table -->
<div class="bg-white rounded-xl shadow-sm overflow-hidden">
<div class="p-6 border-b border-gray-200 flex justify-between items-center">
<h3 class="font-medium">Recent Ticket Activity</h3>
<button class="text-indigo-600 text-sm flex items-center">
<i data-feather="refresh-cw" class="mr-1 w-4 h-4"></i>
Refresh
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ticket ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Subject</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Priority</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Resolution Time</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Assigned To</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">TKT-1001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Login issues</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">High</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Closed</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2.5 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">John D.</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">TKT-1002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Password reset</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">Medium</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Closed</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">4 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah M.</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">TKT-1003</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Feature request</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Low</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Pending</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3 days</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Team B</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">TKT-1004</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Database error</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">High</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Closed</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">6 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mike T.</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-indigo-600">TKT-1005</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">UI improvements</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800">Normal</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">In Progress</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1 day</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lisa K.</td>
</tr>
</tbody>
</table>
</div>
<div class="px-6 py-3 border-t border-gray-200 flex items-center justify-between">
<div class="text-sm text-gray-500">
Showing <span class="font-medium">1</span> to <span class="font-medium">5</span> of <span class="font-medium">1248</span> tickets
</div>
<div class="flex space-x-2">
<button class="px-3 py-1 rounded-lg border border-gray-300 text-sm">Previous</button>
<button class="px-3 py-1 rounded-lg bg-indigo-600 text-white text-sm">1</button>
<button class="px-3 py-1 rounded-lg border border-gray-300 text-sm">2</button>
<button class="px-3 py-1 rounded-lg border border-gray-300 text-sm">3</button>
<button class="px-3 py-1 rounded-lg border border-gray-300 text-sm">Next</button>
</div>
</div>
</div>
</main>
</div>
<script>
// Initialize AOS animations
AOS.init();
// Initialize feather icons
feather.replace();
// Sample Chart.js implementation
document.addEventListener('DOMContentLoaded', function() {
// Tickets Over Time Chart
const ticketsOverTimeCtx = document.getElementById('ticketsOverTimeChart').getContext('2d');
const ticketsOverTimeChart = new Chart(ticketsOverTimeCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
label: 'Tickets Closed',
data: [120, 190, 170, 210, 240, 220, 250],
backgroundColor: 'rgba(99, 102, 241, 0.1)',
borderColor: 'rgba(99, 102, 241, 1)',
borderWidth: 2,
tension: 0.4,
fill: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true,
grid: {
drawBorder: false
}
},
x: {
grid: {
display: false
}
}
}
}
});
// Priority Chart
const priorityCtx = document.getElementById('priorityChart').getContext('2d');
const priorityChart = new Chart(priorityCtx, {
type: 'doughnut',
data: {
labels: ['High', 'Medium', 'Low', 'Normal'],
datasets: [{
data: [15, 25, 30, 30],
backgroundColor: [
'rgba(239, 68, 68, 0.8)',
'rgba(234, 179, 8, 0.8)',
'rgba(34, 197, 94, 0.8)',
'rgba(59, 130, 246, 0.8)'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'right',
}
},
cutout: '70%'
}
});
// File upload interaction
const fileUpload = document.querySelector('.file-upload');
const fileInput = document.getElementById('file-upload');
fileUpload.addEventListener('click', () => fileInput.click());
fileInput.addEventListener('change', function() {
if (this.files && this.files[0]) {
// Here you would handle the file upload and processing
console.log('File selected:', this.files[0].name);
// Simulate processing
fileUpload.innerHTML = `
<div class="flex items-center justify-center mb-4">
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-indigo-500"></div>
</div>
<p class="text-gray-700">Processing ${this.files[0].name}...</p>
`;
setTimeout(() => {
fileUpload.innerHTML = `
<div class="mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4">
<i data-feather="check" class="text-green-600 w-8 h-8"></i>
</div>
<h3 class="text-lg font-medium mb-1">File Processed Successfully</h3>
<p class="text-gray-500 mb-4">${this.files[0].name}</p>
<button class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">
<i data-feather="refresh-cw" class="mr-2"></i>
Refresh Dashboard
</button>
`;
feather.replace();
}, 2000);
}
});
});
</script>
</body>
</html>