From 3b945ab88632adcd26ba8ad9f03c8b18e36e430e Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Thu, 22 Apr 2021 16:14:54 -0700 Subject: [PATCH] update dashboard --- scripts/dashboard/dashboard.py | 10 +++++----- scripts/dashboard/templates/about.html | 2 +- scripts/dashboard/templates/help.html | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/dashboard/dashboard.py b/scripts/dashboard/dashboard.py index ebd8bff..67487e8 100644 --- a/scripts/dashboard/dashboard.py +++ b/scripts/dashboard/dashboard.py @@ -179,7 +179,7 @@ def aprs_to_latlon(x): minutes = x - 100*degrees return degrees + minutes/60 -def user_setting_write(dmr_id, input_ssid, input_icon, input_comment): +def user_setting_write(dmr_id, input_ssid, input_icon, input_comment, input_aprs): dmr_id = int(dmr_id) user_settings = ast.literal_eval(os.popen('cat ' + user_settings_file).read()) new_dict = user_settings @@ -406,11 +406,11 @@ def user_settings(): ssid = user_settings[int(request.form.get('dmr_id'))][1]['ssid'] icon = user_settings[int(request.form.get('dmr_id'))][2]['icon'] comment = user_settings[int(request.form.get('dmr_id'))][3]['comment'] + pin = user_settings[int(request.form.get('dmr_id'))][4]['pin'] aprs_msg_status = str(user_settings[int(request.form.get('dmr_id'))][5]['APRS']) - try: - pin = user_settings[int(request.form.get('dmr_id'))][4]['pin'] - + if pin != '': + if ssid == '': ssid = aprs_ssid if icon == '': @@ -464,7 +464,7 @@ def user_settings(): """ - except: + if pin == '': user_result = """

No PIN set for """ + str(user_settings[int(user_id)][0]['call']) + """ - """ + request.form.get('dmr_id') + """

""" diff --git a/scripts/dashboard/templates/about.html b/scripts/dashboard/templates/about.html index 503f177..a2208eb 100644 --- a/scripts/dashboard/templates/about.html +++ b/scripts/dashboard/templates/about.html @@ -7,7 +7,7 @@ Name -{{contact_name}} + {{contact_name}} Callsign diff --git a/scripts/dashboard/templates/help.html b/scripts/dashboard/templates/help.html index 6afeae7..9a410c1 100644 --- a/scripts/dashboard/templates/help.html +++ b/scripts/dashboard/templates/help.html @@ -66,39 +66,39 @@ @BB This is a test bulletin. -@[CALLSIGN W/ SSID] A-[MESSAGE] +@[CALLSIGN W/ SSID] [MESSAGE] Send a message to another station via APRS. -@N0CALL-15 A-This is a test. +@N0CALL-15 This is a test. -[EMAIL ADDRESS] E-[MESSAGE] +[EMAIL ADDRESS] [MESSAGE] Send an email to an email address. -test@example.org E-This is a test. +test@example.org This is a test. @[RECIPIENT CALLSIGN] M-[MESSAGE] Post a message to the Mailbox. -@N0CALL M-This is a test. +@N0CALL M-This is a test. @REM MAIL Remove all mail addressed to you. -@REM MAIL +@REM MAIL @SOS EMERGENCY activation displays a banner on the main dashboard page. -THIS IS AN EMERGENCY. @SOS +THIS IS AN EMERGENCY. @SOS @NOTICE Used to prominantly display a notice, similar to EMERGENCY activation. -@NOTICE Server going down at 1800 +@NOTICE Server going down at 1800 @REM SOS Removes an EMERGENCY or notice. -@REM SOS +@REM SOS