undefined / analysis.html
warmanintown's picture
make the buttons workiing
ff220e4 verified
Raw History Blame Contribute Delete
14.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Risk Analysis | 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-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">
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-blue-500 text-gray-900 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="flex justify-between items-center mb-8">
<h1 class="text-2xl font-bold text-gray-900">Risk Analysis Center</h1>
<div class="flex space-x-3">
<button class="flex items-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
<i data-feather="download" class="mr-2 h-4 w-4"></i>
Export
</button>
<button class="flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-500 hover:bg-blue-700">
<i data-feather="refresh-cw" class="mr-2 h-4 w-4"></i>
Run Analysis
</button>
</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">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">Risk Trend Analysis</h3>
<div class="flex items-center space-x-2">
<span class="text-sm text-gray-500">Timeframe:</span>
<select class="border-gray-300 rounded-md text-sm">
<option>Last 7 days</option>
<option selected>Last 30 days</option>
<option>Last 90 days</option>
<option>Year to date</option>
</select>
</div>
</div>
<canvas id="riskTrendChart" height="300"></canvas>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Risk Category Breakdown</h3>
<canvas id="riskCategoryChart" height="300"></canvas>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Geographic Risk Heatmap</h3>
<div class="bg-gray-100 rounded-md h-64 flex items-center justify-center">
<p class="text-gray-500">Interactive map visualization would appear here</p>
</div>
<div class="mt-4 grid grid-cols-3 gap-4">
<div>
<div class="flex items-center">
<div class="h-3 w-3 rounded-full bg-red-500 mr-2"></div>
<span class="text-sm text-gray-700">High Risk</span>
</div>
<p class="text-xl font-bold mt-1">8</p>
</div>
<div>
<div class="flex items-center">
<div class="h-3 w-3 rounded-full bg-yellow-500 mr-2"></div>
<span class="text-sm text-gray-700">Medium Risk</span>
</div>
<p class="text-xl font-bold mt-1">14</p>
</div>
<div>
<div class="flex items-center">
<div class="h-3 w-3 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-700">Low Risk</span>
</div>
<p class="text-xl font-bold mt-1">20</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<h3 class="text-lg font-medium text-gray-900 mb-4">Risk Mitigation Progress</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-700">Regulatory Approvals</span>
<span class="font-medium">65% Complete</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 65%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-700">Material Procurement</span>
<span class="font-medium">42% Complete</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-yellow-500 h-2 rounded-full" style="width: 42%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-700">Land Acquisition</span>
<span class="font-medium">88% Complete</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-500 h-2 rounded-full" style="width: 88%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span class="text-gray-700">Labor Availability</span>
<span class="font-medium">73% Complete</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 73%"></div>
</div>
</div>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">Recommended Mitigation Actions</h3>
<button class="text-sm text-blue-500 font-medium">View All</button>
</div>
<div class="divide-y divide-gray-200">
<div class="py-4 flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-red-100 flex items-center justify-center">
<i data-feather="alert-triangle" class="text-red-500"></i>
</div>
<div class="ml-4">
<h4 class="text-sm font-medium text-gray-900">PG-4218: Monsoon Preparedness</h4>
<p class="text-sm text-gray-500 mt-1">Coastal Maharashtra projects require additional monsoon preparation measures. Recommended to accelerate drainage work and secure equipment covers.</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<span>Priority: High</span>
<span class="mx-1">•</span>
<span>Due: June 15</span>
</div>
</div>
</div>
<div class="py-4 flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 flex items-center justify-center">
<i data-feather="clock" class="text-yellow-500"></i>
</div>
<div class="ml-4">
<h4 class="text-sm font-medium text-gray-900">Vendor Diversification</h4>
<p class="text-sm text-gray-500 mt-1">Over-reliance on single steel supplier detected. Recommended to onboard 2 additional vendors within 30 days to mitigate supply chain risk.</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<span>Priority: Medium</span>
<span class="mx-1">•</span>
<span>Due: July 1</span>
</div>
</div>
</div>
<div class="py-4 flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
<i data-feather="file-text" class="text-blue-500"></i>
</div>
<div class="ml-4">
<h4 class="text-sm font-medium text-gray-900">Regulatory Compliance Update</h4>
<p class="text-sm text-gray-500 mt-1">New Karnataka state regulations require updated documentation for substation projects. Legal team review required by July 10.</p>
<div class="mt-2 flex items-center text-xs text-gray-500">
<span>Priority: Medium</span>
<span class="mx-1">•</span>
<span>Due: July 10</span>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize charts
const riskTrendCtx = document.getElementById('riskTrendChart').getContext('2d');
const riskTrendChart = new Chart(riskTrendCtx, {
type: 'line',
data: {
labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'],
datasets: [{
label: 'Critical Risks',
data: [5, 8, 6, 9],
borderColor: 'rgb(239, 68, 68)',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
tension: 0.3,
fill: true
}, {
label: 'Moderate Risks',
data: [12, 15, 18, 14],
borderColor: 'rgb(234, 179, 8)',
backgroundColor: 'rgba(234, 179, 8, 0.1)',
tension: 0.3,
fill: true
}, {
label: 'Low Risks',
data: [20, 18, 22, 25],
borderColor: 'rgb(16, 185, 129)',
backgroundColor: 'rgba(16, 185, 129, 0.1)',
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
const riskCategoryCtx = document.getElementById('riskCategoryChart').getContext('2d');
const riskCategoryChart = new Chart(riskCategoryCtx, {
type: 'bar',
data: {
labels: ['Materials', 'Weather', 'Regulatory', 'Labor', 'Terrain'],
datasets: [{
label: 'Risk Incidents',
data: [42, 38, 25, 15, 30],
backgroundColor: [
'rgba(239, 68, 68, 0.7)',
'rgba(234, 179, 8, 0.7)',
'rgba(59, 130, 246, 0.7)',
'rgba(16, 185, 129, 0.7)',
'rgba(139, 92, 246, 0.7)'
],
borderColor: [
'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: {
display: false
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Initialize feather icons
feather.replace();
</script>
</body>
</html>