Class OnmsServer

Represents a remote OpenNMS server.

Constructors

  • Construct a new OnmsServer object representing a remote server.

    Parameters

    Returns OnmsServer

    Example

    provide a pre-existing [[OnmsAuthConfig]] for auth ```javascript const server = new OnmsServer('Test', 'https://myserver/opennms/', auth); ```

Properties

The authorization configuration associated with the server.

id: string

A unique identifier for this server.

metadata: ServerMetadata

The capabilities of the server

name?: string

An optional name associated with this server.

url: string

The base URL to the server.

Accessors

  • get host(): any
  • Get the hostname portion of the URL associated with this server.

    Returns any

Methods

  • Check whether the provided server has the same settings as this one.

    Parameters

    Returns boolean

  • Given a relative URL fragment, construct a URL for that fragment on the server.

    Parameters

    • Optional forFragment: string

      The URL fragment to append to the server URL.

    • Optional withQuery: any

    Returns any

    A complete URL.

    Parm

    withQuery - Query parameters to be appended to the URL.

  • A string representation of this server suitable for display.

    Returns string