Refreshing all panels in the view

In dashboard views, it is often useful to have a search console where the user can select which data should be displayed in all charts, cross-tables, and other panels. Because the console design and behavior may be complex, it is desirable to be able to re-use the same console view across many dashboard views.

You can include the console view into a dashboard using the standard view panel with the file attribute, but you would also want to program the console so that its code does not depend on which specific panels are included into the specific dashboard. You would want the console to apply the restriction to all panels, without coding to specific panel IDs.

A simplified example of such a dashboard:

schema/ab-products/solutions/assemblies/shared-datasource/ab-ex-shared-dashboard.axvw

You can use the following JS API methods to simplify this task.

Adding Refresh Parameters for All Panels in the View

The console can add refresh parameters to the view:

View.addRefreshParameter('bl_id', bl_id);

Added refresh parameters will be applied to all panels during refresh. Panels with data sources that do not define these parameters will ignore them.

When designing the dashboard views, use the same parameter name consistently across all data sources.

Refreshing All Panels in the View

The console can refresh all panels in the dashboard:

var consolePanel = …
View.refreshPanels(restriction, consolePanel);

The dashboard view will refresh all panels, except specified console panel, one at a time.

The view will display one refresh progress indicator for all panels.

Clearing Restrictions for All Panels in the View

The console can clear restrictions for all panels in the dashboard:

View.clearPanelRestrictions();

This will remove any restrictions used bythe Panel.refresh() or View.refreshPanels() methods.

Example:
http://localhost:8080/archibus/schema/ab-products/solutions/assemblies/shared-datasource/ab-ex-shared-dashboard.axvw