Skip to main content

system.kanoa.dashboard.getWidgets

Description

Gets the requested widgets.

Syntax

getWidgets(paramsDict, userId)

Parameters:
  • paramsDict (dict)
  • userId (int)

  • Returns:
  • dataset
  • Dictionary

    ParameterTypeRequiredNotes
    widgetIdint
    categoryIdint
    widgetNamestring
    viewPathstring
    enabledboolean

    Code Examples

    # Example usage
    widgets = system.kanoa.dashboard.getWidgets({'widgetId':36})
    print system.kanoa.utilities.convertDatasetRowToJSON(widgets, 0)
    > {
    'widgetName': u'Asset Downtime Bar Chart',
    'widgetCategoryName': u'Analytics',
    'widgetId': 36,
    'widgetCategoryId': 7,
    'enabled': 1,
    'viewPath': u'kanoa/core/dbp/widgets/analytics/assetDowntimeBarChart',
    'path': u'Analytics\\Asset Downtime Bar Chart',
    'changedDate': None,
    'widgetDescription': u'Display Downtime By Asset',
    'createdDate': Mon Jul 15 00:00:00 UTC 2024,
    'createdBy': 5,
    'changedBy': None,
    'sortOrder': None,
    'viewParams': u'{"assetPath": None,"downtimeBy": "Interval","showDowntimeBySelector": True}'
    }
    >