Skip to content

vincentchov/lansweeper_flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lansweeper-Flask

This project uses Kenneth Reitz's Records library in addition to PyODBC to connect to the lansweeperdb Microsoft SQL Server database.
Records makes it easier to export results of SQL queries and make it easier to explore the database to learn its schema. It uses docopt to handle argument parsing so you can use it as a command-line application, or launch a Flask web interface.

Setup from source code

  1. Install Python 3.x with pip.
  2. Install Microsoft ODBC Driver 11 for SQL Server which you may already have in Windows, but typically not in other systems.
  3. If you're in Windows, open up the Data Sources program. If you're in Linux, edit the ~/.odbc.ini file in the next step.
  4. Create a DSN (Data Source Name) called PSI-SQL-DSN that connects to the PSI-SQL server, defaulting to the lansweeperdb database and use SQL authentication.
  5. Update the server variable to match the name of the DSN if you chose something other than PSI-SQL-DSN.
  6. Create and activate a virtual environment
  7. Install dependencies: pip install -r requirements.txt
  8. Profit!

How to get a report (command-line)

All you have to do is run lansweeper_all.py and enter the number for the report type you want when asked for it. For example, if you want to see a table for Administrative / Business Development tickets, activate your virtual environment and then run python lansweeper_all.py at which point it will list out the different options. Enter 0 and hit enter. The resulting table will be placedin a .xlsx file in the Reports folder called admin_bus_dev.xlsx.

How to get a report (web-interface)

Launch the Flask web app by running python run.py and visit the application in your web browser at localhost:5000. From there you can click on the report type you would like.

About

An extension to the Lansweeper SQL Server front end

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published