This repository contains the Python Flask application supporting the Usint Website.
For information related to the web server backend, support, and development of this application, consult the Flask/Usint folder in the MTA shared drive.
-
usint/usint.py
Python script for instantiating the Flask application. Navigating to this file in a web browser starts the application. -
config.py
Configuration file. -
localhost
Atcshshell script used for quickly starting a localhost test of the application using the/data/mta4/CUS/ska3-cus-r2d2-venvironment. -
instance/
Instance folder for storing application-specific files such as logs and theusint.dbdatabase.logs/
Containsocat.logfiles for logging application runtime information. Used by web server processes.
-
cus_app/
Main Flask application folder containing relevant page generation scripts:__init__.py— Application instantiation scriptemailing.py— Email-related functions for notificationsmodels.py— SQLAlchemy ORM models for interfacing with the Usint Revision database
chkupdata/— Parameter check page scriptserrors/— Error handler scriptsexpress/— Express sign-off page scriptsocatdatapage/— Ocat data page scriptsorupdate/— Parameter status page scriptsscheduler/— TOO duty scheduler page scriptssupple/— Supplemental Python scripts
color.json— Maps color names to RGB valueslabels.json— Maps Ocat parameters to visual labelsparameter_selections.json— Parameter group mappings used across the applicationusint.js— jQuery library for the Ocat data pageocat_style.css— CSS stylesocatdatapage/— Static files for the Ocat data pageorupdate/— Static files for the parameter status pagescheduler/— Static files for the scheduler page
base.html— Base templateindex.html— Main index page- Additional page-specific templates (see sections below)
Displays original, requested, and current parameter values for a given <obsid>.<rev>.
routes.py— Main logicforms.py— WTForms definitions__init__.py— Module setup
index.html— Main pageprovide_obsidrev.html— Shown when<obsid>.<rev>is not foundmacros.html— Template macros
Application error handling.
handlers.py— Main error handling logic__init__.py— Module setup
404.html— Not found page500.html— Server error page
Express sign-off / approval workflow.
routes.py— Main logicforms.py— WTForms definitions__init__.py— Module setup
index.html— Main pageconfirm.html— Confirmation pagemacros.html— Template macros
Ocat data page used for updating parameter values.
routes.py— Main logicforms.py— WTForms definitionsformat_ocat_data.py— Data formatting utilities__init__.py— Module setup
<obs_ss>/mp_long_term— Planned roll angle from MP site<obs_ss>/scheduled_obs_list— Scheduled observations
index.html— Main update pagemacros.html— Template macrosconfirm.html— Update confirmation pagefinalize.html— Job completion pageprovide_obsid.html— Shown when<obsid>is not found
Target parameter status page.
routes.py— Main logicforms.py— WTForms definitions__init__.py— Module setup
index.html— Main pagemacros.html— Template macros
Note:
This page refreshes every 3 minutes to display the latest data. This ensures consistency when multiple users are updating the database simultaneously.
Remove accidental submissions.
routes.py— Main logicforms.py— WTForms definitions__init__.py— Module setup
index.html— Main pagemacros.html— Template macros
POC duty sign-up sheet.
routes.py— Main logicforms.py— WTForms definitions__init__.py— Module setup
index.html— Main pagemacros.html— Template macros
Supplemental scripts used across the application.
database_interface.py— SQLAlchemy interface for the Usint Revision SQLite databasehelper_functions.py— General helper utilitiesread_ocat_data.py— Fetches and formats Ocat Sybase data via theska_dbi SQSHinterface
- CXC Ocat Sybase database (via
read_ocat_data.py) - Usint Revision SQLite database (via
database_interface.py)