RathodHarish commited on
Commit
753ff66
·
verified ·
1 Parent(s): 1633032

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -396,9 +396,9 @@ def generate_device_cards(df):
396
  }).reset_index()
397
  device_stats['count'] = df.groupby('device_id').size().reindex(device_stats['device_id']).values
398
  device_stats['health'] = device_stats['status'].map({
399
- 'Active': 'Healthy',
400
- 'Inactive': 'Unhealthy',
401
- 'Pending': 'Warning'
402
  }).fillna('Unknown')
403
  cards_html = '<div style="display: flex; flex-wrap: wrap; gap: 20px;">'
404
  for _, row in device_stats.iterrows():
 
396
  }).reset_index()
397
  device_stats['count'] = df.groupby('device_id').size().reindex(device_stats['device_id']).values
398
  device_stats['health'] = device_stats['status'].map({
399
+ (b'Active', b'Healthy'),
400
+ (b'Inactive', b'Unhealthy'),
401
+ (b'Pending', b'Warning')
402
  }).fillna('Unknown')
403
  cards_html = '<div style="display: flex; flex-wrap: wrap; gap: 20px;">'
404
  for _, row in device_stats.iterrows():