Back to Frontend

RevenueDashboard.Scala

admin/app/views/commercial/revenueDashboard.scala.html

latest1.1 KB
Original Source

@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")) {

@title

@if(controlRow.isEmpty && variantRow.isEmpty) {

There is currently no data, please wait, the query may still be running.

} @controlRow.map { row =>

Control

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 =>

Variant

eCPM: @{currencyFormatter.format(row.totalAverageECPM)}

impressions: @{integerFormatter.format(row.totalImpressions)}

revenue: @{ currencyFormatter.format(row.totalImpressions * row.totalAverageECPM / 1000d)}

key value: @{row.customCriteria}

} }