Custom PHP dashboard allowing an audit of inventory from College of Computing's snipe-it instance (inventory.cc on abondance.cc VM), allows end users to self-certify their inventory or send emails to helpdesk (via Qualtrics forms) to correct. Has FAQ page.
Technical Details
Repo
Plesk constraints
- Designed to work on OIT's plesk web hosting platform with php 7.4 and mysql5.7.
- Depends on plesk for authentication (by cas sign in via .htaccess file), otherwise could be moved to a VM.
Non-git-controlled files outside of webroot
These files are needed above the webroot (above httpdocs on plesk web hosting), but are not git controlled:
- /.env.php: copied from env.sample with local database variables
- /db-connect.php: includes local .env.php and makes db connection (database holds simple log files and has no web UI)
- /incoming/gt_dump.json: gt_dump.json exported from snipe-it via python (gt_dump.py) on abondance VM, then a cron job (scheduled task) periodically grabs the latest version with this code:
wget --secure-protocol=TLSv1_2 --no-check-certificate 'https://inventory.cc.gatech.edu/gtdump.json' -O /incoming/gtdump.json
- If this stops working, check if OIT has changed firewall rules or address ranges for plesk.
- /incoming/assets.json: re-formatted and simplified array used by app as the data source
Files needed to recreate site elsewhere
These files should not be in the public web directory, but would be needed to recreate the site elsewhere:
- /db-create.sql: reference sql for skeleton database and its log table
- /env.sample: copy to create .env.php above webroot with local db variables
- /gt_dump.py: python file that grabs data from snipe-it. It lives on abondance VM at: /var/www/gtdump.py and is run by a regular crontab job:
14 * * * * cd /var/www && python gtdump.py
Other Files
- decodeJson.php: transforms generic json output by snipe-it (incoming/gt_dump.json) for use by this app (incoming/assets.json)., and a scheduled task periodically runs this file.
- includes.php: This has most of the functions and does most of the work for this app (additional access role of isAdmin set here in a $cosAdmins array of gtaccounts)
- email.php: logs to db before sending email to RT if 'certify' action
- .htaccess: automatically checks for CAS login on plesk.
- header.php and footer.php: uses COS cdn (https://hoard.cos.gatech.edu) for GT images, css, and js
- epm.js: General javascript for entire app
Old Docusign code
If docusign is added back, here are some commit SHAs where it was removed: 8ce496d, 86ef193, 6b3cbbb, d898619, 6ae0a8f, 6390d78, 55f42c6. This will add back docusign code, but from College of Sciences, so we would still need to figure out the Docusign PowerForms before implementing.
Placeholder for Overview Video in Kaltura
[MEDIASPACE|ID=1_y3hz4bsh]