Skip to content

Commit

Permalink
feat(model): add additional properties to alarms and events
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Jun 6, 2017
1 parent 27e5578 commit 253f23b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
23 changes: 18 additions & 5 deletions src/model/OnmsAlarm.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {Moment} from 'moment';
import * as moment from 'moment';

import {OnmsAlarmType, ALARM_TYPES} from './OnmsAlarmType';
import {OnmsEvent} from './OnmsEvent';
import {OnmsParm} from './OnmsParm';
import {OnmsServiceType} from './OnmsServiceType';
import {OnmsSeverity, SEVERITIES} from './OnmsSeverity';
import {OnmsTroubleTicketState, TROUBLE_TICKET_STATES} from './OnmsTroubleTicketState';

Expand All @@ -21,7 +22,7 @@ export class OnmsAlarm {
public ackUser: string;

/** the time this alarm was acknowledged */
public ackTime: Moment;
public ackTime: moment.Moment;

/** the UEI of the event associated with this alarm */
public uei: string;
Expand All @@ -36,7 +37,7 @@ export class OnmsAlarm {
public description: string;

/** the first time an event has triggered this alarm */
public firstEventTime: Moment;
public firstEventTime: moment.Moment;

/** the most recent event that triggered this alarm */
public lastEvent: OnmsEvent;
Expand All @@ -59,8 +60,20 @@ export class OnmsAlarm {
/** the node's label associated with this alarm */
public nodeLabel: string;

/** the parms emitted with this alarm's event */
public parms: OnmsParm[];
/** the service associated with the event */
public service: OnmsServiceType;

/** when the alarm was suppressed */
public suppressedTime: moment.Moment;

/** when the alarm will stop being suppressed */
public suppressedUntil: moment.Moment;

/** who the alarm was suppressed by */
public suppressedBy: string;

/** the parameters emitted with this alarm's event */
public parameters: OnmsParm[];

/** the most recent time the event has triggered this alarm */
public get lastEventTime() {
Expand Down
4 changes: 2 additions & 2 deletions src/model/OnmsEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class OnmsEvent {
/** the service associated with the event */
public service: OnmsServiceType;

/** the parms emitted with this alarm's event */
public parms: OnmsParm[];
/** the parameters emitted with this alarm's event */
public parameters: OnmsParm[];

/** the service name associated with the event */
public get serviceName() {
Expand Down

0 comments on commit 253f23b

Please sign in to comment.