[6118] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using System.Web.Mvc;
|
---|
| 6 | using HLWebOKBQueryPlugin.Models;
|
---|
| 7 | using HLWebOKBQueryPlugin.Helpers;
|
---|
| 8 | using HLWebOKBQueryPlugin.OKBQueryService;
|
---|
| 9 |
|
---|
| 10 | namespace HLWebOKBQueryPlugin.Controllers
|
---|
| 11 | {
|
---|
| 12 | public class ChartController : Controller
|
---|
| 13 | {
|
---|
| 14 | //
|
---|
| 15 | // GET: /Chart/
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 | public ActionResult UpdateBubbleChart(FormCollection collection)
|
---|
| 19 | {
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | String selectedAxisX = collection.Get("valuesAxisXCombobox");
|
---|
| 23 | String selectedAxisY = collection.Get("valuesAxisYCombobox");
|
---|
| 24 | String selectedBubbleSize = collection.Get("bubbleSizeCombobox");
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | ChartModel cm = new ChartModel();
|
---|
| 28 |
|
---|
| 29 | // Later, we will get the runs from the session ...
|
---|
| 30 | QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
|
---|
| 31 |
|
---|
| 32 | long[] runIds = new long[5];
|
---|
| 33 | for (int i = 0; i < 5; i++)
|
---|
| 34 | {
|
---|
| 35 | runIds[i] = i;
|
---|
| 36 | }
|
---|
| 37 | Run[] runs = client.GetRuns(runIds, false);
|
---|
| 38 |
|
---|
| 39 | cm.UpdateRunCollection(runs);
|
---|
| 40 | cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize);
|
---|
| 41 |
|
---|
| 42 | return View(cm);
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 |
|
---|
| 46 | public ActionResult Index()
|
---|
| 47 | {
|
---|
| 48 | ChartModel cm = new ChartModel();
|
---|
| 49 |
|
---|
| 50 | // Later, we will get the runs from the session ...
|
---|
| 51 | QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester");
|
---|
| 52 |
|
---|
| 53 | long[] runIds = new long[5];
|
---|
| 54 | for (int i = 0; i < 5; i++)
|
---|
| 55 | {
|
---|
| 56 | runIds[i] = i;
|
---|
| 57 | }
|
---|
| 58 | Run[] runs = client.GetRuns(runIds, false);
|
---|
| 59 |
|
---|
| 60 | cm.UpdateRunCollection(runs);
|
---|
| 61 |
|
---|
| 62 |
|
---|
| 63 | return View(cm);
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | // [ChildActionOnly]
|
---|
| 67 | public ActionResult BubbleChart()
|
---|
| 68 | {
|
---|
| 69 | ChartModel cm = new ChartModel();
|
---|
| 70 |
|
---|
| 71 | return PartialView("BubbleChart",cm); // name of usercontrol
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | //public ActionResult BoxPlot()
|
---|
| 76 | //{
|
---|
| 77 | // return View();
|
---|
| 78 | //}
|
---|
| 79 |
|
---|
| 80 | }
|
---|
| 81 | }
|
---|