Tools: FilterTool: add app.py local lanucher for testing

This commit is contained in:
Iampete1 2022-07-24 16:39:00 +01:00 committed by Andrew Tridgell
parent 1127ad2397
commit 002b1e1c44
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import os
from flask import Flask
from flask import render_template
# A flask app to allow hosting filter tool locally
this_path = os.path.dirname(os.path.realpath(__file__))
app = Flask(__name__, template_folder=this_path, static_folder=this_path)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == "__main__":
app.run()

View File

@ -5,6 +5,8 @@
<title>ArduPilot Filter Analysis</title>
<script type="text/javascript" src="filters.js"></script>
<script type="text/javascript" src="FileSaver.js"></script>
<script type="text/javascript" src={{url_for('static', filename='filters.js')}}></script>
<script type="text/javascript" src={{url_for('static', filename='FileSaver.js')}}></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
</head>
<a href="https://ardupilot.org"><img src="logo.png"></a>