Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GrafanaHTTP

Implementation of the IOnmsHTTP interface for Grafana.

implements

IOnmsHTTP

Hierarchy

Implements

Index

Constructors

constructor

  • Construct a new GrafanaHTTP implementation.

    constructor

    Parameters

    • backendSrv: any

      The Grafana BackendSrv object to use for requests.

    • Optional server: OnmsServer

      The OpenNMS server to make requests to.

    Returns GrafanaHTTP

Properties

options

The default set of HTTP options associated with this ReST client.

timeout

timeout: number = 10000

The default amount of time to wait before giving up on a request.

Accessors

server

  • The server associated with this HTTP implementation.

    Returns OnmsServer

  • The server associated with this HTTP implementation.

    Parameters

    Returns void

Methods

get

  • Make an HTTP GET call using the Grafana BackendSrv.

    Parameters

    Returns any

Protected getOptions

Protected getServer

Protected onSetServer

  • onSetServer(): void
  • Implementers should override this method if they have actions that need to be performed (like clearing a cache) when server settings change.

    Returns void

put

  • Make an HTTP PUT call using the Grafana BackendSrv.

    Parameters

    Returns any

Protected transformJSON

  • transformJSON(data: any): any
  • A convenience method for implementers to use to turn JSON into a javascript object. Use this to process a JSON response before returning it in an OnmsResult object.

    Parameters

    • data: any

    Returns any

Protected transformXML

  • transformXML(data: any): any
  • A convenience method for implementers to use to turn XML into a javascript object. Use this to process an XML response before returning it in an OnmsResult object.

    Parameters

    • data: any

    Returns any

Generated using TypeDoc