Skip to content

Commit 0ac19df

Browse files
committed
Device: Add ability to show a device as unsupported
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent b29abbf commit 0ac19df

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

suzieq/engines/pandas/device.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def table_name():
1616
'''Table name'''
1717
return 'device'
1818

19+
# pylint: disable=too-many-statements
1920
def get(self, **kwargs):
2021
"""Get the information requested"""
2122
view = kwargs.get('view', self.iobj.view)
@@ -80,6 +81,15 @@ def get(self, **kwargs):
8081
(df['status_y'] != 0) & (df['status_y'] != 200) &
8182
(df['status'] == "N/A"),
8283
'neverpoll', df['status'])
84+
if 'version' in df.columns:
85+
df['version'] = np.where(df.status_y == 418, 'unsupported',
86+
df.version)
87+
if 'os' in df.columns:
88+
df['os'] = np.where(df.status_y == 418, 'unsupported',
89+
df.os)
90+
if 'model' in df.columns:
91+
df['model'] = np.where(df.status_y == 418, 'unsupported',
92+
df.model)
8393
df = df[df.status != 'N/A']
8494
df.timestamp = np.where(df['timestamp'] == 0,
8595
df['timestamp_y'], df['timestamp'])

0 commit comments

Comments
 (0)