Skip to content

Commit 3d6d6b4

Browse files
committed
Added 'net_device__in', 'limit', and 'offset' to allowed_params for get_net_device_health. This lets callers pass limit='all' to disable the cap.
web_apps/cellular_health_dashboard/serve.py — Changed the call to client.get_net_device_health(limit='all') so it paginates through all pages until meta.next is null.
1 parent 71161b7 commit 3d6d6b4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ncm/ncm/ncm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ def get_net_device_health(self, **kwargs):
11561156
call_type = 'Net Device Health'
11571157
get_url = '{0}/net_device_health/'.format(self.base_url)
11581158

1159-
allowed_params = ['net_device']
1159+
allowed_params = ['net_device', 'net_device__in', 'limit', 'offset']
11601160
params = self.__parse_kwargs(kwargs, allowed_params)
11611161

11621162
return self.__get_json(get_url, call_type, params=params)

web_apps/cellular_health_dashboard/serve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ def _get_cellular_health():
472472
accounts = client.get_accounts()
473473
account_name = accounts[0].get('name', 'Unknown Account') if accounts else 'Unknown Account'
474474

475-
# Step 1: Get net_device_health records
476-
health_data = client.get_net_device_health()
475+
# Step 1: Get net_device_health records (all pages)
476+
health_data = client.get_net_device_health(limit='all')
477477
if not health_data:
478478
return {"account_name": account_name, "devices": []}
479479

0 commit comments

Comments
 (0)