private ActionResult GraphViz(string url) { string workPackageResponse = null; try { using (HttpClient client = new HttpClient()) { workPackageResponse = client.GetStringAsync(url).Result; } } catch { workPackageResponse = string.Empty; } GraphVizViewModel viewmodel = new GraphVizViewModel(); if (!workPackageResponse.IsNullOrEmpty()) { viewmodel.DotString = ConvertRDFToDotString(workPackageResponse); } else { viewmodel.DotString = string.Empty; } return(View("GraphViz", viewmodel)); }
public ActionResult GraphViz(int id) { GraphVizViewModel viewmodel = new GraphVizViewModel(); viewmodel.DotString = GiveMeDotString(id, showLegend: true); return(View(viewmodel)); }
public ActionResult GraphViz() { GraphVizViewModel viewmodel = new GraphVizViewModel(); if (TempData["StringFromRedirect"] != null) { string q = TempData["StringFromRedirect"].ToString(); if (q.StartsWith("digraph")) { viewmodel.DotString = q; } else { viewmodel.DotString = string.Empty; } return(View(viewmodel)); } else { return(RedirectToAction("Index")); } }