Class DashboardSaveEventArgs

The class used as the argument to the onSave event.

Hierarchy

  • DashboardSaveEventArgs

Index

Constructors

constructor

  • new DashboardSaveEventArgs(saveAs: Boolean, name: string, revealView: any, dashboardId: string): DashboardSaveEventArgs

Properties

dashboardId

dashboardId: null | string

The ID of the dashboard being saved, for existing dashboards this is the ID used when loading it. For new dashboards or "save as" operation the value will be null. You should set the value of this property when "saving as" an existing dashboard or saving a new one before calling saveFinished, if not set it will be assumed to match the dashboard name.

name

name: string = ""

The name of the dashboard being saved, that could have been modified by the end user by editing the title.

Accessors

isNew

  • get isNew(): Boolean
  • A flag indicating if this event was originated by saving a newly created dashboard, it will be false when saving or "saving as" an existing dashboard.

    @deprecated

    This property is deprecated and will soon be removed. Returns true only if the dashboardId is null. In the future, determining whether the dashboard is new will not be the responsibility of the SDK.

    Returns Boolean

saveAs

  • get saveAs(): Boolean
  • A flag indicating if this event was originated by a 'save' (false) or 'save as' (true) operation.

    Returns Boolean

Methods

saveFinished

  • saveFinished(): void
  • Notifies the Reveal SDK the save operation has finished and it should switch to view mode. When using server side saving and for a new dashboard or for the "save as" operation it expects:

    • name to be set to the name entered by the end user, that value will be set as the title for the displayed dashboard.
    • dashboardId to be set to the assigned id, this value will be used for subsequent save operations, name will be used as the ID if dashboardId is not set.

    Returns void

serialize

  • serialize(callback: function, errorCallback: function): void
  • Serializes the current dashboard to the '.rdash' file format, using the current name.

    Parameters

    • callback: function

      This is the callback function used to receive the serialized dashboard

        • (blob: Blob): void
        • Parameters

          • blob: Blob

          Returns void

    • errorCallback: function

      This is the callback function invoked when an error occurs

        • (errorMessage: string): void
        • Parameters

          • errorMessage: string

          Returns void

    Returns void

    A Blob object with the contents of the dashboard in '.rdash' file format.

serializeWithNewName

  • serializeWithNewName(newName: string, callback: function, errorCallback: function): void
  • Serializes the current dashboard to the '.rdash' file format with the name provided.

    Parameters

    • newName: string

      The new name for the dashboard.

    • callback: function

      This is the callback function used to receive the serialized dashboard

        • (blob: Blob): void
        • Parameters

          • blob: Blob

          Returns void

    • errorCallback: function

      This is the callback function invoked when an error occurs

        • (errorMessage: string): void
        • Parameters

          • errorMessage: string

          Returns void

    Returns void

    A Blob object with the contents of the dashboard in '.rdash' file format.