More improvements to registration, leaf input create, and charting
This commit is contained in:
@@ -15,12 +15,14 @@ using LeafWeb.Core.Parsers;
|
||||
using LeafWeb.Core.Utility;
|
||||
using LeafWeb.WebCms.Models;
|
||||
using LeafWeb.WebCms.Services;
|
||||
using LeafWeb.WebCms.Utility;
|
||||
|
||||
namespace LeafWeb.WebCms.Controllers
|
||||
{
|
||||
public class ChartController : BaseController
|
||||
{
|
||||
public ActionResult Index(int? leafInputId)
|
||||
public class ChartController : BaseController
|
||||
{
|
||||
[RequireRequestValue("leafInputId")]
|
||||
public ActionResult Index(int? leafInputId)
|
||||
{
|
||||
if (!leafInputId.HasValue)
|
||||
return View("DataError", model: "Must specify LeafInputId");
|
||||
@@ -60,17 +62,28 @@ namespace LeafWeb.WebCms.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
//private ChartViewModel GetTestChartViewModel()
|
||||
//{
|
||||
// return new ChartViewModel
|
||||
// {
|
||||
// AvailableCurveId = new []{"Valid", "Test"},
|
||||
// LeafInputId = 2147483647,
|
||||
// LeafInputIdentifier = "Chart Tests"
|
||||
// };
|
||||
//}
|
||||
[RequireRequestValue("token")]
|
||||
public ActionResult Index(string token)
|
||||
{
|
||||
var leafInput = DataService.GetLeafInput(token);
|
||||
|
||||
public ActionResult ChartCurve(int leafInputId, string curveId, bool base64 = false)
|
||||
if (leafInput == null)
|
||||
return View("DataError", model: "Leaf Input Token not found");
|
||||
|
||||
return Index(leafInput.Id);
|
||||
}
|
||||
|
||||
//private ChartViewModel GetTestChartViewModel()
|
||||
//{
|
||||
// return new ChartViewModel
|
||||
// {
|
||||
// AvailableCurveId = new []{"Valid", "Test"},
|
||||
// LeafInputId = 2147483647,
|
||||
// LeafInputIdentifier = "Chart Tests"
|
||||
// };
|
||||
//}
|
||||
|
||||
public ActionResult ChartCurve(int leafInputId, string curveId, bool base64 = false)
|
||||
{
|
||||
var leafOutputFile = DataService.GetLeafOutput_ChartFile(leafInputId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user