-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devel' of github.com:filipsPL/autowx2
- Loading branch information
Showing
11 changed files
with
287 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# | ||
# autowx2 - webserver definitions | ||
|
||
|
||
# configuration | ||
from autowx2_conf import * | ||
from autowx2_functions import * # all functions and magic hidden here | ||
from flask import Flask, render_template | ||
import codecs | ||
|
||
# satellites = list(satellitesData) | ||
# qth = (stationLat, stationLon, stationAlt) | ||
|
||
def file_read(filename): | ||
with codecs.open(filename, 'r', encoding='utf-8') as f: | ||
lines = f.read() | ||
return lines | ||
|
||
|
||
# -------------------------------------------------------------------------- # | ||
|
||
|
||
app = Flask(__name__, template_folder="var/flask/templates/", static_folder='var/flask/static') | ||
|
||
body="body" | ||
|
||
# | ||
# homepage | ||
# | ||
|
||
@app.route('/') | ||
def homepage(): | ||
return render_template('index.html', title="Home page", body=body) | ||
|
||
|
||
# | ||
# display last log | ||
# | ||
|
||
@app.route('/lastlog') | ||
def lastlog(): | ||
logfile = logFile(loggingDir) | ||
logs = file_read(logfile) | ||
body = "<p><strong>File</strong>: %s</p><pre class='small'>%s</pre>" % (logfile, logs) | ||
return render_template('index.html', title="Recent logs", body=body) | ||
|
||
# | ||
# show pass table | ||
# | ||
|
||
@app.route('/table') | ||
def passTable(): | ||
body=file_read(htmlNextPassList) | ||
return render_template('index.html', title="Pass table", body=body) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/fancyapps/fancyBox |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.