AvailableDataSourcesExtension Class

An extension that is a list of available data sources used to provide data to the Web Dashboard.

Declaration

export class AvailableDataSourcesExtension implements IExtension

Remarks

The AvailableDataSourcesExtension supplies end-users with the capability to add data sources to the dashboard. Users can add data sources available in a dashboard storage using the Add button in the Data Sources page.

To disable the AvailableDataSourcesExtension, call the unregisterExtension(extensionNames) method and pass the extension's unique name as a parameter:

dashboardControl.unregisterExtension('available-data-sources');

Implements

constructor(dashboardControl)

Initializes a new instance of the AvailableDataSourcesExtension class.

Declaration

constructor(dashboardControl: DashboardControl)

Parameters

Name Type Description
dashboardControl DashboardControl

A Web Dashboard control that owns the extension.

Properties

dataSources Property

Gets data sources available to end-users for binding a dashboard to data.

Declaration

dataSources: ko.ObservableArray<DataSource>

Property Value

Type Description
ObservableArray<DataSource>

An array of the DataSource objects that are data sources available to end-users for binding a dashboard to data.

Remarks

The code snippet below shows how obtain available data sources:

var dataSourcesExtension = dashboardControl.findExtension('available-data-sources');
var dataSources = dataSourcesExtension.dataSources();

name Property

Specifies The unique extension name.

Declaration

name: string

Property Value

Type Description
string

The unique extension name. The return value is 'available-data-sources'.

Remarks

WARNING

Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.

selectedDataSources Property

Gets data sources currently selected in the Data Sources page.

Declaration

selectedDataSources: ko.ObservableArray<DataSource>

Property Value

Type Description
ObservableArray<DataSource>

An array of the DataSource objects that are currently selected data sources.

templateName Property

Specifies a name of the knockout template used by the AvailableDataSourcesExtension.

Declaration

templateName: string

Property Value

Type Description
string

A string value that specifies a name of the knockout template.

viewModel Property

Specifies a view model used to render the AvailableDataSourcesExtension.

Declaration

viewModel: any

Property Value

Type Description
any

An object that specifies a view model used to render the AvailableDataSourcesExtension.

Methods

loadAvailableDataSources Method

Loads available data sources used to provide data to the Web Dashboard.

Declaration

loadAvailableDataSources(): void

start Method

Contains code that is executed when you register the dashboard extension.

Declaration

start(): void

Remarks

See start to learn more.

stop Method

Contains code that is executed when you unregister the dashboard extension.

Declaration

stop(): void

Remarks

See stop to learn more.