| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a8f8a14 commit 53db547
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,9 @@ import play.api.mvc._ | |||
| 9 | 9 | ||
| 10 | 10 | object DashboardRenderer extends Results { | |
| 11 | 11 | ||
| 12 | - def renderDashboard(testName: String, dashboardTitle: String)(implicit request: RequestHeader, | ||
| 13 | - context: ApplicationContext): Result = { | ||
| 12 | + def renderDashboard(testName: String, dashboardTitle: String, controlColour: String, variantColour: String)( | ||
| 13 | + implicit request: RequestHeader, | ||
| 14 | + context: ApplicationContext): Result = { | ||
| 14 | 15 | val maybeData = for { | |
| 15 | 16 | reportId <- CommercialDfpReporting.reportMappings.get(CommercialDfpReporting.teamKPIReport) | |
| 16 | 17 | report: Seq[DfpReportRow] <- CommercialDfpReporting.getReport(reportId) | |
@@ -43,7 +44,9 @@ object DashboardRenderer extends Results { | |||
| 43 | 44 | variantDataRow, | |
| 44 | 45 | integerFormatter, | |
| 45 | 46 | currencyFormatter, | |
| 46 | - dashboardTitle | ||
| 47 | + dashboardTitle, | ||
| 48 | + controlColour, | ||
| 49 | + variantColour | ||
| 47 | 50 | ))) | |
| 48 | 51 | } | |
| 49 | 52 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,10 +12,10 @@ class TeamKPIController(val controllerComponents: ControllerComponents)(implicit | |||
| 12 | 12 | ||
| 13 | 13 | def renderBaselineDashboard(): Action[AnyContent] = Action { implicit request => | |
| 14 | 14 | // The test variants for the team KPIs are commercialBaselineControl-control and commercialBaselineVariant-variant. | |
| 15 | - DashboardRenderer.renderDashboard("commercialBaseline", "Commercial Team Revenue KPI") | ||
| 15 | + DashboardRenderer.renderDashboard("commercialBaseline", "Commercial Team Revenue KPI", "hotpink", "deepskyblue") | ||
| 16 | 16 | } | |
| 17 | 17 | ||
| 18 | 18 | def renderPrebidDashboard(): Action[AnyContent] = Action { implicit request => | |
| 19 | - DashboardRenderer.renderDashboard("prebid", "Sonobi wrapper vs Prebid") | ||
| 19 | + DashboardRenderer.renderDashboard("prebid", "Sonobi wrapper vs Prebid", "lime", "aqua") | ||
| 20 | 20 | } | |
| 21 | 21 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,9 +5,20 @@ | |||
| 5 | 5 | variantRow: Option[KeyValueRevenueRow], | |
| 6 | 6 | integerFormatter: NumberFormat, | |
| 7 | 7 | currencyFormatter: NumberFormat, | |
| 8 | - title: String)(implicit request: RequestHeader, context: model.ApplicationContext) | ||
| 8 | + title: String, | ||
| 9 | + controlColour: String, | ||
| 10 | + variantColour: String)(implicit request: RequestHeader, context: model.ApplicationContext) | ||
| 9 | 11 | ||
| 10 | 12 | @admin_main(title, isAuthed = true, container = Some("commercial-dashboard")) { | |
| 13 | + <style type="text/css"> | ||
| 14 | + .test--control { | ||
| 15 | + background-color: @controlColour; | ||
| 16 | + } | ||
| 17 | + .test--variant { | ||
| 18 | + float: right; | ||
| 19 | + background-color: @variantColour; | ||
| 20 | + } | ||
| 21 | + </style> | ||
| 11 | 22 | <link rel="stylesheet" type="text/css" href="@controllers.admin.routes.UncachedAssets.at("css/commercial.css")"> | |
| 12 | 23 | <h2 class="revenue-dashboard__title">@title</h2> | |
| 13 | 24 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -85,15 +85,6 @@ dl.error, dd.error { | |||
| 85 | 85 | color: #374135; | |
| 86 | 86 | } | |
| 87 | 87 | ||
| 88 | - .test--control { | ||
| 89 | - background-color: hotpink; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - .test--variant { | ||
| 93 | - float: right; | ||
| 94 | - background-color: deepskyblue; | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | 88 | .test__eCPM, .test__impressions, .test__revenue, .test__heading { | |
| 98 | 89 | text-align: center; | |
| 99 | 90 | } | |
@@ -103,4 +94,4 @@ dl.error, dd.error { | |||
| 103 | 94 | text-align: center; | |
| 104 | 95 | font-size: 12px; | |
| 105 | 96 | overflow-wrap: break-word | |
| 106 | - } | ||
| 97 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments