undefined / dashboard.html
warmanintown's picture
make the buttons workiing
ff220e4 verified
Raw History Blame Contribute Delete
11.5 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard | GridGuardian</title>
<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/chart.js"></script>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="zap" class="text-blue-500 h-8 w-8"></i>
<span class="ml-2 text-xl font-bold text-gray-900">GridGuardian</span>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="dashboard.html" class="border-blue-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Dashboard
</a>
<a href="projects.html" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Projects
</a>
<a href="analysis.html" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Risk Analysis
</a>
<a href="reports.html" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Reports
</a>
</div>
</div>
<div class="hidden sm:ml-6 sm:flex sm:items-center">
<button class="bg-blue-500 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium flex items-center">
<i data-feather="plus" class="mr-2 h-4 w-4"></i>
New Analysis
</button>
</div>
</div>
</div>
</nav>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<h3 class="text-gray-500 text-sm font-medium">Active Projects</h3>
<i data-feather="folder" class="text-blue-500"></i>
</div>
<p class="mt-2 text-3xl font-bold text-gray-900">42</p>
<p class="mt-1 text-sm text-green-600">+3 from last month</p>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<h3 class="text-gray-500 text-sm font-medium">High Risk</h3>
<i data-feather="alert-triangle" class="text-red-500"></i>
</div>
<p class="mt-2 text-3xl font-bold text-gray-900">8</p>
<p class="mt-1 text-sm text-red-600">+1 from yesterday</p>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<h3 class="text-gray-500 text-sm font-medium">Avg. Risk Score</h3>
<i data-feather="activity" class="text-yellow-500"></i>
</div>
<p class="mt-2 text-3xl font-bold text-gray-900">64%</p>
<p class="mt-1 text-sm text-green-600">-2% from last week</p>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<h3 class="text-gray-500 text-sm font-medium">Cost Overruns</h3>
<i data-feather="dollar-sign" class="text-green-500"></i>
</div>
<p class="mt-2 text-3xl font-bold text-gray-900">5</p>
<p class="mt-1 text-sm text-green-600">-2 from last quarter</p>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<div class="lg:col-span-2 bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Project Risk Timeline</h3>
<canvas id="timelineChart" height="250"></canvas>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Risk Distribution</h3>
<canvas id="riskChart" height="250"></canvas>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Recent Alerts</h3>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Risk Type</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Severity</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Updated</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-gray-900">PG-4218</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Monsoon Delay</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">High</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Monitoring</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2 hours ago</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PG-3872</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Material Shortage</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Medium</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Mitigated</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5 hours ago</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">PG-4056</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Regulatory Change</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Critical</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Action Required</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1 day ago</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script>
// Initialize charts
const timelineCtx = document.getElementById('timelineChart').getContext('2d');
const timelineChart = new Chart(timelineCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
label: 'High Risk Projects',
data: [12, 19, 15, 8, 10, 12, 15],
borderColor: 'rgb(239, 68, 68)',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
tension: 0.3,
fill: true
}, {
label: 'Medium Risk Projects',
data: [24, 28, 32, 29, 26, 28, 30],
borderColor: 'rgb(234, 179, 8)',
backgroundColor: 'rgba(234, 179, 8, 0.1)',
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
const riskCtx = document.getElementById('riskChart').getContext('2d');
const riskChart = new Chart(riskCtx, {
type: 'doughnut',
data: {
labels: ['Terrain', 'Weather', 'Materials', 'Regulatory', 'Labor'],
datasets: [{
data: [35, 25, 20, 15, 5],
backgroundColor: [
'rgb(239, 68, 68)',
'rgb(234, 179, 8)',
'rgb(59, 130, 246)',
'rgb(16, 185, 129)',
'rgb(139, 92, 246)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
}
}
}
});
// Initialize feather icons
feather.replace();
</script>
</body>
</html>