A simple Python web application for tracking ping status between switches and terminals, using Django and MySQL.
⚠ UPDATE: This project was created with Django 3.x and Python 3.6. Both are no longer the latest versions so ensure to account for compatibility issues.
This project was created with PyCharm so, ideally, a direct import should hypothetically work. Otherwise, move the nosairis folder from root directory to your desired directory and then install the following dependencies using the package manager pip.
pip install django
pip install mysqlclient
pip install plotly
The MySQL database routines have already been configured. You must however create an identical empty one with the same user credentials (so you don't need to modify the code further) with the following commands (preferably as root
).
CREATE DATABASE switches CHARACTER SET UTF8;
CREATE USER madjango@localhost IDENTIFIED BY '123django';
GRANT ALL PRIVILEGES ON switches.* TO madjango@localhost;
FLUSH PRIVILEGES;
EXIT;
Restart MySQL again (this time as user madjango
)
USE switches;
Open the directory nosairis/nosairis/management/exports
and execute ALL the .sql
files on switches
.
If all else fails, copy paste the contents each of the files and run directly in MySQL command line interface, and you're good to go!
⚠ IMPORTANT: Edit the settings.py
file and the SECRET_KEY
variable to point to your own unique Django secret key.
From root dir, cd
to nosairis/nosairis
and run the following commands to get started.
python manage.py runserver
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.