Creating a Widget to Add to Views - PAS Dashboard - 3.6.1 - Help - Intergraph

PAS Dashboard for PSI and Integrity User Guide

PAS Dashboard
Search by Category
Dashboard Version

Before you create views, you need to make sure the widgets you want to use in those views are already defined. The PAS Dashboard provides many default widgets to help you display the data you want. WizardWidgets provide a wizard style interface to help you build widgets without writing any code. You can also clone an existing widget and customize it as needed.

WizardWidgets include a wizard style UI you can use to configure popup details for WizardWidget visualizations. You can specify what detail information you would like to consume when clicking on a data point within a WizardWidget. For example, if you click on an individual day on an Alarms per Day widget, you can configure the popup to be the 24 hour Alarms per Hour details of the day clicked. You can further define subsequent popups for even greater exposer of detail, like Alarms per 10 Minutes, Frequent Alarms, and Alarm Flood periods. This powerful and valuable addition to WizardWidgets facilitates common investigative use cases and progressive exposure of detail information simply by interacting with your data.

In addition, you can use one of the many types of widgets the PAS Dashboard provides, such as a bar chart, data grid, or trend, and create a widget with that type to display the information you need. These widgets are also called PowerWidgets and they allow you to include the code you need to achieve the specific results you want.

When you create a widget, you select the type of widget to create, and then customize the properties specific to the selected widget type. You also set the calculation schedule for each widget in the Calculation Schedule section for PowerWidgets or the Schedule section for WizardWidgets. For more information about the available widget types, see Understanding the Widget Types.

The Widgets page lists all the defined widgets. You can choose to group the listed widgets by view. This grouping can help you quickly find the widget you may want to update. When you set Group by View to YES, each widget is displayed in the list for each view that includes that widget. You can also identify widgets that are not included in any views.

To create a widget:

  1. Open the configuration page. For more information, see Opening the Configuration Page.

  2. Click Widgets at the top of the window. The Widgets page is displayed.


    The existing widgets are listed on the left. When you select a widget in the Widgets list, the properties and settings on the right are for the selected widget.

  3. Click the plus sign (+) below the Widgets list. Alternatively, you can select and edit an existing widget.

  4. Type a name for the new widget, also known as a calculation.

  5. Select the type of widget, and then click OK.

  6. If you select WizardWidget as the type, complete the following steps:

    1. Select the data source, select answers for any additional questions, and then click Next Step.

    2. Answer questions on the Data Selection page.

    3. Move through the wizard steps to view default settings and customize them to meet your needs.

    4. On the Summary page, click Save, and then click Preview to see the widget as currently configured.

    5. Make additional changes, if needed, and click Save. You can now add the WizardWidget to a view. For more information, see Creating a View with Several Widgets.

  7. Expand Calculation Schedule on the right, and then define when calculations should occur for this widget. For more information, see Understanding the Calculation Schedule.

    You must have enabled the scheduled calculations service and specified the Windows account credentials for the service to use. If this service is not running, the calculation schedule is ignored and the displayed data is not updated unless you manually run calculations for the widgets. For more information, see Configure the Required PAS Dashboard SettingsPAS DashboardConfigure the Required PAS Dashboard Settings.

  8. If you need to create or modify the script to populate and configure the widget, complete the following steps:

    1. Click Edit Script in the top-right section of the window.

    2. Modify the script, and then click Test Code. When the successful confirmation message is displayed, click OK.

      If you need more information about the PAS Dashboard API, click API Reference. This online resource provides a list of the objects, properties, and methods.

    3. Click Save.

  9. Expand Widget Properties on the right, and then define the general widget properties. The Widget type field allows you to select the type of widget, such as a bar chart or data grid. This field also changes the type-specific properties displayed in the following properties expandable section. For more information about widget types, see Understanding the Widget Types.

    You can configure a widget to open another widget or a popup view. To perform this action, you need to initialize a new HyperlinkObject class in your widget script and pass in the popup type (ClickAction.DisplayPopupWidget or ClickAction.DisplayPopupView) and callback data. If you leave the callback data empty, the precalculated view is displayed. Specify the widget or popup view name in one of the following fields:

    • Supporting data widget: Specifies the name of the widget to open from the currently-selected widget.

    • Supporting data popup view: Specifies the name of the popup view to open from the currently-selected widget.

  10. If you want to include buttons in the header area when the widget is displayed as a popup window, complete the following steps:

    1. Click Header Buttons in the top-right section of the window.

    2. Click Add.

    3. Type the text you want on the button, and then click OK.

    4. Set the properties and options on the right for the button. Remember the function name you type in Widget Function to Call, and the names of the parameters you add.

    5. Click Save.

    6. Click Edit Script in the top-right section of the window.

    7. Modify the script to add the function you specified in Widget Function to Call. For example, the function can use the passed parameter as shown in the following sample function definition:

      Public Function function-name(parameter-name As String)
      ' do something with the parameter
      End Function

    8. Click Test Code. When the successful confirmation message is displayed, click OK.

    9. Click Save.

  11. Expand widget-type Properties on the right, and then define the widget type-specific properties. The properties in this section depend on the type of widget you selected in the Widget type field in the Widget Properties section.

  12. Expand End-User Documentation on the right, and then define the help and guidance information you want to be available to the PAS Dashboard users when they view this widget. You can indicate what information this widget provides, where the data comes from, and what users should do with this information.

  13. Click Save.