diff --git a/web/app.py b/web/app.py index c1957f6..88d95f0 100644 --- a/web/app.py +++ b/web/app.py @@ -710,19 +710,17 @@ def hbnet_web_service(): l_news = News.query.order_by(News.time.desc()).first() content = ''' -

''' + l_news.subject + '''

-
-

 

-''' + l_news.date + ''' - -

 

- -
-
-''' + l_news.text + ''' +
+
+

''' + l_news.subject + '''

+
+

''' + l_news.date + '''

+
+   +

''' + l_news.text + '''

+

- -
''' except: content = '' @@ -892,9 +890,9 @@ def hbnet_web_service(): script_links[i[0]] = link_num misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False) content = content + ''' -
-

ID: ''' + str(i[0]) + '''

-
rpi-rw; wget -O /root/auto_pistar.py "''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''"; chmod +x /root/auto_pistar.py; python3 /root/auto_pistar.py; pistar-update
+
+

ID: ''' + str(i[0]) + '''

+
rpi-rw; wget -O /root/auto_pistar.py "''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''"; chmod +x /root/auto_pistar.py; python3 /root/auto_pistar.py; pistar-update
''' #else: @@ -945,9 +943,9 @@ def hbnet_web_service():
''' svr_content = svr_content + ''' -
-

''' + i.name + '''

-
+
+

''' + i.name + '''

+

''' + svr_status + '''
''' + i.public_notes + '''
@@ -975,9 +973,9 @@ def hbnet_web_service(): misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False) #print(script_links) content = content + '''\n -
-

''' + str(i[0]) + '''

-
MMDVM Passphrase: +
+

''' + str(i[0]) + '''

+
MMDVM Passphrase:
''' + str(gen_passphrase(int(i[0]))) + '''


@@ -991,9 +989,9 @@ def hbnet_web_service(): misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False) #print(script_links) content = content + '''\n -
-

''' + str(i[0]) + '''

-
MMDVM Passphrase: +
+

''' + str(i[0]) + '''

+
MMDVM Passphrase:
''' + str(gen_passphrase(int(i[0]))) + '''


@@ -1003,9 +1001,9 @@ def hbnet_web_service(): ''' elif i[1] == '': content = content + ''' -
-

''' + str(i[0]) + '''

-
MMDVM Passphrase: +
+

''' + str(i[0]) + '''

+
MMDVM Passphrase:
''' + legacy_passphrase + '''


@@ -1015,9 +1013,9 @@ def hbnet_web_service(): ''' else: content = content + ''' -
-

''' + str(i[0]) + '''

-
MMDVM Passphrase: +
+

''' + str(i[0]) + '''

+
MMDVM Passphrase:
''' + str(i[1]) + '''


@@ -1091,15 +1089,20 @@ def hbnet_web_service(): def list_users(): u = User.query.all() # Broken for now, link taken out -

List/edit users:

 

Enter Callsign

- u_list = '''

 

- - - - - - - -''' + u_list = ''' +
CallsignNameEnabledDMR ID:AuthenticationNotes
+ + + + + + + + + + + +''' for i in u: u_list = u_list + ''' @@ -1925,17 +1928,19 @@ def hbnet_web_service(): art_count = 1 if art_count < 16: news_content = news_content + ''' -

''' + article.subject + '''

-
-

 

-''' + article.date + ''' - -

 

-
-
-''' + article.text + ''' +
+
+

''' + article.subject + '''

+
+

''' + article.date + '''

+
+   +

''' + article.text + '''

+

- +

 

+ ''' art_count = art_count + 1 @@ -1948,17 +1953,17 @@ def hbnet_web_service(): view_arti = News.query.filter_by(id=article).first() content = ''' -

''' + view_arti.subject + '''

-
-

 

-''' + view_arti.date + ''' -

 

-
-
-''' + view_arti.text + ''' +
+
+

''' + view_arti.subject + '''

+
+

''' + view_arti.date + '''

+
+   +

''' + view_arti.text + '''

+

- ''' return render_template('news.html', markup_content = Markup(content)) @@ -2025,14 +2030,16 @@ def hbnet_web_service():

 

-
CallsignNameEnabledDMR ID:AuthenticationNotes
- - - - - - -''' +
SubjectDateID
+ + + + + + + + +''' for a in view_news: content = content + ''' @@ -2198,83 +2205,83 @@ def hbnet_web_service(): ''' return render_template('flask_user_layout.html', markup_content = Markup(content)) - @app.route('/user_tg') - def tg_status(): - cu = current_user - u = User.query.filter_by(username=cu.username).first() - sl = ServerList.query.all() - user_ids = ast.literal_eval(u.dmr_ids) - content = '

Currently active talkgroups. Updated every 2 minutes.

' -## print(active_tgs) - for s in sl: - for i in user_ids.items(): - for ts in active_tgs[s.name].items(): -## print(ts) -## print(ts[1][3]['peer_id']) - if i[0] == ts[1][3]['peer_id']: -## print(i[0]) - print(ts) -## if i[0] in active_tgs[s.name]: -## for x in ts[1]: -## print(x) -## ## if i[0] != ts[1][x][3]['peer_id']: -## ## print('nope') -## ## pass -## ## elif i[0] == ts[1][x][3]['peer_id']: -## ## print(x) -## ## print(s.name) -## ## print('-----ts-----') -## ## print(ts[1][x][3]['peer_id']) #[s.name][3]['peer_id']) -## ## print(active_tgs) -## -## ## print(active_tgs[s.name]) -## ## print(str(active_tgs[ts[1]])) -## # Remove 0 from TG list - try: - active_tgs[s.name][ts[0]][0]['1'].remove(0) - active_tgs[s.name][ts[0]][1]['2'].remove(0) - except: - pass -#### try: - content = content + '''
SubjectDateID
- - - - - - - - -
-

Server: ''' + str(s.name) + '''

-

DMR ID: ''' + str(i[0]) + '''

-
  - - - - - - - - - - - -
Timeslot 1 ''' + str(active_tgs[s.name][ts[0]][0]['1'])[1:-1] + '''
Timeslot 2 ''' + str(active_tgs[s.name][ts[0]][1]['2'])[1:-1] + '''
-
''' -## except: -## pass - - -## #TS1 -## for tg in active_tgs[s.name][i[0]][1]['2']: -## content = content + ''' ''' + str(tg) + ''' -##''' -## print(active_tgs[s.name][i[0]]) -## content = active_tgs[s.name][i[0]][1]['2'] -## content = 'hji' - - return render_template('flask_user_layout.html', markup_content = Markup(content)) +## @app.route('/user_tg') +## def tg_status(): +## cu = current_user +## u = User.query.filter_by(username=cu.username).first() +## sl = ServerList.query.all() +## user_ids = ast.literal_eval(u.dmr_ids) +## content = '

Currently active talkgroups. Updated every 2 minutes.

' +#### print(active_tgs) +## for s in sl: +## for i in user_ids.items(): +## for ts in active_tgs[s.name].items(): +#### print(ts) +#### print(ts[1][3]['peer_id']) +## if i[0] == ts[1][3]['peer_id']: +#### print(i[0]) +## print(ts) +#### if i[0] in active_tgs[s.name]: +#### for x in ts[1]: +#### print(x) +#### ## if i[0] != ts[1][x][3]['peer_id']: +#### ## print('nope') +#### ## pass +#### ## elif i[0] == ts[1][x][3]['peer_id']: +#### ## print(x) +#### ## print(s.name) +#### ## print('-----ts-----') +#### ## print(ts[1][x][3]['peer_id']) #[s.name][3]['peer_id']) +#### ## print(active_tgs) +#### +#### ## print(active_tgs[s.name]) +#### ## print(str(active_tgs[ts[1]])) +#### # Remove 0 from TG list +## try: +## active_tgs[s.name][ts[0]][0]['1'].remove(0) +## active_tgs[s.name][ts[0]][1]['2'].remove(0) +## except: +## pass +###### try: +## content = content + ''' +## +## +## +## +## +## +## +## +##
+##

Server: ''' + str(s.name) + '''

+##

DMR ID: ''' + str(i[0]) + '''

+##
  +## +## +## +## +## +## +## +## +## +## +## +##
Timeslot 1 ''' + str(active_tgs[s.name][ts[0]][0]['1'])[1:-1] + '''
Timeslot 2 ''' + str(active_tgs[s.name][ts[0]][1]['2'])[1:-1] + '''
+##
''' +#### except: +#### pass +## +## +#### #TS1 +#### for tg in active_tgs[s.name][i[0]][1]['2']: +#### content = content + ''' ''' + str(tg) + ''' +####''' +#### print(active_tgs[s.name][i[0]]) +#### content = active_tgs[s.name][i[0]][1]['2'] +#### content = 'hji' +## +## return render_template('flask_user_layout.html', markup_content = Markup(content)) @app.route('/tg/') #, methods=['POST', 'GET']) ## @login_required @@ -2283,7 +2290,7 @@ def hbnet_web_service(): content = '''
-

''' + tg_d.bridge_name + '''

+

''' + tg_d.bridge_name + '''


TG #: ''' + str(tg_d.tg) + '''
@@ -5836,15 +5843,17 @@ TG #: ''' + str(tg_d.tg) + '''

 

- - - - - - - +
NamePublicDescriptionTGID
+ + + + + + + + + - ''' for i in all_b: b_list = b_list + ''' diff --git a/web/templates/aprs_page.html b/web/templates/aprs_page.html index 2d2ba10..a899f4c 100644 --- a/web/templates/aprs_page.html +++ b/web/templates/aprs_page.html @@ -5,27 +5,21 @@

Last Known Location

-
NamePublicDescriptionTGID
+
+ - - - - + + + + + + {{markup_content}} - + +
-

 Callsign 

-
-

 Latitude 

-
-

 Longitude 

-
-

 Time 

-
CallsignLatitudeLongitudeTime
-
-

 

{% endblock %} diff --git a/web/templates/flask_user_layout.html b/web/templates/flask_user_layout.html index db91d37..52d9f3f 100644 --- a/web/templates/flask_user_layout.html +++ b/web/templates/flask_user_layout.html @@ -7,7 +7,9 @@ {{ user_manager.USER_APP_NAME }} - + + +