Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 400 |
-
|
| 401 |
-
|
| 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():
|