Skip to content

Commit

Permalink
Drop avg value on complete loss
Browse files Browse the repository at this point in the history
  • Loading branch information
petya-vasileva committed Jan 6, 2024
1 parent 5058091 commit ff8a99f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
],
suppress_callback_exceptions=True, use_pages=True)

#

# Kubernetes rediness probe
server = app.server
@server.route('/ready')
def ready():
Expand Down
5 changes: 4 additions & 1 deletion src/model/Alarms.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ def formatDfValues(self, df, event):
df = self.replaceCol('cannotBeReachedFrom', df, '\n')

if 'dest_change' in df.columns:

df['dest_change'] = df[['dest_sites', 'dest_change']].apply(lambda x: self.list2str(x, sign[event]), axis=1)
# df.drop('dest_change', axis=1, inplace=True)
df.drop('dest_sites', axis=1, inplace=True)
Expand Down Expand Up @@ -340,6 +339,10 @@ def formatDfValues(self, df, event):
df['alarm_link'] = df['alarm_id']
df.drop('alarm_id', axis=1, inplace=True)
df = df[['from','to'] + [col for col in df.columns if not col in ['from', 'to']]]

if event == 'complete packet loss':
df.drop(columns=['avg_value'], inplace=True)


df = self.createAlarmURL(df, event)
except Exception as e:
Expand Down

0 comments on commit ff8a99f

Please sign in to comment.