@import com.gu.janus.model.{AuditLog, JConsole, JanusData} @import com.gu.googleauth.UserIdentity @import play.api.Mode @import java.time.{Instant, ZonedDateTime, ZoneOffset} @(auditLogs: Seq[scala.Either[String, AuditLog]], key: Either[String, String], startDate: Instant, prevNextWeeks: (Option[Instant], Option[Instant]), user: UserIdentity, janusData: JanusData)(implicit req: RequestHeader, mode: Mode, assetsFinder: AssetsFinder) @import logic.Date.{formatDateTime, formatDate, formatDuration, rawDate} @import helper._ @main("Audit trail", Some(user), janusData) {
For @key.fold(s => s, s => s), week commencing Monday @formatDate(startDate).
@if(startDate.isBefore(ZonedDateTime.of(2016, 7, 6, 0, 0, 0, 0, ZoneOffset.UTC).toInstant) && startDate.isAfter(ZonedDateTime.of(2016, 3, 9, 0, 0, 0, 0, ZoneOffset.UTC).toInstant)) {info Between 9th March 2016 and 6th July 2016 all Credentials access will show up as Console, due to a bug in the audit collection code.
}@if(key.isLeft){ Account } else { User } | Access | Type | Time (UTC) | Duration | External error | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
@if(key.isLeft){ @auditLog.account } else{ @auditLog.username } | @auditLog.accessLevel | @if(auditLog.accessType == JConsole){ Console cloud } else { Credentials vpn_key } | @formatDateTime(auditLog.instant) | @formatDuration(auditLog.duration) | @if(auditLog.external){ done } else { - } | } case Left(errorMessage) => {report_problem There was an error retrieving this log entry, check the application logs (@errorMessage) | } }|||||
No records found for the week commencing @formatDate(startDate) |