mirror of
https://github.com/smittix/intercept.git
synced 2026-07-11 11:08:12 -07:00
Fix satellite dashboard API and layout issues
- Fix parameter mismatch: accept both latitude/longitude and lat/lon - Add NORAD ID to satellite name mapping for dashboard compatibility - Widen sidebar from 350px to 420px for better readability - Make sidebar scrollable to access all panels - Add responsive breakpoints for different screen sizes - Prevent telemetry values from wrapping 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+50
-8
@@ -12476,7 +12476,7 @@ def satellite_dashboard():
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 350px;
|
grid-template-columns: 1fr 1fr 420px;
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -12533,6 +12533,7 @@ def satellite_dashboard():
|
|||||||
.panel-content {
|
.panel-content {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
height: calc(100% - 45px);
|
height: calc(100% - 45px);
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Polar plot */
|
/* Polar plot */
|
||||||
@@ -12567,6 +12568,8 @@ def satellite_dashboard():
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Countdown panel */
|
/* Countdown panel */
|
||||||
@@ -12682,7 +12685,7 @@ def satellite_dashboard():
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
max-height: 300px;
|
max-height: 250px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12785,8 +12788,9 @@ def satellite_dashboard():
|
|||||||
|
|
||||||
.telemetry-value {
|
.telemetry-value {
|
||||||
font-family: 'JetBrains Mono', monospace;
|
font-family: 'JetBrains Mono', monospace;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
color: var(--accent-cyan);
|
color: var(--accent-cyan);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Observer location */
|
/* Observer location */
|
||||||
@@ -12898,7 +12902,7 @@ def satellite_dashboard():
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive */
|
/* Responsive */
|
||||||
@media (max-width: 1400px) {
|
@media (max-width: 1600px) {
|
||||||
.dashboard {
|
.dashboard {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
@@ -12907,10 +12911,31 @@ def satellite_dashboard():
|
|||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
overflow-y: visible;
|
||||||
|
max-height: none;
|
||||||
}
|
}
|
||||||
.sidebar .panel {
|
.sidebar .panel {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 280px;
|
min-width: 300px;
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
.dashboard {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.polar-container, .map-container {
|
||||||
|
grid-column: 1;
|
||||||
|
min-height: 350px;
|
||||||
|
}
|
||||||
|
.sidebar {
|
||||||
|
grid-column: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.sidebar .panel {
|
||||||
|
min-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -13559,11 +13584,28 @@ def predict_passes():
|
|||||||
})
|
})
|
||||||
|
|
||||||
data = request.json
|
data = request.json
|
||||||
lat = data.get('lat', 51.5074)
|
lat = data.get('latitude', data.get('lat', 51.5074))
|
||||||
lon = data.get('lon', -0.1278)
|
lon = data.get('longitude', data.get('lon', -0.1278))
|
||||||
hours = data.get('hours', 24)
|
hours = data.get('hours', 24)
|
||||||
min_el = data.get('minEl', 10)
|
min_el = data.get('minEl', 10)
|
||||||
satellites = data.get('satellites', ['ISS', 'NOAA-15', 'NOAA-18', 'NOAA-19'])
|
|
||||||
|
# Map NORAD IDs to satellite names
|
||||||
|
norad_to_name = {
|
||||||
|
25544: 'ISS',
|
||||||
|
25338: 'NOAA-15',
|
||||||
|
28654: 'NOAA-18',
|
||||||
|
33591: 'NOAA-19',
|
||||||
|
40069: 'METEOR-M2'
|
||||||
|
}
|
||||||
|
|
||||||
|
sat_input = data.get('satellites', ['ISS', 'NOAA-15', 'NOAA-18', 'NOAA-19'])
|
||||||
|
# Convert NORAD IDs to names if needed
|
||||||
|
satellites = []
|
||||||
|
for sat in sat_input:
|
||||||
|
if isinstance(sat, int) and sat in norad_to_name:
|
||||||
|
satellites.append(norad_to_name[sat])
|
||||||
|
else:
|
||||||
|
satellites.append(sat)
|
||||||
|
|
||||||
passes = []
|
passes = []
|
||||||
colors = {'ISS': '#00ffff', 'NOAA-15': '#00ff00', 'NOAA-18': '#ff6600', 'NOAA-19': '#ff3366', 'METEOR-M2': '#9370DB'}
|
colors = {'ISS': '#00ffff', 'NOAA-15': '#00ff00', 'NOAA-18': '#ff6600', 'NOAA-19': '#ff3366', 'METEOR-M2': '#9370DB'}
|
||||||
|
|||||||
Reference in New Issue
Block a user