FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Change colour of prebid dashboard · devhttps/frontend@53db547 · GitHub

Commit 53db547

Browse files
Change colour of prebid dashboard
1 parent a8f8a14 commit 53db547

4 files changed

Lines changed: 21 additions & 16 deletions

File tree

‎admin/app/controllers/admin/commercial/DashboardRenderer.scala‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import play.api.mvc._
99

1010
object DashboardRenderer extends Results {
1111

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 = {
1415
val maybeData = for {
1516
reportId <- CommercialDfpReporting.reportMappings.get(CommercialDfpReporting.teamKPIReport)
1617
report: Seq[DfpReportRow] <- CommercialDfpReporting.getReport(reportId)
@@ -43,7 +44,9 @@ object DashboardRenderer extends Results {
4344
variantDataRow,
4445
integerFormatter,
4546
currencyFormatter,
46-
dashboardTitle
47+
dashboardTitle,
48+
controlColour,
49+
variantColour
4750
)))
4851
}
4952
}

‎admin/app/controllers/admin/commercial/TeamKPIController.scala‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class TeamKPIController(val controllerComponents: ControllerComponents)(implicit
1212

1313
def renderBaselineDashboard(): Action[AnyContent] = Action { implicit request =>
1414
// 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")
1616
}
1717

1818
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")
2020
}
2121
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,20 @@
55
variantRow: Option[KeyValueRevenueRow],
66
integerFormatter: NumberFormat,
77
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)
911

1012
@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>
1122
<link rel="stylesheet" type="text/css" href="@controllers.admin.routes.UncachedAssets.at("css/commercial.css")">
1223
<h2 class="revenue-dashboard__title">@title</h2>
1324

‎admin/public/css/commercial.css‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,6 @@ dl.error, dd.error {
8585
color: #374135;
8686
}
8787

88-
.test--control {
89-
background-color: hotpink;
90-
}
91-
92-
.test--variant {
93-
float: right;
94-
background-color: deepskyblue;
95-
}
96-
9788
.test__eCPM, .test__impressions, .test__revenue, .test__heading {
9889
text-align: center;
9990
}
@@ -103,4 +94,4 @@ dl.error, dd.error {
10394
text-align: center;
10495
font-size: 12px;
10596
overflow-wrap: break-word
106-
}
97+
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL