Skip to main content

system.kanoa.dashboard.getWidgets

This function is part of the kanoaCore module

Description

Gets the requested widgets.

Syntax

getWidgets(paramsDict, userId)
  • Parameters
      paramsDict (dict)
      - widgetId (int)
      - categoryId (int)
      - widgetName (string)
      - viewPath (string)
      - enabled (boolean)
  • Returns
      dataset
  • 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}'
    }
    >