public string GetControlFrame(string remoteUrlTarget) { if (controlFrame == default(string)) { WebInterface ui = new WebInterface(); ControlCluster cluster = new ControlCluster(); cluster.columns = 1; ui.Title = "Control Frame"; cluster.Add(new Link(remoteUrlTarget + '/' + TEST_SUITES_PATH, ICON_SUITES.ToString(), VIEW_FRAME_NAME)); cluster.Add(new Link(remoteUrlTarget + '/' + SELECT_CUSTOM_SUITE_PATH, ICON_ALLTESTS.ToString(), VIEW_FRAME_NAME)); cluster.Add(new LineBreak()); cluster.Add(new LineBreak()); cluster.Add(new LineBreak()); cluster.Add(new LineBreak()); cluster.Add(new LineBreak()); cluster.Add(new LineBreak()); //cluster.Add(new Link(remoteUrlTarget + '/' + TEST_RESULTS_PATH, ICON_RESULTS.ToString(), VIEW_FRAME_NAME)); cluster.Add(new Link(remoteUrlTarget + '/' + REQUEST_KILL_SERVICE_PATH, ICON_EXIT.ToString(), VIEW_FRAME_NAME)); ui.ControlsInOrder.Add(cluster); controlFrame = ui.ToString(); cluster = null; ui = null; } return(controlFrame); }
private string ProgressBar(string remoteUrlTarget) { //Show progress and options to stop ControlCluster cluster = new ControlCluster(); cluster.columns = 1; cluster.Add(new RawCodeSegment("<center>")); ProgressBar progress = new ProgressBar(Progress, 100); progress.heightPixels = 20; progress.widthPixels = 450; cluster.Add(progress); cluster.Add(new RawCodeSegment("</center>")); cluster.Add(new CaptionedControl(new Link(remoteUrlTarget + "/" + STOP_TEST_CASE_PATH_PART, ICON_STOPONE, VIEW_FRAME_NAME), "Stop individual test <b><i>\"" + tests.CurrentlyRunningSuite.CurrentTest + "\"</i></b> and allow the remaining tests to run.", CaptionedControlOrientation.LeftOfCaption, 75)); cluster.Add(new CaptionedControl(new Link(remoteUrlTarget + "/" + STOP_ALL_TESTING_PATH_PART, ICON_STOPALL, VIEW_FRAME_NAME), "Halt test suite <b><i>\"" + tests.CurrentlyRunningSuite.Name + "\"</i></b> completely. No more tests will run.", CaptionedControlOrientation.LeftOfCaption, 75)); statusFrame.ControlsInOrder.Add(cluster); progress = null; cluster = null; return(statusFrame.ToString()); }
public string GetTestSuiteLaunchPane(string remoteUrlTarget) { WebInterface testSuiteLaunchPane = new WebInterface(); testSuiteLaunchPane = null; testSuiteLaunchPane = new WebInterface(); testSuiteLaunchPane.Title = "Test Suites"; testSuiteLaunchPane.ControlsInOrder.Add(new RawCodeSegment("<center>")); if (this.IsReady) { // List available tests testSuiteLaunchPane.ControlsInOrder.Add(new Label("AVAILABLE TEST SUITES", 200)); ControlCluster cluster = new ControlCluster(); cluster.columns = 3; foreach (string thisTestSuite in tests.AllTestSuites.Keys) { WebInterfaceControl icon = null; int size = tests.AllTestSuites[thisTestSuite].Count; if (size < SMALL_SUITE_THRESHOLD) { icon = ICON_SMALLTEST; } else if (size > LARGE_SUITE_THRESHOLD) { icon = ICON_LARGETEST; } else { icon = ICON_MEDIUMTEST; } cluster.Add(new Link(remoteUrlTarget + "/" + RUN_SUITE_PATH + '/' + thisTestSuite, new CaptionedControl(icon, thisTestSuite, CaptionedControlOrientation.AboveCaption, ICON_TEXT_SIZE).ToString())); icon = null; } testSuiteLaunchPane.ControlsInOrder.Add(cluster); cluster = null; } else { testSuiteLaunchPane.RefreshIntervalSeconds = 3; testSuiteLaunchPane.ControlsInOrder.Add(new Label("Tests are setting up...", 300)); } testSuiteLaunchPane.ControlsInOrder.Add(new RawCodeSegment("</center>")); return(testSuiteLaunchPane.ToString()); }