Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlarmDAO

Hierarchy

Index

Constructors

constructor

Properties

Private eventDao

eventDao: EventDAO

an event DAO to be used for creating events attached to alarms from API/JSON data

Protected http

http: IOnmsHTTP

the HTTP implementation to use

Methods

find

  • get an alarm, given a filter

    Parameters

    Returns Promise<OnmsAlarm[]>

get

  • get an alarm, given the alarm's ID

    Parameters

    • id: number

    Returns Promise<OnmsAlarm>

Protected getApiVersion

  • getApiVersion(): 1 | 2
  • retrieve the API version from the underlying server

    Returns 1 | 2

Protected getCount

  • getCount(data: any): number
  • extract the count or totalCount values from response data

    Parameters

    • data: any

    Returns number

Protected getFilterProcessor

  • getFilterProcessor(): any
  • retrieve filter processor for the current API version

    Returns any

Protected getOptions

Private pathToAlarmsEndpoint

  • pathToAlarmsEndpoint(): "api/v2/alarms" | "rest/alarms"
  • get the path to the alarms endpoint for the appropriate API version

    Returns "api/v2/alarms" | "rest/alarms"

Protected toDate

  • toDate(from: any): any
  • convert the given value to a date, or undefined if it cannot be converted

    Parameters

    • from: any

    Returns any

Protected toNumber

  • toNumber(from: any): number
  • convert the given value to a number, or undefined if it cannot be converted

    Parameters

    • from: any

    Returns number

Generated using TypeDoc