increase number of BB entries in RSS
This commit is contained in:
parent
9b19a09eac
commit
f4010939dc
@ -179,7 +179,7 @@ def dashboard_bb_write(call, dmr_id, time, bulletin):
|
|||||||
# dash_entries = []
|
# dash_entries = []
|
||||||
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
|
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
|
||||||
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
|
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
|
||||||
user_bb_file.write(str(dash_bb[:10]))
|
user_bb_file.write(str(dash_bb[:20]))
|
||||||
user_bb_file.close()
|
user_bb_file.close()
|
||||||
logger.info('User bulletin entry saved.')
|
logger.info('User bulletin entry saved.')
|
||||||
#logger.info(dash_bb)
|
#logger.info(dash_bb)
|
||||||
|
@ -172,7 +172,7 @@ def dashboard_bb_write(call, dmr_id, time, bulletin):
|
|||||||
# dash_entries = []
|
# dash_entries = []
|
||||||
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
|
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
|
||||||
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
|
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
|
||||||
user_bb_file.write(str(dash_bb[:10]))
|
user_bb_file.write(str(dash_bb[:20]))
|
||||||
user_bb_file.close()
|
user_bb_file.close()
|
||||||
logger.info('User bulletin entry saved.')
|
logger.info('User bulletin entry saved.')
|
||||||
#logger.info(dash_bb)
|
#logger.info(dash_bb)
|
||||||
|
@ -102,14 +102,19 @@ def get_bb_data():
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
'''
|
'''
|
||||||
|
display_number = 10
|
||||||
|
|
||||||
for e in dash_bb:
|
for e in dash_bb:
|
||||||
tmp_bb = tmp_bb + '''<tr>
|
if display_number == 0:
|
||||||
<td style="text-align: center;"><strong> ''' + e['call'] + ''' </strong></td>
|
break
|
||||||
<td style="text-align: center;">''' + str(e['dmr_id']) + '''</td>
|
else:
|
||||||
<td style="text-align: center;"><strong> ''' + e['bulletin'] + ''' </strong></td>
|
display_number = display_number - 1
|
||||||
<td style="text-align: center;"> ''' + e['time'] + ''' </td>
|
tmp_bb = tmp_bb + '''<tr>
|
||||||
</tr>'''
|
<td style="text-align: center;"><strong> ''' + e['call'] + ''' </strong></td>
|
||||||
|
<td style="text-align: center;">''' + str(e['dmr_id']) + '''</td>
|
||||||
|
<td style="text-align: center;"><strong> ''' + e['bulletin'] + ''' </strong></td>
|
||||||
|
<td style="text-align: center;"> ''' + e['time'] + ''' </td>
|
||||||
|
</tr>'''
|
||||||
|
|
||||||
return str('<h1 style="text-align: center;">Bulletin Board</h1>' + tbl_hdr + bb_hdr + tmp_bb + tbl_ftr)
|
return str('<h1 style="text-align: center;">Bulletin Board</h1>' + tbl_hdr + bb_hdr + tmp_bb + tbl_ftr)
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user