admin/app/views/commercial/revenueDashboard.scala.html
@import controllers.admin.commercial.KeyValueRevenueRow @import java.text.NumberFormat @( controlRow: Option[KeyValueRevenueRow], variantRow: Option[KeyValueRevenueRow], integerFormatter: NumberFormat, currencyFormatter: NumberFormat, title: String, controlColour: String, variantColour: String)(implicit request: RequestHeader, context: model.ApplicationContext) @admin_main(title, isAuthed = true, container = Some("commercial-dashboard")) {
@if(controlRow.isEmpty && variantRow.isEmpty) {
There is currently no data, please wait, the query may still be running.
} @controlRow.map { row =>
eCPM: @{currencyFormatter.format(row.totalAverageECPM)}
impressions: @{integerFormatter.format(row.totalImpressions)}
revenue: @{ currencyFormatter.format(row.totalImpressions * row.totalAverageECPM / 1000d)}
key value: @{row.customCriteria}
} @variantRow.map { row =>
eCPM: @{currencyFormatter.format(row.totalAverageECPM)}
impressions: @{integerFormatter.format(row.totalImpressions)}
revenue: @{ currencyFormatter.format(row.totalImpressions * row.totalAverageECPM / 1000d)}
key value: @{row.customCriteria}
} }