Skip to content

Commit af6bd81

Browse files
Update correctly the time
1 parent c8f0d8c commit af6bd81

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/pages/explore_paths.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ def description(q=None):
2323

2424
pq = Parquet()
2525
alarmsInst = Alarms()
26-
# that period should match the one in the layout,
27-
# as well as the range of the cached data + the period on /site page
28-
dateFrom, dateTo = hp.defaultTimeRange(2)
29-
frames, pivotFrames = alarmsInst.loadData(dateFrom, dateTo)
3026
selected_keys = ['path changed between sites', 'path changed', 'ASN path anomalies']
3127
changeDf = pq.readFile('parquet/prev_next_asn.parquet')
3228
asn_anomalies = pq.readFile('parquet/frames/ASN_path_anomalies.parquet')
@@ -61,6 +57,8 @@ def get_dropdown_data():
6157

6258
def layout(**other_unknown_query_strings):
6359
global frames, pivotFrames, alarmsInst, selected_keys, changeDf
60+
dateFrom, dateTo = hp.defaultTimeRange(2)
61+
frames, pivotFrames = alarmsInst.loadData(dateFrom, dateTo)
6462
period_to_display = hp.defaultTimeRange(days=2, datesOnly=True)
6563

6664
sankey_fig, dataTables = load_initial_data(selected_keys, changeDf)
@@ -163,6 +161,7 @@ def colorMap(eventTypes):
163161

164162

165163
def load_initial_data(selected_keys, changeDf):
164+
global pivotFrames, alarmsInst
166165
dataTables = []
167166

168167
# Filter out non-numeric values before conversion

0 commit comments

Comments
 (0)