Interface ComponentContext<ComponentContextInputs>

The Component Context provides access to the component's inputs, the page's time range, to the LoggingDataClient and ResourceDataClient and to other application data.

Type Parameters

  • ComponentContextInputs extends object = { [key: string]: any }

Hierarchy

  • ComponentContext

Properties

appData: AppData

Application data.

destroyed: boolean

True if destroy is called and has destroyed all clients.

inputMap: Map<string, any>

Values for the inputs declared in the components manifest file as a Javascript Map.

inputs: ComponentContextInputs

Values for the inputs declared in the components manifest file

mode: "edit" | "view"

'edit' when the component is used in the Studio, else 'view'.

ontimerangechange: null | ((newTimeRange: LoggingDataTimeRange) => any)

Called when the time range is changed

onvpnclientstatuschange: null | ((newStatus: null | VpnClientStatus) => any)

Called when the VPN client status changes

Snapshot of the current time range

timeRangeIsAdjustable: boolean

If the time range is adjustable.

vpnClientStatus: null | VpnClientStatus

Snapshot of the current VPN client status.

Methods

  • Creates a client to retrieve logging data.

    Every time this methode is called, a new client is created.

    Returns LoggingDataClient

  • Experimental

    Attaches a tooltip on the target element.

    Returns

    returns the tooltip instance

    Parameters

    • target: HTMLElement

      the target element

    • options: TooltipOptions

      configures the tooltip message and other (optional) properties

    Returns Tooltip

  • Destroy the clients associated to this context and destroy the context.

    Returns void

  • Get the endpoint for a resource, the rel.

    Parameters

    • rel: string

      The name of the resource, see the reference for all resource relations.

    • Optional params: { [param: string]: string }

      Extra query parameters, see the reference for all the URL and query paramaters that can be used for a specific resource.

      • [param: string]: string

    Returns string

  • Use this method to navigate to a specific page in the portal, for example the VNC-viewer. Don't use this method to navigate to navigate outside the Portal.

    Parameters

    • url: string

      The URL to navigate to, don't include the host.

    Returns void

  • Save a file.

    Parameters

    • data: string | Blob

      the file data to save

    • fileName: string

      the name of the file

    Returns void

  • Set a new time range. Check timeRangeIsAdjustable to verify the time range is adjustable

    Parameters

    Returns void

  • Open a dialog with VPN status details for an agent.

    Parameters

    • agentId: string

      The agent to show VPN status info for

    Returns void

  • Tests whether the currently logged in user has VPN access to the Agent with the given {@code agentId}.

    Returns

    true if the user has access, false otherwise

    Parameters

    • agentId: string

      the Agent ID

    Returns boolean

  • Connects or disconnects the VPN-client

    Parameters

    • agentId: string

      The public ID of the agent to connect to or disconnect from.

    Returns void

  • Translate a key to the users language.

    Parameters

    • key: string | string[]
    • Optional interpolateParams: Object

    Returns any

Generated using TypeDoc