Spaces:
Running
Running
The graphs are missing, can you fill them in? - Initial Deployment
Browse files- README.md +7 -5
- index.html +529 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: tms-dashboard
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,529 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>TMS Analytics Dashboard</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.js"></script>
|
| 10 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.7.1/dist/leaflet.css" />
|
| 11 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 12 |
+
<style>
|
| 13 |
+
.gauge-container {
|
| 14 |
+
position: relative;
|
| 15 |
+
width: 100%;
|
| 16 |
+
height: 0;
|
| 17 |
+
padding-bottom: 50%;
|
| 18 |
+
}
|
| 19 |
+
.gauge {
|
| 20 |
+
position: absolute;
|
| 21 |
+
top: 0;
|
| 22 |
+
left: 0;
|
| 23 |
+
width: 100%;
|
| 24 |
+
height: 100%;
|
| 25 |
+
}
|
| 26 |
+
#map {
|
| 27 |
+
height: 100%;
|
| 28 |
+
min-height: 300px;
|
| 29 |
+
border-radius: 0.5rem;
|
| 30 |
+
}
|
| 31 |
+
.alert-pulse {
|
| 32 |
+
animation: pulse 2s infinite;
|
| 33 |
+
}
|
| 34 |
+
@keyframes pulse {
|
| 35 |
+
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
|
| 36 |
+
70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
|
| 37 |
+
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
|
| 38 |
+
}
|
| 39 |
+
.scrollable-table {
|
| 40 |
+
max-height: 300px;
|
| 41 |
+
overflow-y: auto;
|
| 42 |
+
}
|
| 43 |
+
.progress-bar {
|
| 44 |
+
transition: width 0.5s ease-in-out;
|
| 45 |
+
}
|
| 46 |
+
</style>
|
| 47 |
+
</head>
|
| 48 |
+
<body class="bg-gray-100 font-sans">
|
| 49 |
+
<div class="container mx-auto px-4 py-6">
|
| 50 |
+
<!-- Header -->
|
| 51 |
+
<header class="flex flex-col md:flex-row justify-between items-center mb-6">
|
| 52 |
+
<div class="flex items-center mb-4 md:mb-0">
|
| 53 |
+
<i class="fas fa-truck text-blue-600 text-3xl mr-3"></i>
|
| 54 |
+
<h1 class="text-2xl font-bold text-gray-800">TMS Analytics Dashboard</h1>
|
| 55 |
+
</div>
|
| 56 |
+
<div class="flex items-center space-x-4">
|
| 57 |
+
<div class="relative">
|
| 58 |
+
<input type="text" placeholder="Search shipments..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 59 |
+
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 60 |
+
</div>
|
| 61 |
+
<div class="flex items-center">
|
| 62 |
+
<span class="mr-2 text-gray-600">Last updated: <span id="update-time" class="font-semibold">Just now</span></span>
|
| 63 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-lg">
|
| 64 |
+
<i class="fas fa-sync-alt mr-1"></i> Refresh
|
| 65 |
+
</button>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</header>
|
| 69 |
+
|
| 70 |
+
<!-- Dashboard Grid -->
|
| 71 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
| 72 |
+
<!-- Left Column -->
|
| 73 |
+
<div class="lg:col-span-2 space-y-6">
|
| 74 |
+
<!-- Real-time Shipment Tracking Map -->
|
| 75 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 76 |
+
<div class="flex justify-between items-center mb-4">
|
| 77 |
+
<h2 class="text-lg font-semibold text-gray-800">
|
| 78 |
+
<i class="fas fa-map-marked-alt text-blue-600 mr-2"></i> Real-time Shipment Tracking
|
| 79 |
+
</h2>
|
| 80 |
+
<div class="flex space-x-2">
|
| 81 |
+
<button class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-lg text-sm">
|
| 82 |
+
<i class="fas fa-filter mr-1"></i> Filters
|
| 83 |
+
</button>
|
| 84 |
+
<button class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-lg text-sm">
|
| 85 |
+
<i class="fas fa-layer-group mr-1"></i> Layers
|
| 86 |
+
</button>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
<div id="map" class="w-full"></div>
|
| 90 |
+
<div class="mt-4 grid grid-cols-2 md:grid-cols-4 gap-3">
|
| 91 |
+
<div class="bg-blue-50 p-2 rounded-lg flex items-center">
|
| 92 |
+
<div class="w-3 h-3 rounded-full bg-blue-600 mr-2"></div>
|
| 93 |
+
<span class="text-sm">In Transit (12)</span>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="bg-green-50 p-2 rounded-lg flex items-center">
|
| 96 |
+
<div class="w-3 h-3 rounded-full bg-green-600 mr-2"></div>
|
| 97 |
+
<span class="text-sm">Delivered (5)</span>
|
| 98 |
+
</div>
|
| 99 |
+
<div class="bg-yellow-50 p-2 rounded-lg flex items-center">
|
| 100 |
+
<div class="w-3 h-3 rounded-full bg-yellow-600 mr-2"></div>
|
| 101 |
+
<span class="text-sm">Delayed (3)</span>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="bg-red-50 p-2 rounded-lg flex items-center">
|
| 104 |
+
<div class="w-3 h-3 rounded-full bg-red-600 mr-2"></div>
|
| 105 |
+
<span class="text-sm">Exceptions (2)</span>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<!-- Performance KPIs -->
|
| 111 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 112 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">
|
| 113 |
+
<i class="fas fa-chart-line text-blue-600 mr-2"></i> Performance KPIs
|
| 114 |
+
</h2>
|
| 115 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 116 |
+
<!-- On-Time Delivery Gauge -->
|
| 117 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 118 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">On-Time Delivery</h3>
|
| 119 |
+
<div class="gauge-container">
|
| 120 |
+
<canvas id="otd-gauge" class="gauge"></canvas>
|
| 121 |
+
</div>
|
| 122 |
+
<div class="mt-2 flex justify-between text-xs text-gray-500">
|
| 123 |
+
<span>0%</span>
|
| 124 |
+
<span>50%</span>
|
| 125 |
+
<span>100%</span>
|
| 126 |
+
</div>
|
| 127 |
+
<div class="mt-1 text-center">
|
| 128 |
+
<span class="text-2xl font-bold text-blue-600">87%</span>
|
| 129 |
+
<span class="text-sm text-gray-500 ml-1">(+2% from last month)</span>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<!-- Cost per Mile Gauge -->
|
| 134 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 135 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Cost per Mile</h3>
|
| 136 |
+
<div class="gauge-container">
|
| 137 |
+
<canvas id="cpm-gauge" class="gauge"></canvas>
|
| 138 |
+
</div>
|
| 139 |
+
<div class="mt-2 flex justify-between text-xs text-gray-500">
|
| 140 |
+
<span>$0</span>
|
| 141 |
+
<span>$1.50</span>
|
| 142 |
+
<span>$3.00</span>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="mt-1 text-center">
|
| 145 |
+
<span class="text-2xl font-bold text-blue-600">$2.15</span>
|
| 146 |
+
<span class="text-sm text-gray-500 ml-1">(-$0.10 from last month)</span>
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
|
| 150 |
+
<!-- Carbon Efficiency Gauge -->
|
| 151 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 152 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Carbon Efficiency</h3>
|
| 153 |
+
<div class="gauge-container">
|
| 154 |
+
<canvas id="carbon-gauge" class="gauge"></canvas>
|
| 155 |
+
</div>
|
| 156 |
+
<div class="mt-2 flex justify-between text-xs text-gray-500">
|
| 157 |
+
<span>High</span>
|
| 158 |
+
<span>Medium</span>
|
| 159 |
+
<span>Low</span>
|
| 160 |
+
</div>
|
| 161 |
+
<div class="mt-1 text-center">
|
| 162 |
+
<span class="text-2xl font-bold text-blue-600">78%</span>
|
| 163 |
+
<span class="text-sm text-gray-500 ml-1">(+5% from last month)</span>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<!-- Trend Charts -->
|
| 169 |
+
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 170 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 171 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Monthly Cost Trend</h3>
|
| 172 |
+
<canvas id="cost-trend-chart" height="150"></canvas>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
| 175 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Service Level Trend</h3>
|
| 176 |
+
<canvas id="service-trend-chart" height="150"></canvas>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<!-- Right Column -->
|
| 183 |
+
<div class="space-y-6">
|
| 184 |
+
<!-- Cost Analysis Breakdown -->
|
| 185 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 186 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">
|
| 187 |
+
<i class="fas fa-money-bill-wave text-blue-600 mr-2"></i> Cost Analysis
|
| 188 |
+
</h2>
|
| 189 |
+
<div class="mb-4">
|
| 190 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Total Spend: $124,567</h3>
|
| 191 |
+
<div class="space-y-2">
|
| 192 |
+
<div>
|
| 193 |
+
<div class="flex justify-between text-sm mb-1">
|
| 194 |
+
<span>Linehaul</span>
|
| 195 |
+
<span>$78,476 (63%)</span>
|
| 196 |
+
</div>
|
| 197 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 198 |
+
<div class="bg-blue-600 h-2 rounded-full progress-bar" style="width: 63%"></div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
<div>
|
| 202 |
+
<div class="flex justify-between text-sm mb-1">
|
| 203 |
+
<span>Fuel</span>
|
| 204 |
+
<span>$23,567 (19%)</span>
|
| 205 |
+
</div>
|
| 206 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 207 |
+
<div class="bg-green-600 h-2 rounded-full progress-bar" style="width: 19%"></div>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<div>
|
| 211 |
+
<div class="flex justify-between text-sm mb-1">
|
| 212 |
+
<span>Accessorials</span>
|
| 213 |
+
<span>$12,345 (10%)</span>
|
| 214 |
+
</div>
|
| 215 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 216 |
+
<div class="bg-yellow-600 h-2 rounded-full progress-bar" style="width: 10%"></div>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
<div>
|
| 220 |
+
<div class="flex justify-between text-sm mb-1">
|
| 221 |
+
<span>Other</span>
|
| 222 |
+
<span>$10,179 (8%)</span>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 225 |
+
<div class="bg-red-600 h-2 rounded-full progress-bar" style="width: 8%"></div>
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
</div>
|
| 230 |
+
<div>
|
| 231 |
+
<h3 class="text-sm font-medium text-gray-600 mb-2">Cost Savings Opportunities</h3>
|
| 232 |
+
<div class="space-y-2">
|
| 233 |
+
<div class="flex items-center p-2 bg-blue-50 rounded-lg">
|
| 234 |
+
<i class="fas fa-route text-blue-600 mr-2"></i>
|
| 235 |
+
<span class="text-sm">Consolidate 3 LTL shipments to Chicago</span>
|
| 236 |
+
<span class="ml-auto text-sm font-medium text-blue-600">$1,245</span>
|
| 237 |
+
</div>
|
| 238 |
+
<div class="flex items-center p-2 bg-blue-50 rounded-lg">
|
| 239 |
+
<i class="fas fa-gas-pump text-blue-600 mr-2"></i>
|
| 240 |
+
<span class="text-sm">Optimize fuel purchase locations</span>
|
| 241 |
+
<span class="ml-auto text-sm font-medium text-blue-600">$876</span>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
|
| 247 |
+
<!-- Carrier Performance Scorecards -->
|
| 248 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 249 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">
|
| 250 |
+
<i class="fas fa-star text-blue-600 mr-2"></i> Carrier Performance
|
| 251 |
+
</h2>
|
| 252 |
+
<div class="scrollable-table">
|
| 253 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 254 |
+
<thead class="bg-gray-50">
|
| 255 |
+
<tr>
|
| 256 |
+
<th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Carrier</th>
|
| 257 |
+
<th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Score</th>
|
| 258 |
+
<th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">OTD</th>
|
| 259 |
+
<th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Cost</th>
|
| 260 |
+
</tr>
|
| 261 |
+
</thead>
|
| 262 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 263 |
+
<tr>
|
| 264 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm font-medium text-gray-900">Swift Transport</td>
|
| 265 |
+
<td class="px-3 py-2 whitespace-nowrap">
|
| 266 |
+
<div class="flex items-center">
|
| 267 |
+
<div class="w-16 bg-gray-200 rounded-full h-2">
|
| 268 |
+
<div class="bg-green-600 h-2 rounded-full" style="width: 92%"></div>
|
| 269 |
+
</div>
|
| 270 |
+
<span class="ml-2 text-xs text-gray-500">92</span>
|
| 271 |
+
</div>
|
| 272 |
+
</td>
|
| 273 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">94%</td>
|
| 274 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">$2.10/mi</td>
|
| 275 |
+
</tr>
|
| 276 |
+
<tr>
|
| 277 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm font-medium text-gray-900">Prime Logistics</td>
|
| 278 |
+
<td class="px-3 py-2 whitespace-nowrap">
|
| 279 |
+
<div class="flex items-center">
|
| 280 |
+
<div class="w-16 bg-gray-200 rounded-full h-2">
|
| 281 |
+
<div class="bg-green-600 h-2 rounded-full" style="width: 88%"></div>
|
| 282 |
+
</div>
|
| 283 |
+
<span class="ml-2 text-xs text-gray-500">88</span>
|
| 284 |
+
</div>
|
| 285 |
+
</td>
|
| 286 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">90%</td>
|
| 287 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">$2.25/mi</td>
|
| 288 |
+
</tr>
|
| 289 |
+
<tr>
|
| 290 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm font-medium text-gray-900">Central Freight</td>
|
| 291 |
+
<td class="px-3 py-2 whitespace-nowrap">
|
| 292 |
+
<div class="flex items-center">
|
| 293 |
+
<div class="w-16 bg-gray-200 rounded-full h-2">
|
| 294 |
+
<div class="bg-yellow-600 h-2 rounded-full" style="width: 76%"></div>
|
| 295 |
+
</div>
|
| 296 |
+
<span class="ml-2 text-xs text-gray-500">76</span>
|
| 297 |
+
</div>
|
| 298 |
+
</td>
|
| 299 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">82%</td>
|
| 300 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">$2.05/mi</td>
|
| 301 |
+
</tr>
|
| 302 |
+
<tr>
|
| 303 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm font-medium text-gray-900">Western Express</td>
|
| 304 |
+
<td class="px-3 py-2 whitespace-nowrap">
|
| 305 |
+
<div class="flex items-center">
|
| 306 |
+
<div class="w-16 bg-gray-200 rounded-full h-2">
|
| 307 |
+
<div class="bg-yellow-600 h-2 rounded-full" style="width: 72%"></div>
|
| 308 |
+
</div>
|
| 309 |
+
<span class="ml-2 text-xs text-gray-500">72</span>
|
| 310 |
+
</div>
|
| 311 |
+
</td>
|
| 312 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">78%</td>
|
| 313 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">$2.35/mi</td>
|
| 314 |
+
</tr>
|
| 315 |
+
<tr>
|
| 316 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm font-medium text-gray-900">US Xpress</td>
|
| 317 |
+
<td class="px-3 py-2 whitespace-nowrap">
|
| 318 |
+
<div class="flex items-center">
|
| 319 |
+
<div class="w-16 bg-gray-200 rounded-full h-2">
|
| 320 |
+
<div class="bg-red-600 h-2 rounded-full" style="width: 65%"></div>
|
| 321 |
+
</div>
|
| 322 |
+
<span class="ml-2 text-xs text-gray-500">65</span>
|
| 323 |
+
</div>
|
| 324 |
+
</td>
|
| 325 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">70%</td>
|
| 326 |
+
<td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">$2.45/mi</td>
|
| 327 |
+
</tr>
|
| 328 |
+
</tbody>
|
| 329 |
+
</table>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
|
| 333 |
+
<!-- Carbon Footprint Metrics -->
|
| 334 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 335 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">
|
| 336 |
+
<i class="fas fa-leaf text-blue-600 mr-2"></i> Carbon Footprint
|
| 337 |
+
</h2>
|
| 338 |
+
<div class="grid grid-cols-2 gap-4 mb-4">
|
| 339 |
+
<div class="bg-green-50 p-3 rounded-lg">
|
| 340 |
+
<div class="text-sm text-gray-600 mb-1">Total CO₂</div>
|
| 341 |
+
<div class="text-xl font-bold text-green-600">4,567 kg</div>
|
| 342 |
+
<div class="text-xs text-gray-500">-12% vs last month</div>
|
| 343 |
+
</div>
|
| 344 |
+
<div class="bg-blue-50 p-3 rounded-lg">
|
| 345 |
+
<div class="text-sm text-gray-600 mb-1">CO₂ per mile</div>
|
| 346 |
+
<div class="text-xl font-bold text-blue-600">1.2 kg</div>
|
| 347 |
+
<div class="text-xs text-gray-500">-8% vs last month</div>
|
| 348 |
+
</div>
|
| 349 |
+
</div>
|
| 350 |
+
<canvas id="carbon-chart" height="150"></canvas>
|
| 351 |
+
</div>
|
| 352 |
+
|
| 353 |
+
<!-- Exception Alerts -->
|
| 354 |
+
<div class="bg-white rounded-xl shadow-md p-4">
|
| 355 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">
|
| 356 |
+
<i class="fas fa-exclamation-triangle text-blue-600 mr-2"></i> Exception Alerts
|
| 357 |
+
</h2>
|
| 358 |
+
<div class="space-y-3">
|
| 359 |
+
<div class="p-3 border border-red-200 rounded-lg bg-red-50 alert-pulse">
|
| 360 |
+
<div class="flex items-start">
|
| 361 |
+
<i class="fas fa-clock text-red-600 mt-1 mr-2"></i>
|
| 362 |
+
<div>
|
| 363 |
+
<div class="font-medium text-red-800">Delivery Delay</div>
|
| 364 |
+
<div class="text-sm text-gray-600">Shipment #45678 to Chicago is 3 hours behind schedule</div>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
<div class="p-3 border border-yellow-200 rounded-lg bg-yellow-50">
|
| 369 |
+
<div class="flex items-start">
|
| 370 |
+
<i class="fas fa-route text-yellow-600 mt-1 mr-2"></i>
|
| 371 |
+
<div>
|
| 372 |
+
<div class="font-medium text-yellow-800">Route Deviation</div>
|
| 373 |
+
<div class="text-sm text-gray-600">Shipment #34567 has taken an unplanned detour</div>
|
| 374 |
+
</div>
|
| 375 |
+
</div>
|
| 376 |
+
</div>
|
| 377 |
+
<div class="p-3 border border-blue-200 rounded-lg bg-blue-50">
|
| 378 |
+
<div class="flex items-start">
|
| 379 |
+
<i class="fas fa-temperature-high text-blue-600 mt-1 mr-2"></i>
|
| 380 |
+
<div>
|
| 381 |
+
<div class="font-medium text-blue-800">Temp Alert</div>
|
| 382 |
+
<div class="text-sm text-gray-600">Reefer unit on shipment #56789 is 2°C above threshold</div>
|
| 383 |
+
</div>
|
| 384 |
+
</div>
|
| 385 |
+
</div>
|
| 386 |
+
</div>
|
| 387 |
+
</div>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
|
| 392 |
+
<script>
|
| 393 |
+
// Initialize map
|
| 394 |
+
const map = L.map('map').setView([39.8283, -98.5795], 4);
|
| 395 |
+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
| 396 |
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
| 397 |
+
}).addTo(map);
|
| 398 |
+
|
| 399 |
+
// Add sample shipment markers
|
| 400 |
+
const shipments = [
|
| 401 |
+
{lat: 40.7128, lng: -74.0060, status: 'transit', id: 'NYC-456'},
|
| 402 |
+
{lat: 41.8781, lng: -87.6298, status: 'delay', id: 'CHI-789'},
|
| 403 |
+
{lat: 34.0522, lng: -118.2437, status: 'transit', id: 'LA-123'},
|
| 404 |
+
{lat: 29.7604, lng: -95.3698, status: 'exception', id: 'HOU-567'},
|
| 405 |
+
{lat: 39.9526, lng: -75.1652, status: 'delivered', id: 'PHL-890'}
|
| 406 |
+
];
|
| 407 |
+
|
| 408 |
+
shipments.forEach(shipment => {
|
| 409 |
+
let color;
|
| 410 |
+
switch(shipment.status) {
|
| 411 |
+
case 'transit': color = '#3B82F6'; break;
|
| 412 |
+
case 'delay': color = '#F59E0B'; break;
|
| 413 |
+
case 'exception': color = '#EF4444'; break;
|
| 414 |
+
case 'delivered': color = '#10B981'; break;
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
const marker = L.circleMarker([shipment.lat, shipment.lng], {
|
| 418 |
+
radius: 8,
|
| 419 |
+
fillColor: color,
|
| 420 |
+
color: '#fff',
|
| 421 |
+
weight: 1,
|
| 422 |
+
opacity: 1,
|
| 423 |
+
fillOpacity: 0.8
|
| 424 |
+
}).addTo(map);
|
| 425 |
+
|
| 426 |
+
marker.bindPopup(`<b>Shipment ${shipment.id}</b><br>Status: ${shipment.status}`);
|
| 427 |
+
});
|
| 428 |
+
|
| 429 |
+
// Gauge Charts
|
| 430 |
+
function createGauge(chartId, value, max, color) {
|
| 431 |
+
const ctx = document.getElementById(chartId).getContext('2d');
|
| 432 |
+
return new Chart(ctx, {
|
| 433 |
+
type: 'doughnut',
|
| 434 |
+
data: {
|
| 435 |
+
datasets: [{
|
| 436 |
+
data: [value, max - value],
|
| 437 |
+
backgroundColor: [color, '#E5E7EB'],
|
| 438 |
+
borderWidth: 0
|
| 439 |
+
}]
|
| 440 |
+
},
|
| 441 |
+
options: {
|
| 442 |
+
rotation: -90,
|
| 443 |
+
circumference: 180,
|
| 444 |
+
cutout: '80%',
|
| 445 |
+
plugins: {
|
| 446 |
+
legend: { display: false },
|
| 447 |
+
tooltip: { enabled: false }
|
| 448 |
+
}
|
| 449 |
+
}
|
| 450 |
+
});
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
createGauge('otd-gauge', 87, 100, '#3B82F6');
|
| 454 |
+
createGauge('cpm-gauge', 2.15, 3, '#10B981');
|
| 455 |
+
createGauge('carbon-gauge', 78, 100, '#F59E0B');
|
| 456 |
+
|
| 457 |
+
// Trend Charts
|
| 458 |
+
function createLineChart(chartId, labels, data, color) {
|
| 459 |
+
const ctx = document.getElementById(chartId).getContext('2d');
|
| 460 |
+
return new Chart(ctx, {
|
| 461 |
+
type: 'line',
|
| 462 |
+
data: {
|
| 463 |
+
labels: labels,
|
| 464 |
+
datasets: [{
|
| 465 |
+
data: data,
|
| 466 |
+
borderColor: color,
|
| 467 |
+
backgroundColor: color + '20',
|
| 468 |
+
borderWidth: 2,
|
| 469 |
+
tension: 0.3,
|
| 470 |
+
fill: true
|
| 471 |
+
}]
|
| 472 |
+
},
|
| 473 |
+
options: {
|
| 474 |
+
responsive: true,
|
| 475 |
+
plugins: {
|
| 476 |
+
legend: { display: false }
|
| 477 |
+
},
|
| 478 |
+
scales: {
|
| 479 |
+
y: { beginAtZero: false },
|
| 480 |
+
x: { grid: { display: false } }
|
| 481 |
+
}
|
| 482 |
+
}
|
| 483 |
+
});
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'];
|
| 487 |
+
createLineChart('cost-trend-chart', months,
|
| 488 |
+
[2.45, 2.35, 2.30, 2.25, 2.20, 2.18, 2.15], '#3B82F6');
|
| 489 |
+
createLineChart('service-trend-chart', months,
|
| 490 |
+
[82, 83, 84, 85, 86, 86.5, 87], '#10B981');
|
| 491 |
+
|
| 492 |
+
// Carbon Chart
|
| 493 |
+
const carbonCtx = document.getElementById('carbon-chart').getContext('2d');
|
| 494 |
+
new Chart(carbonCtx, {
|
| 495 |
+
type: 'bar',
|
| 496 |
+
data: {
|
| 497 |
+
labels: ['Truckload', 'LTL', 'Intermodal', 'Parcel'],
|
| 498 |
+
datasets: [{
|
| 499 |
+
data: [3200, 800, 500, 67],
|
| 500 |
+
backgroundColor: [
|
| 501 |
+
'#3B82F6',
|
| 502 |
+
'#10B981',
|
| 503 |
+
'#F59E0B',
|
| 504 |
+
'#EF4444'
|
| 505 |
+
]
|
| 506 |
+
}]
|
| 507 |
+
},
|
| 508 |
+
options: {
|
| 509 |
+
responsive: true,
|
| 510 |
+
plugins: {
|
| 511 |
+
legend: { display: false }
|
| 512 |
+
},
|
| 513 |
+
scales: {
|
| 514 |
+
y: { beginAtZero: true }
|
| 515 |
+
}
|
| 516 |
+
}
|
| 517 |
+
});
|
| 518 |
+
|
| 519 |
+
// Update timestamp
|
| 520 |
+
function updateTime() {
|
| 521 |
+
const now = new Date();
|
| 522 |
+
document.getElementById('update-time').textContent =
|
| 523 |
+
now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
|
| 524 |
+
}
|
| 525 |
+
updateTime();
|
| 526 |
+
setInterval(updateTime, 60000);
|
| 527 |
+
</script>
|
| 528 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=johnfmarti/tms-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 529 |
+
</html>
|