SaveDashboardExtension Class
A Web Dashboard extension that allows you to save the current dashboard.
Declaration
export class SaveDashboardExtension implements IExtension
Remarks
When registered, the SaveDashboardExtension adds the “Save” item to the dashboard menu.
To remove this item from the menu, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:
dashboardControl.unregisterExtension('save-dashboard');
Implements
constructor(dashboardControl)
Initializes a new instance of the SaveDashboardExtension
class.
Declaration
constructor(
dashboardControl: DashboardControl
)
Parameters
Name | Type | Description |
---|---|---|
dashboardControl | DashboardControl | A Web Dashboard control that owns the extension. |
Properties
canSaveDashboard Property
Declaration
canSaveDashboard: KnockoutComputed<boolean>
Property Value
Type |
---|
KnockoutComputed<boolean> |
designerToViewerAction Property
Declaration
designerToViewerAction: SequenceAction
Property Value
Type |
---|
SequenceAction |
name Property
Specifies a unique extension name.
Declaration
name: string
Property Value
Type | Description |
---|---|
string | A unique extension name. The return value is ‘save-dashboard’. |
Remarks
Warning
Do not change a unique name of the extension registered in the Web Dashboard in order to avoid exceptions.
Methods
ensureDashboardSaved(action) Method
Allows you to invoke a custom function while you save a dashboard.
Declaration
ensureDashboardSaved(
action: () => void
): void
Parameters
Name | Type | Description |
---|---|---|
action | () => void | A custom function that is executed when the dashboard is about to be saved. |
performSaveDashboard(dashboardId, dashboardJson) Method
Declaration
performSaveDashboard(
dashboardId: string,
dashboardJson: string
): JQueryXHR
Parameters
Name | Type |
---|---|
dashboardId | string |
dashboardJson | string |
Returns
Type |
---|
JQueryXHR |
saveDashboard Method
Declaration
saveDashboard(): JQueryXHR
Returns
Type |
---|
JQueryXHR |
start Method
Contains code that is executed when you register the dashboard extension.
Declaration
start(): void
stop Method
Contains code that is executed when you unregister the dashboard extension.
Declaration
stop(): void