DashboardCustomizationService

App.dashboard.DashboardCustomizationService. DashboardCustomizationService

Responsible for handling customizations (fetch, delete, save) related to a dashboard instance. Used internally by App.Dashboard.

Constructor

new DashboardCustomizationService(dashboardInfo)

Example
var customizationService = new App.dashboard.DashboardCustomizationService({
  dashboard: dashboard,
  config: dashboard.config,
  $target: dashboard.$dashboard
});
Parameters:
Name Type Description
dashboardInfo Object

Dashboard information object

Properties
Name Type Description
dashboard Dashboard

dashboard reference

config string

dashhboard configuration

$target jQuery

DOM reference of dashboard element

Methods

deleteById(id)

Deletes customization (both local and on server) for given dashboard id.

Parameters:
Name Type Description
id string

dashboard id

destroy()

Destroying this instance of App.dashboard.DashboardCustomizationService

getById(id) → {object}

Fetch dashboard customization for given id

Parameters:
Name Type Description
id string

dashboard id

Returns:

customization object if exists, empty object otherwise

Type
object

removeActiveViewWidgets()

Deletes widget customization for currently active dashboard view.

saveCustomization()

Persists current dashboard customization on server and updates config locally