f5d92f1d36
Major Features: - Multi-format GPS data import (Wigle CSV, GPS JSON, filename GPS) - Data source tracking (test/mock/production) - Database cleanup tools for managing test data - JSON file persistence for simplified server - UI improvements for map controls Backend: - Added wardriving_importer.py with WigleCSVImporter, GPSJSONImporter, BatchImporter - Added data_source and session_id tracking to captures - New API endpoints: DELETE /api/v1/admin/cleanup - Auto-save/load functionality for captures_simple.json - Updated stats endpoint to show data source breakdown CLI Tools: - scripts/import_wardriving_data.py - Batch import with --data-source flag - scripts/cleanup_database.py - Clean by source, session, or all - scripts/create_test_dataset.py - Generate GPS-tagged test data - scripts/test_wardriving_import.py - Test suite for importers Frontend: - Fixed map controls z-index and positioning issues - Moved controls to top-right to avoid zoom button overlap - Fixed Leaflet zoom controls rendering over header - Changed controls to position:fixed for persistent visibility - Export map object to window.map for proper invalidateSize Documentation: - docs/WARDRIVING_IMPORT.md - Complete import guide - docs/DATA_CLEANUP_GUIDE.md - Cleanup system documentation - docs/TEST_LOCATIONS.md - Test GPS coordinates reference - TEST_RESULTS_SUMMARY.md - Format testing results Test Data: - Created test_dataset_gps with 15 captures across 5 US cities - All test data marked with data_source="test" for easy cleanup Testing: - Verified Wigle CSV import (1 capture from West LA) - Verified GPS filename import (3 captures from UCLA area) - Verified GPS JSON companion files (15 captures, 5 cities) - Verified cleanup functionality (deleted 15 test captures) - Verified data persistence across server restarts 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
585 lines
9.7 KiB
CSS
585 lines
9.7 KiB
CSS
/* GigLez - Main Stylesheet */
|
|
|
|
:root {
|
|
--primary-color: #2563eb;
|
|
--secondary-color: #7c3aed;
|
|
--success-color: #10b981;
|
|
--danger-color: #ef4444;
|
|
--warning-color: #f59e0b;
|
|
--dark-bg: #1f2937;
|
|
--light-bg: #f3f4f6;
|
|
--text-primary: #111827;
|
|
--text-secondary: #6b7280;
|
|
--border-color: #e5e7eb;
|
|
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
line-height: 1.6;
|
|
color: var(--text-primary);
|
|
background: var(--light-bg);
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
/* Header */
|
|
header {
|
|
background: white;
|
|
box-shadow: var(--shadow);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
header .container {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 20px;
|
|
}
|
|
|
|
.logo h1 {
|
|
font-size: 1.5rem;
|
|
color: var(--primary-color);
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.logo p {
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
nav {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 0.5rem 1rem;
|
|
text-decoration: none;
|
|
color: var(--text-secondary);
|
|
border-radius: 0.375rem;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background: var(--light-bg);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.nav-link.active {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
/* Main Content */
|
|
main {
|
|
min-height: calc(100vh - 200px);
|
|
}
|
|
|
|
.section {
|
|
display: none;
|
|
}
|
|
|
|
.section.active {
|
|
display: block;
|
|
}
|
|
|
|
/* Map Section */
|
|
#map-section {
|
|
height: calc(100vh - 80px);
|
|
position: relative;
|
|
}
|
|
|
|
#map {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
/* Leaflet zoom controls - move below header */
|
|
.leaflet-top {
|
|
top: 90px !important;
|
|
}
|
|
|
|
/* Ensure Leaflet controls stay below header */
|
|
.leaflet-control-zoom {
|
|
z-index: 500 !important;
|
|
}
|
|
|
|
.map-controls {
|
|
position: fixed;
|
|
top: 90px;
|
|
right: 20px;
|
|
background: white;
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow-lg);
|
|
z-index: 500;
|
|
min-width: 300px;
|
|
max-width: 350px;
|
|
max-height: calc(100vh - 120px);
|
|
overflow-y: auto;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.control-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.control-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.control-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.control-group input[type="checkbox"] {
|
|
margin-right: 0.5rem;
|
|
}
|
|
|
|
.control-group select {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.375rem;
|
|
}
|
|
|
|
.stats-summary {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding-top: 1rem;
|
|
border-top: 1px solid var(--border-color);
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.stats-summary strong {
|
|
color: var(--primary-color);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Upload Section */
|
|
#upload-section {
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.subtitle {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.upload-container {
|
|
background: white;
|
|
border-radius: 0.5rem;
|
|
padding: 2rem;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
/* Drop Zone */
|
|
.drop-zone {
|
|
border: 2px dashed var(--border-color);
|
|
border-radius: 0.5rem;
|
|
padding: 3rem;
|
|
text-align: center;
|
|
transition: all 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.drop-zone:hover,
|
|
.drop-zone.drag-over {
|
|
border-color: var(--primary-color);
|
|
background: rgba(37, 99, 235, 0.05);
|
|
}
|
|
|
|
.drop-zone-content {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.upload-icon {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.drop-zone h3 {
|
|
margin-bottom: 0.5rem;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.drop-zone p {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
/* Manifest Form */
|
|
.manifest-form {
|
|
margin-top: 2rem;
|
|
padding-top: 2rem;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
.manifest-form h3 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.manifest-form p {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
|
}
|
|
|
|
.form-group small {
|
|
display: block;
|
|
margin-top: 0.5rem;
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.gps-inputs {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #1d4ed8;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: white;
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--light-bg);
|
|
}
|
|
|
|
.btn-large {
|
|
padding: 1rem 2rem;
|
|
font-size: 1.125rem;
|
|
}
|
|
|
|
/* File List */
|
|
.file-list {
|
|
margin-top: 2rem;
|
|
padding-top: 2rem;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
#files-container {
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.file-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1rem;
|
|
background: var(--light-bg);
|
|
border-radius: 0.375rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.file-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.file-name {
|
|
font-weight: 500;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.file-meta {
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.file-actions button {
|
|
padding: 0.5rem 1rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.upload-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
/* Progress Bar */
|
|
.upload-progress {
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 1rem;
|
|
background: var(--light-bg);
|
|
border-radius: 0.5rem;
|
|
overflow: hidden;
|
|
margin: 1.5rem 0;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: var(--primary-color);
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
/* Upload Results */
|
|
.upload-results {
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.results-container {
|
|
margin: 2rem 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.result-item {
|
|
padding: 1rem;
|
|
background: var(--light-bg);
|
|
border-radius: 0.375rem;
|
|
margin-bottom: 0.5rem;
|
|
border-left: 4px solid var(--success-color);
|
|
}
|
|
|
|
.result-item.error {
|
|
border-left-color: var(--danger-color);
|
|
}
|
|
|
|
/* Search Section */
|
|
#search-section {
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.search-form {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.search-results {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
#results-list {
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.result-card {
|
|
padding: 1.5rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.375rem;
|
|
margin-bottom: 1rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.result-card:hover {
|
|
box-shadow: var(--shadow-lg);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.result-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: start;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.result-title {
|
|
font-weight: 600;
|
|
font-size: 1.125rem;
|
|
}
|
|
|
|
.result-frequency {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.result-details {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
gap: 1rem;
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* Statistics Section */
|
|
#stats-section {
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-card h3 {
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.chart-container {
|
|
background: white;
|
|
padding: 2rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.chart-container h3 {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
/* Footer */
|
|
footer {
|
|
background: var(--dark-bg);
|
|
color: white;
|
|
padding: 2rem 0;
|
|
text-align: center;
|
|
margin-top: 4rem;
|
|
}
|
|
|
|
footer p {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
header .container {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
nav {
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.gps-inputs,
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.stats-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.map-controls {
|
|
position: fixed;
|
|
top: 80px;
|
|
right: 10px;
|
|
left: 10px;
|
|
max-width: calc(100% - 20px);
|
|
min-width: auto;
|
|
}
|
|
|
|
.leaflet-top {
|
|
top: 10px !important;
|
|
}
|
|
|
|
#map-section {
|
|
height: auto;
|
|
min-height: 500px;
|
|
}
|
|
}
|