Skip to content

Commit

Permalink
Add AlertActionLog's to Alert instances. Only non-system logs are inc…
Browse files Browse the repository at this point in the history
…luded.
  • Loading branch information
Ryan Morgan committed Jul 15, 2009
1 parent d9849bb commit 18d8a5d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions hqu/hqapi1/app/AlertController.groovy
Expand Up @@ -36,6 +36,14 @@ public class AlertController extends ApiController {
escalationId: e.escalation.id,
nextActionTime: e.nextActionTime)
}
for (l in a.actionLog) {
if (l.subject) {
// Ignore 'internal' logs.
AlertActionLog(timestamp: l.timeStamp,
detail: l.detail,
user: l.subject?.name)
}
}
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion xsd/HQApi1.xsd
Expand Up @@ -904,10 +904,16 @@
<xs:attribute name="nextActionTime" type="xs:long" use="required"/>
</xs:complexType>

<xs:complexType name="AlertActionLog">
<xs:attribute name="detail" type="xs:string" use="required"/>
<xs:attribute name="user" type="xs:string" use="required"/>
<xs:attribute name="timestamp" type="xs:long" use="required"/>
</xs:complexType>

<xs:complexType name="Alert">
<xs:sequence>
<xs:element name="EscalationState" type="EscalationState" minOccurs="1" maxOccurs="1" />
<!-- ActionLog -->
<xs:element name="AlertActionLog" type="AlertActionLog" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>

<xs:attribute name="reason" type="xs:string" use="required"/>
Expand Down

0 comments on commit 18d8a5d

Please sign in to comment.