system.kanoa.dashboard.getWidgetFilters(page, viewParams, sessionCustomProps, clientTZ)
This function will parse the widget view parameters and either grab the assetPath and date range from the global session properties or set them to the passed in values
Parameters
page String: i.e perspective page.props.pageId
viewParams Dictionary: A dictionary of view parameters passed to the view
sessionCustomProps Dictionary: pass in the session custom props dictionary for {session.custom.kanoa}
clientTZ String: i.e America/Los Angeles
Returns
filters Dictionary
Example
page = 'wesdwe234'
viewParams = {'value': {'showAll': True}}
filters = system.kanoa.dashboard.getWidgetFilters(page, viewParams, session.custom.kanoa, self.session.props.device.timezone.id)
print filters
> {
"assetId": 510,
"assetPath": "Kanoa Industries\Buffalo Bakery\Production\Mix Line 1",
"autoUpdateTimerSeconds": None,
"dateRange": {
"endDate": Mon Jul 08 18:33:35 UTC 2024,,
"selectedRange": "Today",
"startDate": Sun Jul 07 18:33:35 UTC 2024,
},
"showAssetPath": True
}
>