From 674f9102d1d638c72b5356ca7949dd69d94b924e Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Sat, 2 Jan 2021 15:58:45 -0800 Subject: [PATCH] improve dash --- scripts/dashboard/dashboard.py | 14 +++++++-- .../dashboard/dashboard_settings-SAMPLE.py | 12 +++++++ scripts/dashboard/templates/about.html | 20 ------------ scripts/dashboard/templates/footer.html | 4 --- scripts/dashboard/templates/header.html | 25 --------------- scripts/dashboard/templates/help.html | 19 ------------ scripts/dashboard/templates/index.html | 31 ------------------- 7 files changed, 23 insertions(+), 102 deletions(-) delete mode 100644 scripts/dashboard/templates/about.html delete mode 100644 scripts/dashboard/templates/footer.html delete mode 100644 scripts/dashboard/templates/header.html delete mode 100644 scripts/dashboard/templates/help.html delete mode 100644 scripts/dashboard/templates/index.html diff --git a/scripts/dashboard/dashboard.py b/scripts/dashboard/dashboard.py index b963441..fdd0fe8 100644 --- a/scripts/dashboard/dashboard.py +++ b/scripts/dashboard/dashboard.py @@ -114,9 +114,17 @@ def dash_bb(): def dash_loc(): return get_loc_data() #return render_template('index.html', data = str(get_data())) -@app.route('//') -def render_static(page_name): - return render_template('%s.html' % page_name, title = dashboard_title, logo = logo, description = description) +##@app.route('//') +##def render_static(page_name): +## return render_template('%s.html' % page_name, title = dashboard_title, logo = logo, description = description) +@app.route('/help/') +def help(): + #return get_data() + return render_template('help.html', title = dashboard_title, logo = logo, description = description, data_call_type = data_call_type, data_call_id = data_call_id) +@app.route('/about/') +def about(): + #return get_data() + return render_template('about.html', title = dashboard_title, logo = logo, contact_name = contact_name, contact_call = contact_call, contact_email = contact_email, contact_website = contact_website) if __name__ == '__main__': app.run(debug = True, port=dash_port, host=dash_host) diff --git a/scripts/dashboard/dashboard_settings-SAMPLE.py b/scripts/dashboard/dashboard_settings-SAMPLE.py index 856c9c9..ee10bb8 100644 --- a/scripts/dashboard/dashboard_settings-SAMPLE.py +++ b/scripts/dashboard/dashboard_settings-SAMPLE.py @@ -33,3 +33,15 @@ dash_host = '127.0.0.1' description = ''' Welcome to the ''' + dashboard_title + '''. ''' +# The following will generate a help page for your users. + +# Data call type +data_call_type = 'Private Call' +# DMR ID of GPS/Data application +data_call_id = '9099' + +# Gateway contact info displayed on about page. +contact_name = 'your name' +contact_call = 'N0CALL' +contact_email = 'email@example.org' +contact_website = 'https://hbl.ink' diff --git a/scripts/dashboard/templates/about.html b/scripts/dashboard/templates/about.html deleted file mode 100644 index d1b92e4..0000000 --- a/scripts/dashboard/templates/about.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - {{title}} - - - -{% include 'header.html' %} -{{description}} -{% include 'footer.html' %} - diff --git a/scripts/dashboard/templates/footer.html b/scripts/dashboard/templates/footer.html deleted file mode 100644 index a65e493..0000000 --- a/scripts/dashboard/templates/footer.html +++ /dev/null @@ -1,4 +0,0 @@ -
-
Dashboard created by KF7EEL - https://github.com/kf7eel/hblink3
HBLink created by N0MJS.
HBLink GitHub page
- - diff --git a/scripts/dashboard/templates/header.html b/scripts/dashboard/templates/header.html deleted file mode 100644 index 79cfa10..0000000 --- a/scripts/dashboard/templates/header.html +++ /dev/null @@ -1,25 +0,0 @@ -

Logo

-

{{title}}

-
- - - - - - - - -
- - - - - -
-
diff --git a/scripts/dashboard/templates/help.html b/scripts/dashboard/templates/help.html deleted file mode 100644 index d677333..0000000 --- a/scripts/dashboard/templates/help.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - {{title}} - - - -{% include 'header.html' %} -Help info here. -{% include 'footer.html' %} diff --git a/scripts/dashboard/templates/index.html b/scripts/dashboard/templates/index.html deleted file mode 100644 index b07d291..0000000 --- a/scripts/dashboard/templates/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - {{title}} - - - -{% include 'header.html' %} -

Page automatically reloads every 2 minutes.

- - - - - - - -

-

-
- {% include 'header.html' %} -