protected void Page_Load(object sender, EventArgs e) { HeaderActions.ActionPerformed += HeaderActions_ActionPerformed; MessagesWriter.ShowABTestScheduleInformation(ABTest, TestStatus); MessagesWriter.ShowMissingVariantsTranslationsWarning(ABTest); ScriptHelper.RegisterDialogScript(Page); InitializeSelectors(); InitSmartTip(); // Hide summary and table if the test has not been started yet if ((ABTest.ABTestOpenFrom > DateTime.Now) || (ABTest.ABTestOpenFrom == DateTimeHelper.ZERO_TIME)) { Summary.Visible = false; gridElem.Visible = false; return; } // Display test winner if there is one var winner = GetTestWinner(); if (winner != null) { DisplayWinnerInformation(winner); SetWinnerTooltip(); } EnsureVariantsStatisticsData(); if (DataAvailable()) { // Add class to the report because graph with data requires special positioning // Show all information after graph do postback if (RequestHelper.IsPostBack()) { Summary.Visible = true; gridElem.Visible = true; gridElem.GridView.AddCssClass("rows-middle-vertical-align"); // Hide NoDataFound panel pnlNoData.Visible = false; } } else { // Hide summary and table Summary.Visible = false; gridElem.Visible = false; // Show NoDataFound panel pnlNoData.Visible = true; return; } LoadSummaryBox(); InitializeGraph(); InitializeGrid(); SetImprovementColumnCaption(); ShowInvalidFilterCombinationImage(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); Controls.Add(DocumentManager as CMSDocumentManager); MessagesWriter.ShowABTestScheduleInformation(ABTest, TestStatus); MessagesWriter.ShowMissingVariantsTranslationsWarning(ABTest); RegisterScripts(); InitializeSelectors(); SetSelectorValues(); EnsureVariantsStatisticsData(); // Display test winner if there is one var winner = GetTestWinner(); if (winner != null) { DisplayWinnerInformation(winner); } else { ShowPromoteWinnerInfoMessage(); } // Hide summary and table if the test has not been started yet if (ABTestStatusEvaluator.ABTestNotStarted(TestStatus)) { Filter.Visible = false; Report.Visible = false; Summary.Visible = false; } else if (DataAvailable(VariantsStatisticsData.Values, drpSuccessMetric.SelectedValue)) { // Show all information after graph do postback if (RequestHelper.IsPostBack()) { Summary.Visible = true; Report.Visible = true; // Hide NoDataFound panel pnlNoData.Visible = false; } } else { // -> Test is executed, but no results are present // Hide summary Summary.Visible = false; // Show report and NoDataFound panel Report.Visible = true; pnlNoData.Visible = true; } LoadSummaryBox(); InitializeGraph(); InitializeGrid(); SetImprovementColumnCaption(); ShowInvalidFilterCombinationWarning(); }