Initial commit: Sistema Autoparts DB
- Base de datos SQLite con información de vehículos - Dashboard web con Flask y Bootstrap - Scripts de web scraping para RockAuto - Interfaz CLI para consultas - Documentación completa del proyecto Incluye: - 12 marcas de vehículos - 10,923 modelos - 10,919 especificaciones de motores - 12,075 combinaciones modelo-año-motor
This commit is contained in:
54
test_dashboard.sh
Executable file
54
test_dashboard.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
# Test script for the Vehicle Dashboard
|
||||
|
||||
echo "Testing Vehicle Dashboard Setup"
|
||||
echo "================================"
|
||||
|
||||
# Check if the dashboard directory exists
|
||||
if [ ! -d "/home/Autopartes/dashboard" ]; then
|
||||
echo "Error: Dashboard directory not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Dashboard directory found."
|
||||
|
||||
# Check if required files exist
|
||||
files=("index.html" "dashboard.js" "server.py" "requirements.txt")
|
||||
for file in "${files[@]}"; do
|
||||
if [ ! -f "/home/Autopartes/dashboard/$file" ]; then
|
||||
echo "Error: $file not found in dashboard directory!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All required files found."
|
||||
|
||||
# Check if the vehicle database exists
|
||||
if [ ! -f "/home/Autopartes/vehicle_database/vehicle_database.db" ]; then
|
||||
echo "Error: Vehicle database not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Vehicle database found."
|
||||
|
||||
# Check if Flask is available
|
||||
if python3 -c "import flask" &> /dev/null; then
|
||||
echo "Flask is available."
|
||||
else
|
||||
echo "Flask is not available. Installing..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-flask
|
||||
fi
|
||||
|
||||
# Check if the server is running
|
||||
if pgrep -f "server.py" > /dev/null; then
|
||||
echo "Dashboard server is running on http://localhost:5000"
|
||||
echo "You can access the dashboard now!"
|
||||
else
|
||||
echo "Dashboard server is not running."
|
||||
echo "To start it, run: cd /home/Autopartes/dashboard && python3 server.py"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Dashboard Test Complete!"
|
||||
echo "Access the dashboard at: http://localhost:5000"
|
||||
Reference in New Issue
Block a user