More improvements to registration, leaf input create, and charting

This commit is contained in:
2020-01-14 14:10:11 -05:00
parent 8452a9cce0
commit 046cda40b4
18 changed files with 180 additions and 77 deletions
+26 -13
View File
@@ -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);