root = Card([header, sep1, playersHeading, kpis, sep2, sessionHeading, sessionChart, sep3, sellersHeading, bestSellersChart, sep4, regionsHeading, regionTable, sep5, crashHeading, crashCallout, crashChart, sep6, eventsHeading, eventsTable, sep7, reviewHeading, playerReportsCallout, banAppealsCallout, sep8, inflationHeading, inflationChart, sep9, experimentsHeading, experimentCallout, experimentsTable, sep10, patchHeading, patchNotesForm, sep11, focusHeading, regionFocusForm, sep12, hotfixHeading, hotfixCallout, hotfixButton])
header = CardHeader("Live Ops Room", "Real-time operations for Skyfall Arena")
sep1 = Separator("horizontal")
sep2 = Separator("horizontal")
sep3 = Separator("horizontal")
sep4 = Separator("horizontal")
sep5 = Separator("horizontal")
sep6 = Separator("horizontal")
sep7 = Separator("horizontal")
sep8 = Separator("horizontal")
sep9 = Separator("horizontal")
sep10 = Separator("horizontal")
sep11 = Separator("horizontal")
sep12 = Separator("horizontal")
playersHeading = Heading("Player Metrics", "h2")
kpis = Table([metricCol, valueCol])
metricCol = Col("Metric", ["Players Online", "Daily Active (DAU)", "Monthly Active (MAU)", "Revenue Today", "Revenue per User"])
valueCol = Col("Value", ["128,342", "1,204,588", "8,160,430", "$312,490", "$0.26"])
sessionHeading = Heading("Session Length — Last 14 Days", "h2")
sessionChart = LineChart(sessionLabels, [sessionSeries], "natural", "Date", "Minutes")
sessionLabels = ["5/1", "5/2", "5/3", "5/4", "5/5", "5/6", "5/7", "5/8", "5/9", "5/10", "5/11", "5/12", "5/13", "5/14"]
sessionSeries = Series("Avg Session (min)", [19.2, 18.8, 20.1, 19.5, 18.6, 21.0, 20.4, 19.1, 18.9, 20.7, 19.8, 18.5, 19.0, 20.2])
sellersHeading = Heading("Best-Selling Items", "h2")
bestSellersChart = HorizontalBarChart(sellerLabels, [sellerSeries], "grouped", "Units Sold", "Item")
sellerLabels = ["Dragon Skin", "GG Emote", "Starter Bundle", "Victory Dance", "Season Pass"]
sellerSeries = Series("Units", [14200, 11800, 9600, 7400, 6100])
regionsHeading = Heading("Server Health by Region", "h2")
regionTable = Table([regionCol, healthCol, statusCol])
regionCol = Col("Region", ["NA East", "EU West", "Asia Pacific", "South America", "Oceania"])
healthCol = Col("Health", ["98%", "92%", "87%", "91%", "95%"])
statusCol = Col("Status", ["Online", "Online", "Degraded", "Online", "Online"])
crashHeading = Heading("Crash Rate by App Version", "h2")
crashCallout = Callout("warning", "1.4.1 crash rate elevated", "Version 1.4.1 is at 2.1% crashes. A hotfix is recommended before expanding the rollout.")
crashChart = BarChart(crashLabels, [crashSeries], "grouped", "Version", "Crash Rate (%)")
crashLabels = ["1.4.0", "1.4.1", "1.4.2", "1.4.3"]
crashSeries = Series("Crash Rate", [0.8, 2.1, 0.4, 0.5])
eventsHeading = Heading("Live & Upcoming Events", "h2")
eventsTable = Table([eventNameCol, eventTypeCol, eventStatusCol, eventEndCol])
eventNameCol = Col("Event", ["Double XP Weekend", "Summer Splash", "Boss Rush", "Founder's Sale"])
eventTypeCol = Col("Type", ["XP Boost", "Seasonal", "PvE", "Promo"])
eventStatusCol = Col("Status", ["Live", "Live", "Upcoming", "Upcoming"])
eventEndCol = Col("Ends", ["May 12", "May 20", "May 15", "May 31"])
reviewHeading = Heading("Community Review Queues", "h2")
playerReportsCallout = Callout("warning", "Player reports awaiting review", "1,284 reports need attention.")
banAppealsCallout = Callout("info", "Ban appeals awaiting review", "96 appeals waiting for a decision.")
inflationHeading = Heading("In-Game Currency Inflation", "h2")
inflationChart = LineChart(inflationLabels, [inflationSeries], "linear", "Week", "Inflation %")
inflationLabels = ["Wk1", "Wk2", "Wk3", "Wk4", "Wk5", "Wk6", "Wk7", "Wk8"]
inflationSeries = Series("Currency Inflation", [0.4, 0.5, 0.8, 1.1, 1.5, 1.3, 1.8, 2.1])
experimentsHeading = Heading("A/B Experiment Results", "h2")
experimentCallout = Callout("success", "Both experiments have a winner", "Onboarding variant B and Battle Pass pricing B are both statistically significant.")
experimentsTable = Table([expExpCol, expVariantCol, expPlayersCol, expWinRateCol, expConfCol])
expExpCol = Col("Experiment", ["Onboarding", "Onboarding", "Battle Pass", "Battle Pass"])
expVariantCol = Col("Variant", ["A (Control)", "B (New Tutorial)", "A ($9.99)", "B ($12.99)"])
expPlayersCol = Col("Players", ["50,000", "50,000", "30,000", "30,000"])
expWinRateCol = Col("Win Rate", ["42%", "48%", "6.1%", "7.4%"])
expConfCol = Col("Confidence", ["—", "99.2%", "—", "98.7%"])
patchHeading = Heading("Draft Patch Notes", "h2")
patchNotesForm = Form("patch-notes", patchButtons, [patchNotesField])
patchNotesField = FormControl("Patch Notes Draft", patchNotesArea)
patchNotesArea = TextArea("notes", "## v1.4.3\n\n- Fixed crash on startup\n- Balanced Dragon Skin pricing\n- Reduced currency inflation", 8)
patchButtons = Buttons([saveDraftBtn, publishBtn])
saveDraftBtn = Button("Save Draft")
publishBtn = Button("Publish Notes", null, "secondary")
focusHeading = Heading("Region Focus", "h2")
regionFocusForm = Form("region-focus", focusButtons, [regionFocusField])
regionFocusField = FormControl("Focus Region", regionSelect)
regionSelect = Select("region", regionOptions, "Select region...")
regionOptions = [regionNA, regionEU, regionAP, regionSA, regionOC]
regionNA = SelectItem("na-east", "NA East")
regionEU = SelectItem("eu-west", "EU West")
regionAP = SelectItem("apac", "Asia Pacific")
regionSA = SelectItem("sa", "South America")
regionOC = SelectItem("oce", "Oceania")
focusButtons = Buttons([focusBtn, resetBtn])
focusBtn = Button("Focus Region", null, "primary")
resetBtn = Button("Reset", null, "tertiary")
hotfixHeading = Heading("Hotfix Deployment", "h2")
hotfixCallout = Callout("error", "Hotfix 1.4.3 ready to ship", "Fixes the 1.4.1 crash and the currency exploit. Ship now?")
hotfixButton = Button("Ship Hotfix", null, "primary", "destructive")