Skip to content

Commit

Permalink
Try to fix Sites report
Browse files Browse the repository at this point in the history
  • Loading branch information
petya-vasileva committed Oct 10, 2020
1 parent 850d7ff commit b63ed38
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@
ppage.createLayout(), className='tab-element'
)


layout_sites = html.Div([
dcc.Interval(
id='interval-component',
interval=1*1000, # in milliseconds
n_intervals=0,
max_intervals=len(site_report.sites)/21
max_intervals=1
),
html.Div(id='cards')
], className='tab-element', id='main-tabs')
Expand All @@ -74,18 +73,17 @@
[State('cards', 'children')])
def showsSiteTables(interval, current_elements):
elem_list = []
start = interval*21
end = start+21
print (len(site_report.sites), (start, end))
for i in range(start, end):
start = interval*3
end = start+3
for i in range(0, len(site_report.sites)):
if (i%3 == 0):
print(len(site_report.sites), site_report.sites[i:i+3])
elem_list.append(dbc.Row([dbc.Col(site_report.createCard(val))
for val in site_report.sites[i:i+3]],
id=f"card-{i}", className='site-card'))

if current_elements is not None:
print('Sites elements >>>> ',len(current_elements), len(elem_list))
# print('Sites elements >>>> ',len(current_elements), len(elem_list))
return [current_elements + elem_list]
else:
return [elem_list]
Expand Down

0 comments on commit b63ed38

Please sign in to comment.