Skip to content
Permalink
Browse files

feat(api): OCE-REST extend Alarm and summary

  • Loading branch information...
smith-opennms committed Aug 31, 2018
1 parent e855134 commit 24ca0f7a87963f50fb00954513af42b1ef5af53e
Showing with 9 additions and 6 deletions.
  1. +3 −0 src/dao/AlarmDAO.ts
  2. +6 −6 src/model/OnmsAlarm.ts
@@ -400,6 +400,9 @@ export class AlarmDAO extends AbstractDAO<number, OnmsAlarm> {

alarm.detailsPage = this.getDetailsPage(alarm);

alarm.inSituation = data.inSituation;
alarm.affectedNodeCount = data.affectedNodeCount;

return alarm;
}

@@ -96,6 +96,12 @@ export class OnmsAlarm implements IHasUrlValue {
/** operator instructions */
public operatorInstructions: string;

/** this alarm is contained within a Situation */
public inSituation: boolean;

/** If this alarm is a Situation, the number of Nodes affected by its RelatedAlarms, a value of 1 otherwise */
public affectedNodeCount: number;

/** the most recent time the event has triggered this alarm */
public get lastEventTime() {
if (this.lastEvent && this.lastEvent.time) {
@@ -111,10 +117,4 @@ export class OnmsAlarm implements IHasUrlValue {
return String(this.id);
}

/** this alarm is contained within a Situation */
public inSituation: boolean;

/** If this alarm is a Situation, the number of Nodes affected by its RelatedAlarms, a value of 1 otherwise */
public affectedNodeCount: number;

}

0 comments on commit 24ca0f7

Please sign in to comment.
You can’t perform that action at this time.