Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Dashboard
    • Sub Tabs
      • SubTab Entities (Reports, Canvas, etc.)
    • Global Content Entities (Filter Panels)
    • Filters API

Sub Tabs, Reports and Filters all have a number of their own properties that can be seen in the reference guides for those areas.

...

Returns a direct link to this dashboard. For example,

http://localhost:8080/RunDashboard.i4?dashUUID=1e68d9cc-fa5a-44e2-816d-782aa40ceeae&primaryOrg=1&clientOrg=1

This is a simple link to access this dashboard directly, it doesn’t contain any filters.

...

<script type="text/javascript" src="http://localhost:8080/JsAPI/v3?dashUUID=1e68d9cc-fa5a-44e2-816d-782aa40ceeae"></script>




...


Function Reference

...

getCurrentSubTab()

Returns

SubTab

Description

Returns the SubTab object for the currently selected tab. If the dashboard has no currently selected tab (this can happen in some cases when it first loads) the first sub tab will be returned.

...

getSubTabByPosition(position)

Returns

SubTab

Description

Returns the SubTab object for the passed position. This position starts at 0.

...

getSubTab(subTabId)

Returns

SubTab

Description

Returns the SubTab object for the passed subTabId. If a SubTab name is passed in, it will attempt to be converted to its corresponding tab ID. 

...

getSubTabs()

Returns

Array[SubTab]

Description

Returns all of the sub tabs associated with the Dashboard in an ordered array. 

...

let subTabs = dashboard.getSubTabs();
subTabs.forEach(subTab => {
         console.log(subTab.name + " : " + subTab.uuid);
});


getAllReports()

...

Contains:

  • currentSubTab: (SubTab) This is the tab that we have just moved to.
  • currentSubTabId: (Number) The ID of the sub tab we are now on.
  • previousSubTabId: (Number) - The ID of the sub tab we just left.

...

dashboard.addEventListener('tabChanged', function(event) {
         let newTab = event.currentSubTab;
         console.log('We have just moved to the ' + newTab.name + ' tab');
}); 


dashboard.addEventListener('tabChanged', function(event) {
         let lastTab = dashboards.getSubTab(event.previousSubTabId);
         console.log('Moved from ' + lastTab.name);
})