admin/app/views/email/expiringSwitches.scala.html
@import conf.switches.Switch @import _root_.jobs.ExpiringSwitches @(switches: Seq[Switch]) @showSwitch(switch: conf.switches.Switch, showExpirationDate: Boolean) = {
@{switch.name} - @showOwners(switch.owners) @if(showExpirationDate) { - @{Switch.expiryAsUserFriendlyString(switch)}}
@{switch.description} } @emergencyColor(index: Int) = @{ index match { case 0 => "red" case 1 => "orangeRed" case 2 => "orange" case _ => "black" } } @showOwners(owners: Seq[conf.switches.Owner]) = { Owners: @for(owner <- owners) { @showOwner(owner) } } @showOwner(owner: conf.switches.Owner) = { @if(!owner.github.isEmpty) { @{owner.name.getOrElse(owner.github)} } else { @if(!owner.email.isEmpty) { @{owner.name.getOrElse(owner.email)} } else { @owner.name } } }
_ Note on AB tests: AB tests do not necessarily expire at the same time as their switch - they may have been configured to expire earlier. Please do not rely only on this email to determine when your test will end._
@defining(ExpiringSwitches(switches).groupByPriority) { allGroups => @for(group <- allGroups) { @if(group.switches.nonEmpty) {
@for(switch <- group.switches) {@showSwitch(switch, (allGroups.last == group))}
} } }